[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 18
Old thread: >>55280913

What are you working on, /g/?
>>
File: smug_sakura.jpg (29 KB, 337x404) Image search: [Google]
smug_sakura.jpg
29 KB, 337x404
>2016

>He writes his software instead of evolving it

What a pleb~
>>
>>55283610

https://www.youtube.com/watch?v=BOuvnGcvZb4
>>
>>55283610
Rendering engine that relies on C++17 and Concepts Lite. It's fuckin nice to use at the moment.
>>
File: Screenshot_2016-06-27_21-02-05.png (59 KB, 1366x768) Image search: [Google]
Screenshot_2016-06-27_21-02-05.png
59 KB, 1366x768
>>55283610
Trying to learn AVR assembly after 8052 assembly
Its not working out too well, RISC fucking sucks if you're used to CISC
>>
>>55283610
Learning javascript so I can build my own operating system.
>>
File: baiting.png (65 KB, 326x326) Image search: [Google]
baiting.png
65 KB, 326x326
>>55284977
>>
File: 1322719732073.jpg (189 KB, 364x366) Image search: [Google]
1322719732073.jpg
189 KB, 364x366
>tfw learning R

It's beautiful

Everything is exactly where it needs to be
>>
Anybody have any issues getting SDL2 to recognize a gamecontroller?

I compiled SDL2.0.4 from source, that could be why.

I tried an afterglow 360 controller and an xbox one controller and neither passed the SDL_IsGameController() function.

What I found online is alot of people asking, but no one giving answers. Something to do with xinput.
>>
I am looking to create a peer-to-peer chat program for some friends and myself. Not sure on how to get started.

I figure if I know their route to a specific server, and I know my route to that same server, then I can create a socket and open a connection between two of us. Is that correct?
>>
If I have this string and regex:
String = "memes1 autism autism autism 11 22 33 memes2 autism autism autism 111 222 333 memes3 autism autism autism 1111 2222 3333 shnmkjsrhm
Regex = "memes1.*(\d+)\s(\d+)\s(\d+)"


Why does it grab the entire thing all the way to 3333? I only want it to get "memes1 autism autism autism 11 22 33"
>>
File: 1367472762653.jpg (299 KB, 1383x1600) Image search: [Google]
1367472762653.jpg
299 KB, 1383x1600
>in person HR interview with some technical questions in two days
>mfw scared shitless and only have 1 half decent pair of business clothes to wear

oh sweet jesus I am hosed as all fuck
>>
>>55288029
You only NEED one pair of half decent clothes, dumb shit

You've got that covered, now make sure you know your shit
>>
>>55287418
>>55287418
>>55287418
send help
>>
File: 2016-06-27 14_21_51-Greenshot.png (54 KB, 1366x768) Image search: [Google]
2016-06-27 14_21_51-Greenshot.png
54 KB, 1366x768
>>55283610
I'm putting off working through K&R exercise 5-11 because it's hard.

Does the book get more difficult from this point? I'm gonna do it either way, but it'd be cool to have some expectation.
>>
>>55287306
bringing reply over from other thread

I don't really need the gamecontroller, i'm fine using the joypad, but the left trigger and right trigger use the same axis, so i've had a really hard time getting them to work. Otherwise i've already coded everything I need for the joypad.

That's the only major issue, aside from the DEVICE_ADDED and DEVICE_REMOVED events never occuring (but it's my understanding those don't work period).
>>
learning to write mvvm wpf applications
please kill me
>>
>>55287418
because your autism
>>
I want to learn to make mobile game programming. I have some experience programming simple and intermediate applications. Where do I get started? Please help
>>
>pycurl.error: (7, "Can't complete SOCKS5 connection to 0.0.0.0:0. (1)")
can someone tell me why pycurl shits itself when trying to connect through tor?

import argparse
import pycurl
from io import BytesIO
from bs4 import BeautifulSoup
from urllib.parse import urlparse
import os

#default settings
_proxy_url = "localhost"
_proxy_port = 9050
_page_increment = 12
_follow_redirects = True
_useragent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"

def get_file(url):
buffer = BytesIO()
conn = pycurl.Curl()
conn.setopt(conn.WRITEDATA, buffer)
conn.setopt(conn.PROXY, _proxy_url)
conn.setopt(conn.PROXYPORT, _proxy_port)
conn.setopt(conn.PROXYTYPE, conn.PROXYTYPE_SOCKS5)
conn.setopt(conn.FOLLOWLOCATION, _follow_redirects)
conn.setopt(conn.USERAGENT, _useragent)
conn.setopt(conn.URL, url)
conn.perform()
rcode = conn.getinfo(conn.RESPONSE_CODE)
conn.close()
return rcode, buffer.getvalue()
>>
It's been a while since I took a comp sci class but would it be feasible to programmatically measure population density by devices connected to wifi? Would this include cases where I'm not on the same wifi network?
>>
Question

What software could I use to work on a program with someone else? As in work on the same code at the same time.
>>
>>55290518

you could use google documents to type the code up and then run it on your own machine
>>
>>55290518
>>55290539

nvm I googled this:

http://collabedit.com/
>>
Hey guys. I'm stuck on something. I'm doing a project in C++ for school and it's been a while since I used C++. My instructor provided us with headers for for the code so we have a place to start. In one header, he has two classes. They one class is friends with the other one.

Let's say the header file is named Foo.h but classes Foo and Bar are defined in the headerfile. Foo is a friend class of Bar. I need to define a constructor of Bar that is laid out in the header file. How would I do that? I tired Foo::Bar(parameters){} and Bar::Bar(parameters){} but both throw errors
>>
>>55290841
Also haven't used C++ in awhile, try with no scope, just

Bar(params)
>>
So C++17 is getting a filesystem library. That's cool I guess.
Also what's the deal with modules and why do people want them? what do they do or add?
>>
>>55290869
>no scope

Back to /v/, fucking Call of Duty faggots
>>
>>55290869
Node(Node * prev, Node * next, string category, Queue &orderQueue)


This is the constructor for the "Bar" class in my explanation before. Without scope, I get this error

error: expected ‘)’ before ‘*’ token
>>
>>55283610
Pic related wont compile because the method does not specify that it throws that throwable :^)
>>
>>55287418
Use a different approach, regex wont work. Do it lexicaly or split on space.
>>
>>55287418

[a-zA-Z0-9 ]+\s\d{2}\s\d{2}\s\d{2}
>>
Going to give .NET Core 1.0 a shot here in a bit when Update 3 finishes taking forever to install.
>>
>>55290929
it doesnt return anything dummy
>>
Windows users who use Python.

Let's say I have both Python2 and Python3, and decide to use python in command prompt.

How does it know which one to use, if they're both called python.exe?
>>
>>55291325
The one that is specified sooner inside PATH
>>
>>55291325
i don't know shit about the command prompt but i would hope it (the command prompt) would throw an error

name the py3 binary python3.exe
>>
>>55291452
So I can't use both Python27 and 35 in cmd?

>>55291453
>ame the py3 binary python3.exe
Yeah, that's what I'm going to do, so I can just type 'python3 myscript.py'. I just hope it won't cause problems
>>
>>55291325
>>55291453
>>55291462
also see the second answer: http://stackoverflow.com/questions/18058389/how-to-switch-between-python-2-7-to-python-3-from-command-line
>>
>>55291453
The command prompt wont throw an error it will execute what is first in path
>>
Do you guys topcoder?
>>
>>55291462
Not on windows, rename 3.5 as just python.exe and 2.7 as python27.exe, thats how its done on Linux
>>
>>55290179
replace localhost with 127.0.0.1
>>
>>55291481
>>55291464
one more question.

What about pip?

do I have to use pip3 or something? else how can it install python3 dependencies to the right location
>>
>>55291473
Hadn't heard of it before. Looks like a combination of a freelance site and a coding challenge site. Do you have any experience with it? It looks relatively new.
>>
>>55287418
memes1.*?(\d+)\s(\d+)\s(\d+)
because .* is "greedy" quantifier, unlike .*?
>>
>>55291224
what do you mean? this is the constructor for the Node class. if a normal header file scenerio, it would be Node::Node(parameters){} and then define what you would do with the parameters
>>
File: slopecode.jpg (167 KB, 1578x891) Image search: [Google]
slopecode.jpg
167 KB, 1578x891
How come my printf slope is printing zero every time?
>>
>>55291705
I've tried to get started with practice problems on it but couldn't make it work in a non-in-browser-coding setup.

I'm normally using code_eval and exercism, and wanted to get into harder challenges with topcoder.

Their corporate vibe is pretty off-putting though.
>>
>>55291820
I had a bad experience with code_eval because their C/C++ environment is shit, although I've heard pretty much all the other env's are okay. How is exercism? I'm a complete newbie to coding, pretty much only know C/C++, and I looked at the requirements for passing their C++ challenges and was too lazy to install/learn Boost. To be honest, I don't mind the corporate vibe if it means I'm getting paid, but from the few challenges I looked at, it's rare for even third place to get paid.
>>
What are some good beginner-level projects to make while learning? Every book etc seems to just show you correct code and hope that you apply it to something you're doing, but I don't have anything that I'm doing. I don't have anything I NEED to make and it really kills my motivation.

Also, what's a decent way to build some sort of portfolio that I can use to trick someone into hiring me eventually? From what I understand fixing opensource shit is a good start but that sounds like something where I'd need to be fairly proficient in the first place to even attempt it.
>>
>>55291802
what is wrong with that awful font
>>
>>55290518
you could use notepad++
>>
>>55292086
https://better-dpt-roll.github.io/
>>
>watch 3 hour video on creating a program.
>Follow everything perfectly
>Time to compile
>121234 errors
>error c23225345 cannot redefine function defined in winsdfarfafdsa.h
>spend another 2 hours watching video again looking for mistake made
>still cant find it
>slowly rebuild and test compile line by line
>video put a const in a vector
Its shit like this that annoys me about programming.
>>
>>55292222
this is why you test your code every 20 min or so. preferably more often. You brought this onto your self for having bad programming habits.

also
>mindlessly copying what someone did without checking to see if it makes sense
>>
>>55291802
w h a t ' s u p w i t h t h e s p a c i n g t h i n k o f t h e s c r e e n r e a l e s t a t e y o u ' r e d e s t r o y i n g
>>
>>55291802

How the fuck do you read this? Holy shit it looks like I have dyslexia.
>>
>>55291802
two different slope variables. the one you are printing is never assigned a value
>>
Why is programming so hard?
>>
>>55291462
virtualenv was designed for this
>>
>>55283610
https://www.youtube.com/watch?v=csyL9EC0S0c
>/dpt/ explained in a single video
>>
>>55292278
Its like youve never made a program. It requires a lot of reworking a code so that you can even compile an incomplete program.
Your green text is clear projection so Ill ignore that.
>>
>>55292531
programming is shitt it's a waste of time and you never will make any useful apps
>>
>>55292555
It's like you've never heard of test-driven development.
>>
>>55292555

It's like you're deflecting because someone pointed out a bad practice of yours.

If you just went through all your compiler errors and fixed them you wouldn't have had to comb through a video for two hours and then gone through your code line by line.
>>
I need help comparing 3 rows of a 2d array to make sure they have unique values. written in python
>>
>>55292606
A 2d array? You mena a list of lists?
>>
>>55292624
yeah p much
>>
>>55292606
Childs play

Have an array of 1 to however large the number is the max is and then when you cycle through the 2d array of numbers have it count the number in the array and if the same number is counted twice in the array return false otherwise it is true
>>
>>55291802
you dont have a return in the calculateslope function, plus youre not assigning the slope declared in main to the function call.

the way to fix it would be:
line 29: slope = calculate...
line 36: return double...
>>
>>55292655
thanks homie
>>
>>55292655
Nice space complexity, it's simpler to use a hashmap (or dictionaries as they call them in python) and checking if values are already in the map, if the value is not you add it to the map, otherwise your return false.
>>
>>55290841
>Foo::Bar(parameters){}
I'm sorry, but that's really stupid.

>>55290929
This error makes me think Node isn't defined.
>>
>>55292703
Another solution both are good
>>
so right now I have some python code that looks like
list = [a,b,c,d,e]

for i in list:
if i:
#do some stuff


how do I add an else condition to catch if no elements in the list evaluate to true?
>>
>>55292576
>bad practices
making it more apparent youve never made a program. Compiler errors often dont tell you where the error is. Just that something went wrong and broke a file youve never seen before and cant change.
>>
>>55292569
>following tutorial
>test driven development
sure
>>
>>55292736
you would do it just as it sounds else

another if condition to check if i in list at index 0,1,2,3 have no elements evalute to true
>>
>>55292736
for i in list:
if i:
#do stuff
else:
#do other stuff


like this
>>
>>55290539
Fucking kekerino
>>
>>55292783
>>55292778
maybe I should have been more clear here

the else should run once if no elements return true, not n times for n elements
>>
>>55292736


if i get what you mean, its stupid easy.
you can just declare a boolean and set it to false and if any of those eleements are evaluated to true it sets the boolean to true, then you check if the boolean is false after the "for" cycle
>>
>>55292736
>>55292783
actually nevermind I know what you're asking

set a boolean before that is false, in the if set it to true. after the for statement check if the boolean is still false, if it is then that's where you do your "else"
>>
>>55292736
flag = false
for i in list:
if i:
flag = true
if not flag:
pass
>>
>>55292811
that way feels unpythonic, but it works
>>
>>55292822
>unpythonic
the fuck does that mean
>>
>>55292832
It means not pythonic. In other words, it's not idiomatic for python code.
>>
>>55292822
i dont use pyhton usually but thats the only solution i can think of.
also
>unpythonic
>>
File: 1464033727551.jpg (48 KB, 604x453) Image search: [Google]
1464033727551.jpg
48 KB, 604x453
OpenGL nerds: I'd love for you to talk about your craft.

>what do you wish you knew when you were first getting started?
>what don't you like about the API?
>what tools/sdks/packages do you feel are necessary or your favorites?
>favorite books/resources?
>what do you think about vulcan?

you may answer any, all or none.
>>
>>55292736
I hope you arent asking about something as basic as
list = [a,b,c,d,e]
if list!=[]
for i in list:
if i:
#do some stuff
>>
>>55292762

>babbys first troleing
>>
>>55292822
>>55292875
I was kinda hoping for the opposite of the for... else syntax

>>> for i in a:
... if i:
... print True
... break
... else:
... print "else"
>>
>>55292889
>I only program in python
>>
>>55292850
>what do you wish you knew when you were first getting started?
How binding works. Lots of tutorials just glaze over it but once I discovered it affects it like a global state I started putting things into structs and classes and life got way easier.
>>
>>55292894
Sorry, but you arent actually explaining what you want.
I was partly trolling you because you arent explaining yourself. If the list is empty the for loop never runs. So I have no idea what the hell you are asking about.
>>
>>55292937
what he's asking for has already been answered >>55292811
>>55292822
but for some reason it's not "pyhtonic" for him
>>
>>55292850
1. That I should have completely ignored all examples given to me. I feel like this one was a special case but is worth mentioning. The professor I had was AWFULLY lazy. We're talking unused variables everywhere, inconsistent spacing/indentation/naming...I could go on. Imagine something ugly and you got it. Because I was being introduced to something completely new and foreign, I didn't immediately grasp how truly obfuscated he made his content. So, my word of advice is for when you're learning to dissect each part of the pipeline into its atomic pieces and think about them like that, then build it back up. When I did "damage control" self-exploration after the course, I learned a lot more.

2. Nothing really.

3. I like SOIL; pretty sure there's a library that includes image loading though. I like to start as bare-bones as possible and then search for libraries when a task would require a significant amount of time to implement and take away from the graphics programming. You could argue that my heuristic is shit and I'm missing out on opportunities.

4. Essential Mathematics for Games and Interactive Applications.
>inb4 gayms book
It's got a lot of good reference. I dig it.

5. Don't care for it. I'm not at that level.
>>
You are given a math Expression with N variables. Their values are given in the array Values, so that Values[0] is the value of variable 'a', Values[1] is the value of variable 'b', and so on.

The expression contains variables, brackets (( , )), binary operators (+,-,*) and unary operators (-,+,[]), where [] means square of a number (E.g. [5] = 25).

Order of priority:

Unary Operators;
Operator *;
Operators +,-;

The expression doesn't contain spaces (' ').
Your task is to return the value of the given expression.

Example

Evaluation(1, [1], "a+a") = 2;
Evaluation(2, [0,25], "[b*a]+--b") = 25;
Evaluation(3, [1,2,3], "[a]*(b+c)*(a*a+b*--+c)-c") = 32;
>>
def uniq_three(*args):
for i in args:
if not isinstance(i, list):
raise TypeError

uniq_dict = dict()

for i in args:
for e in i:
if e in uniq_dict.keys():
return False
else:
uniq_dict[e] = True
return True
>>
>>55292992
Eval 2 is 24?
>>
>>55293017
25
>>
>>55292850
Use SDL2 to get a window, then you can use opengl draw calls. I'd avoid immediate mode as it is deprecated now, you want to load your vertices into an array/vector/etc and push them to the gpu all at once and then draw.
>>
>>55292959
Well hes not completely wrong. Setting a flag here is necessary since whenever he needs to test if the for loop ran he could just test to see if the list was equal to the empty list then.
But that would require him to actually explain what hes trying to do because he could want to modify the list afterwards which means hes gonna have to set a flag.
Its annoying to try to help people who can properly explain what it is they want.
>>
>>55293013

whoops I left the old function name that doesn't represent what it does
>>
>>55293037
oh god I read it as decrement. I'm gone
>>
>>55287306
>>55289472

bump
>>
>>55292894
How about a list comprehension?
results = [do_stuff(i) for i in list if i]
if not results:
print "else"
>>
the "Dpt" irc channel is #/sicp/ on rizon ya nerds
>>
>>55290841
Inside the class declaration you need to put the constructor without a scope.

Outside of the class declare it with bar::bar(){}
>>
Best resource to learn x64 assembly? Let's say I want to write a bootable tetris clone, how do I even get started?
>>
>>55293397

AMD or Intel assembly manuals
>>
>>55283610
nice duplicate thread retard.

>>55283976
nice stale bait retard.

fuck off, i'm leaving again. you're all a bunch of retards
>>
What is the best language to start learning programming?
>>
>>55283610
>>>55280913 → →
it even has the extra arrow because you deliberately posted a duplicate, and you didn't link to here from anywhere

FUCK OFF AND DIE RETARD
>>
>>55293456
C. Anything else and you're playing yourself.
>>
>>55293456
java
>>
>>55293456
If I told you, you might steal my job. :^)
>>
>>55289374
What is K&R exercise?
>>
>>55293456
C
>>
Trying to think of a way to flexibly represent and encode store opening hours, like "open mon-fri 9-18, sat 10-13, except on dec 25 and jan 1".

The best I have come up with is using a list of cron expressions for open and for exceptions (holidays, etc)
open = ["* 9-17 * * 1-5 *", "* 10-12 * * 6 *"]
except = ["* * 25 12 * *", "* * 1 1 * *"]

That's easy to parse for machine purposes, but hard to convert from and to the natural "human" language. Also I'll need to generate SQL queries from it, and while doable, seems kind of tedious.

Ideas?
>>
>>55289374
I had to help my retarded friend with K&R several times, but mostly before that point. It didn't get much more difficult unless you're allergic to pointers.
>>
>>55292920
>>55292986
>>55293038
thanks, nerds.
>>
People say to learn programming by myself. So I'm doing it, but let me ask some stupid questions:
How do I go on creating dll and why should I use/create it? I don't remember seeing about it besides the basics(what is dll) on any programming book I used.
What about software update? Suppose I released a game on steam, there're some bugs I got fix, how do I fix it that the end user doesn't to have to re-download the whole game and just what I changed?
How do I go from the .exe file to an installer package that install my software in another users computer? Do I use libraries for this or there are softwares for it?
I believe this one is more specific: when doing reverse engeneering and I want to add my code(or modifications I did on it, like fixing some old game), is on the right dll that I going to hook my code or change it?
>>
>>55293747
>>>/g/sqt
>>
File: Selection_002.png (442 KB, 569x550) Image search: [Google]
Selection_002.png
442 KB, 569x550
What's the best way(read:IDE) to program C++ on linux since there's no Visual Studio?
>>
>>55293526
Sorry for not explaining better.

"K&R" is shorthand for brian Kernighan and dennis Ritchie, the authors of the book titled "The C Programming Language". It's treated as a sort of "holy book" among older C programmers

It's more or less a very short manual that describes how to use C. It has examples & exercises throughout because coding is the best way to learn.
>>
Hey guys, can I bother you for a minute, I don't want to create a thread just for myself.
So I barely started HTML to see if I could get into programming because I want to change careers and I think I can do that.

I live in a small city and the only available formation choice I have at my age is a 3 month web dev formation.
But I read somewhere that web dev was not a good choice these days.
Do you think it's still "easy" to find work in this area? Otherwise, what would you recommand looking for/learning? (probably Java but I'll start doing that in my own time anyway)
>>
>>55293776
emacs or vim
>>
>>55293776

A tiling window manager, vim, gcc
>>
>>55293783
Ah yeah, I am aware of that book. I am shit at keeping up with author names.
>>
>>55293776
Most people don't use an IDE, just and editor + build tools (e.g. autotools). CLion could be an option, if you insist on going the IDE way.
>>
>>55293776
If you want a legit IDE-esque experience with as much functionality as Visual Studio, then I think Emacs (with a lot of configuring) is as close as you can get.

Here's a relevant guide for using Emacs to develop C/C++: http://tuhdo.github.io/c-ide.html

You're gonna have to learn how to use Emacs tho, and that has the potential to consume you forever, so beware.
>>
Writing a markdown parser.
>>
>>55293860
In which language?
>>
>>55293884
In a unpopular language.
>>
>>55293908
Java?
>>
File: 7-ycDkf0.jpg (24 KB, 400x400) Image search: [Google]
7-ycDkf0.jpg
24 KB, 400x400
>>55291802
>>
>>55293935
java is literally the most popular programming language you fucking mong

http://www.tiobe.com/tiobe_index
>>
>>55293908
hopefully it is Ocaml
>>
>>55293953
Writing one in OCaml actually sounds like it would be fun.
>>
>>55293747
1. The dll basically acts like the repository for all code pertinent to a particular service. If you make a dll for "Cody's Cool Code Tricks", you can apply those tricks to the services and tasks the already linked dll's have. It's basically a way of saying Custom Toolset. As for a reason? It's always good to know how to customize things but it's not crucial.

2. Software Updates can be managed by making sure you have a way to control version disparities. Git helps but ultimately "introduces" you to a system that applies only on git and that many people will misuse in your time there. You could just make a list of classes that need to be changed and apply the changes, then upload the changed classes to the game directory on their device and blammo, you're done. Having a new set of workers apply those patches is usually what makes for broken games. Don't do it! Or at least make it simple!

3. For installing, you basically create a program that uses the operating system's call stack to check for certain events to occur, things like dialog window waits with a flag of ACCEPT and then have it execute the program with those particular parameters and flags in place. The installation is a one time thing so it's best to do that right.

4. When you want to make changes, you basically overwrite their dll OR if its a one time change you apply the changes after the original values take place. This is what hex editors and cheat programs do. They find the address containing the specific value they are looking for and then change the value progressively as they take notes of all the possible values within that address space. The dll usually has no set way to allocate space in memory, so you won't do anything to the dll itself unless you want a very specific version running on only your machine.

Did that help?
>>
>>55291802
why are you passing in the arrays with indexes? Just pass in the arrays as a reference normally
>>
>>55293776
just use a text editor that let's you plugin auto-complete and has syntax highlighting. After that you just run it through g++ and you're set.

Anymore than that and you yourself are either too unorganized or really have no clue about the environment you're working on. Not saying you should give up, though, but at least rig up something of an intuitive understanding on the matter and apply it. Aside from what I've said, Visual Studio just becomes a tiling windows manager that has a butt ton of macros and DB Wizard.
>>
>>55294031
Thank you anon, you did help me.
>>
>>55293789
Think a little bigger than this. HTML is basically formatting text using a syntax that is understood by the Internet Browser experience. That means you'll be selling your content much more than the coding. With HTML you get CSS and JavaScript ( different from Java ) which really just expound on the content part ( CSS creates a templates for the different kinds of content and divisions of content, Javascript lets you create functions that seek out changes/conditions and then change the content or create new content ).

If that's what you want to do, then make some good stuff using that 3 month course and continue learning. At least the course will help you with job placement. It shouldn't be difficult to find work but "competing" within the field is difficult due to the current "push for females" agenda and the general difficulty for writers to get paid for writing.
From then on, though, it's going to be the difference between a letter and a number. Where you had content, you now have processes, and those processes will be defined using a specific syntax that accounts for a specific build up of ideas that you have created as uniform.

If you made a webpage about bananas, and did the yellow css, and had the banana peel when the image was clicked on, which then turned the page to a white with yellow margins you could use a program like Java to scan over the webpage experience at certain points in the process and create a program that logged all the information in a specific filesystem that you created in the programming language of your choice.

It will be easy to find people to help with your newfound abilities, yes, but it is not up to anyone nor any trend to dictate the level of demand that might exist for this or any kind of tech developer's job. Sometimes it's based on location, where maybe a new tech revolution is started or a gentrification process is commencing, and other times it's based on how well a company can communicate its needs.
>>
>>55294007
no, markdown grammar sucks dick. I ended up writing like half a markdown parser with OCaml but I didn't feel like adding the remaining features because there's just a ton of weird shit about md
>>
>>55293776
Qt Creator is great and has excellent CMake support.
>>
>>55294329
>CMake
>build system so shitty and complex that you need an IDE to operate it
>>
>>55294284
>no, markdown grammar sucks dick.
Obviously, their isn't even a real spec for the original implementation and a lot of ambiguity. That is why I am following http://commonmark.org/ for my implementation. I am almost done.
>>
>>55293949
How the fuck is assembly that popular
>>
>>55294348
Nigga what? If you think CMake is complex, I pity you. You don't remotely need an IDE for it, support is just a plus. If you're doing anything remotely serious, it should be portable.
>>
>>55294348
>>55294426


I have no clue what either of you are getting at
>>
>>55294396
apparently they measure by lines of code. for example, an application takes ~10x lines in assembly instead of C and there are ~60 C programs for every assembly one, so (10/60) means assembly will be only 1/6 as "popular" (hence 12% vs 2%)
>>55294426
lol
>>55294360
ah I see. it seems to get trickier when trying to target some or the weird edge cases or vendor-extensions to markdown (although I gave up before doing any of that shit)
>>
built a lambda calculus repl in python. No lazy evals yet. Doing those this week after Beta/eta stuff is done.
https://github.com/CodeGrimoire/ChurchREPL
https://pypi.python.org/pypi/churchrepl

please note I use this as a teaching tool so the README maybe could be called KILLME.
>>
File: TrudeauPiledrive.jpg (133 KB, 711x407) Image search: [Google]
TrudeauPiledrive.jpg
133 KB, 711x407
>>55293949
>>55294396
>Erlang over haskell
>>
File: 1466987511475.png (447 KB, 1089x793) Image search: [Google]
1466987511475.png
447 KB, 1089x793
>>55294396
>Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings.
Something within the last year has made assembly language more popular. The only thing I can think of is probably WebAssembly which was revealed last year.

>>55294460
ya, the weird edge cases are more thought about and described in the commonmark spec. Not sure if I will add any extensions though.
>>
>>55294508
>The only thing I can think of is probably WebAssembly which was revealed last year.
Goddammit, the one area I thought I was safe from webdevs
>>
>>55294396
Compiler optimization.

When you compile to assembly and open it up to take a look you'll be like WTF is going on shit is crazy like 32bit register inits in 64bit to save a byte, and obscurred code to help with branch prediction.

Lot's of people are paid to go through that code and make it even better than what the compiler produces though that list claims that "popular search engines" are used to help with results which can mean lot's of people are asking questions about assembly.
>>
>>55294560
That doesn't explain why it jumped 11 places in a year.
>>
>>55294573
Lot's of people doing optimizations lately, especially to squeeze out their cloud bullshit resources, or maybe just more people asked questions about machine code because not a lot of people know it.
>>
>>55294573
maybe web asm is really a thing this time around?
>>
>>55294593
Definitely the latter.
Micro-optimizing your assembly code isn't going to cause noticeable performance increases unless the target application an embedded device that is already very slow.
You can almost always write C code that produces nearly optimal assembly.
The increase has got to be because of web assembly
>>
>>55294493
Very enterprise, pajeet.
>>
>>55294655
How am I pajeet? I thouogh lambda calculus was the cat's meow this week. really lost here
>>
>>55294730
LC isn't pajeet, but your massive python project is. I don't know what the purpose of half of your functions are, and the root directory contains 10 or so set up files when all I would like to do is just run one command.
>>
>>55294753
fair enough. what should I change. I am looking for help in that matter. I'm sure there are certain doc strings that could be redone and certain functionality that could be done more elegantly. Any suggestions?
>>
God I hate the web. It's so bad. Every website I go to has a million external scripts and they're practically all malicious. I wish we could round up and kill/reeducate webdevs. They're so filthy. At least with real software development you can cut off the infected limbs. With the web they can't be avoided because there's nothing of worth here unless it's popular.

We need a cleansing.
>>
A realistic 3D cheese pizza mmorpg, looking for decent 3d loli and shota models l0l
>>
>>55294799
>>>/vg/agdg
has an OP.
But there's also this:
http://www.spriters-resource.com/
this:
http://www.models-resource.com/
and this:
http://www.textures-resource.com/
>>
>>55294778
The guy is a faggot, don't bother
>>
>>55294778
Nothing dude it's a nice toy project that shows you know how to build a foundation for larger projects.
>>
File: p4j33t5LT4sX64.jpg (49 KB, 128x165) Image search: [Google]
p4j33t5LT4sX64.jpg
49 KB, 128x165
>>55294778
>I don't know what the purpose of half of your functions are, and the root directory contains 10 or so set up files when all I would like to do is just run one command.

>I've never seen anything more than my homework assignments
>>
>>55294824
Well, even then, I happen to agree that there is a bit of bloat. Do you have any suggestions or insights or ideas on how this could be done better?
>>
>>55293776
Code Blocks is cross platform
>>
>>55294831
>>I've never seen anything more than my homework assignments
LOLOLOOL #REKT
>>
>>55287055
>R
>three different ways to do any single task

by the time you get to parse other people's code, it'll bite you in the ass.
>>
>>55294831
Not that guy but really. Whatever's being done here is overkill. This should be a single file of C code and (hopefully not) a small directory of include files.
There should be a single main file which you point at your C compiler and there's a program executable generated.
And that's that.

That's how a sane person writes programs.
>>
>>55294812
nice, thanks bby x
>>
>>55294878
I'd love to see a single C file that does this! Seriously that'd be cool if it could accomplish the same Idea more succinctly.
>>
>>55294902
Well there's nothing a single C file can't do. So yeah.
Just rewrite your project.
>>
>>55294918
Will do. one question. using pure c what is the best way (or at least something decent) to represent a recursive descent parser with semantic actions? It need not necessarily be sans library if the library is common
>>
>>55294918
Be honest, have you ever worked on something with more than 1000 LOC?

>>55294902
>>55294950
This kind of passive aggressiveness makes you look bad. Your project is fine, don't be so sensitive.
>>
>>55294950
>what is the best way
Well I don't know. I just know how I write them.
Most implementations are fine. I'd recommend you write your API calling code first (or at least a decent chunk) and then just implement the parser according to that spec.

Tends to work out fine.
>>55294973
Yes of course.
>passive aggressive
Why do you say that? It's a reasonable to ask if I have any tips now that he's decided to reimplement it. It's not like he has to do any major work to do that even. He already has all the logic down. Replicating the program as C isn't all that hard.
>>
>>55294973
>This kind of passive aggressiveness makes you look bad. Your project is fine, don't be so sensitive.
fair enough. But you must admit coyness could be seen as freshness in the face of the brazen overconfidence that /g/ loves.
>>
>>55294878
Maybe a single file is a bit much, but the fact that there are more setup configuration files than actual source files, and it isn't even a compiled language
>>
>>55295033
>a single file
Point is it doesn't matter how many files there are and a single file is superior unless there's a clear boundary like if there's a library you're using.
If you have a program you've written and there's no library part you're reusing making it a single file is easier to manage. Sure, having as many files as you want is fine too. It's not like people can't search in multiple files.
But when you look at something like
https://github.com/nothings/stb/blob/master/stb_c_lexer.h
Should this be split into multiple files? Sure that's sub <1k lines.
https://github.com/nothings/stb/blob/master/stb_image.h
What about this?
There's no gain from splitting stuff.
>>
How should I structure my database table?
It's meant to store anime titles from anidb in multiple languages and multiple formats i.e.
>Berserk
>ベルセルク
Which both refer to the same show, with the same anidb id.

I'm thinking I should have something like:
id | anidb_id | title | language

and the above example would take up two rows. It does feel sort of silly to have multiple rows with the same anidb_id, but it makes searching a lot simpler.
>>
>>55295313
I think you should also have a subgroup (gg, underwater, etc) column, resolution, and type of release (tv rip, BD, DVD)
That way you can clean the anime episode name
>>
>>55293776
Just use CMake, its better than autotools and it can generate makefiles for almost all C compilers. No IDE needed
>>
>>55293776
>best way
Doesn't matter. They're all bad.
Just get a text editor that with a C++ linter.

Debugging on Linux sucks. But if you really want to try it:
https://www.gnu.org/software/ddd/

I'd say you should just wait maybe 10 years for it to become decent before you try.
>>
File: aaaa.png (15 KB, 754x426) Image search: [Google]
aaaa.png
15 KB, 754x426
>>55295400
Oh, this was just a table to store the series titles. Already have another table storing most of that other stuff.
It's going to be a huge fucking pain figuring out the subgroup from the title. I think anidb has some API to help with it at least.
>>
Ive been going through the implementation of a very poor game engine to learn opengl.
Buts its dawned on me that I could use most of the source code and with some tweaking use it for gui programs.
How bad of an idea is this.
>>
>>55295635
Unity3d's entire editor is one self-implemented OpenGL context. Depends on what your goals are.
>>
>>55295667
I hate QT and want gui programs. Being able to put textures, font, and audio where and when I want seems very adequate especially since opengl means its cross platform as long as I dont use windows specific stuff.
>>
>>55295681
You should not be using opengl for a gui library. If you are having trouble with QT, writing your own will only cause more problems
>>
File: 1466505014638.jpg (181 KB, 1020x612) Image search: [Google]
1466505014638.jpg
181 KB, 1020x612
>>>/pol/79005197
CTRL + F "OSGTP"
>no results
>mfw

>>55294730
Why is your lambda calculus implementation so verbose?
>>
>>55287358
See firewall punching
>>
What's the best compiler for C , /g/?

I'm using Cmake because i like Clion right now, but since i use some syntax older than c11 it's kind of stressing me out. Even with the proper flags Cmake would still give me trouble

Also if you guys know some books/resources for them i would appreciate it
>>
>>55295762
gcc
>>
>>55295762
cmake isn't a compiler, it's a build system.
Is your question actually about compilers or build systems?
>>
>>55295762
clang is a good compiler.

But you're talking build systems. Is that really what you want? I find build systems to be cumbersome to use because they're not really made for the kind of projects I work on. Making a bash script to build is good enough.
>>
>>55295724
Not sure. I'm building it more as a way to learn the process of writing python code better. As I have said previously. any suggestions are welcome.
Also, I don't do much but one project at a time so expect any suggestions to be implemented. (eventually) if you care, that is.
>>
>>55295762
>>55295793
He's right, unless you're compiling cross-platform there is not much to be gained from cmake. A handwritten makefile should suffice for most small projects.
>>
>>55295717
Why is opengl bad for that. Im not having trouble with QT, I just dont like it. I dont feel like it gives me the freedom I want.
>>
>>55295811
dear imgui
imgui is amazing.
And since you wanted freedom. Imgui is exactly what you want.
>>
>>55295793
>Making a bash script to build is good enough
Why don't you just use Makefiles? They take like a minute to write for simple/small projects, and you can still automatically generate whatever pretty easily.
>>
>>55295820
Because not every system does make.
Like windows.
But yeah I could use them obviously. Why would I care though.
>>
>>55295828
And not every system is going to support your shell scripts.
I don't get how that would be an argument for shell scripts over makefiles.
>>
>>55295817
>imgui
Ill look into that but whats bad about opengl for guis
>>
>>55295828
>Like windows

If you are using anything other than MinGW on windows kys
>>
>>55295521
ah ok
yea I think you could regex so that it takes the first word in the first enclosed []
so even
>Dragon Ball Super - 049 - A Message From the Future - Goku Black Invades! [DragonTeam [C48933BA].mkv
would work

then maybe even compare it to known subgroups
>>
>>55295820
as a project starts to grow i honestly prefer a simple bash script over having to hack makefiles to do what you want (run tests, generate docs, run preprocessor etc)
>>
>>55295840
Too much overhead and not worth the hassle, you won't see any performance benefits.
>>
>>55295860
that is
>[DragonTeam]
>>
>>55295835
Because it's what I've been using? Does it matter? Why should I change everything I do for no reason whatsoever?
>>55295844
I use cygwin but if I want to compile on another computer I'd rather not install that stuff. When all I had to do was have a batchfile.
>>55295840
Nothing really. But it's a bit cumbersome to write your own GUI library. You're not gonna find any library which doesn't use directx or opengl though, obviously. imgui is easier and since it's an immediemate mode graphical user interface it's probably just what you wanted. Maybe look at an introduction to it to understand it. It'd at least be be a nice reference for your own gui library though.
>>
>>55295876
mingw32-make
>>
>>55295887
Yeah ok I'l install that instead of using native tools. Sure anon I'l go do that.
No I won't because there's no fucking reason. Fuck off.

You're more disgusting than people who ask others to change languages.
>>
>>55295840
imgui does exactly that, it uses directx or opengl to draw menus and shit
which is great if you are making a game/engine, nut so good if you only want it for GUI
you'll have to write your own implementations though, or atleast rewrite the existing examples
>>
>>55295876
>Because it's what I've been using? Does it matter? Why should I change everything I do for no reason whatsoever?
I don't care about what you're using for your projects, but using a Makefile is a lot better, as it don't constantly rebuild shit unnecessarily when you want to compile something.
>>
How would I go about simulating an integrated circuit at the analog level? I want to make my optimization algorithm design me some IC's.
>>
>>55295907
My compile-times are always less than 5 seconds because I manage them. I don't care beyond that.

I'm not that experienced using make obviously (because I don't constantly use it). But it has been rather slow the instances I've had to build others projects.

If that were to be an issue I'd definitively have a tangible reason not to use it.
>>
>>55295927
>But it has been rather slow the instances I've had to build others projects
Don't confuse make with automake/autoconf.
Makefiles are very fast, and can build things in parallel.
>>
>>55295773
>>55295793
>>55295808


Yeah i forgot , well that only shows how much of a retard I am

I wanted to ask about build systems.

In the future i would like to have my things cross-platform but now i just want something with decent support for c89/c99 just to understand some

I tried making my own makefiles or using Anjuta to generate them(From the gnome tutorials) , but it seems like a little bit too much stress specially if i'm using multiple source files. If they are better performance-wise i would use them
>>
i wish they would rewrite cmake to be more general instead of only working for C/C++
it wouldn't have to be fully featured either, just simple stuff like "run this executable", "copy this folder", "if you can find it, run this program and generate docs"

we really need a new GOOD build system
cmake and gradle are both great, but unfortunately langauge specific
>>
>>55295895
>using native tools
>using cygwin/mingw over msvc?
>>
>>55295860
I thought that would work as well, but it only works for 80 - 90% of titles, but a lot of them are just flat out retarded.
i.e.
>Schwarzesmarken - 11 [x265] [1080p] [MP4] [[OptimusPr1me]]
>[AnimeRG] Terra Formars Revenge - 01 [720p] [HEVC] [TheBiscuitMan]
There is no fucking standard for posting anime. Most of the audio/subtitle tracks are labelled as "English" when they are Japanese only. Some encoders just fuck around and put retarded shit like "Newari" or "Slave". It's a god damn mess.
>>
>>55295871
For a basic program I wouldnt expect there to be any performance issues no matter what.
>>55295876
But thats kinda the point. I already have a program for drawing and transforming sprites. Seems perfect for guis though with a little tweaking
>>
>>55296008
No I do use msvc.
I'm obviously gonna have to install the compiler on the platform if it's not already there.
>>
>>55295961
try
set_property(TARGET tgt PROPERTY C_STANDARD 99)
>>
>>55296015
Yeah. GUI libraries usually handle mouse/keyboard input aswell though. But that's easy to deal with.
>>
>>55296031
thanks
>>
Well shit, my fuck up of a thread took off.
>>
>>55290986
Actually, it apparently does work, since it's from a library named 'jawampa' that I'm adding some features to.
>>
is there an ide-like file browser for emacs?
preferably using the mouse
a lot of stuff is better in cli, file browsing is not not one of them
>>
>>55296487
Neotree maybe? It's on the side like an IDE. Or just dired, it's very usable with the keyboard. I never tried neotree.
>>
File: 1451398982515.jpg (377 KB, 1900x1000) Image search: [Google]
1451398982515.jpg
377 KB, 1900x1000
>>55296487
>preferably using the mouse
>a lot of stuff is better in cli, file browsing is not not one of them
Sry I got that backward, so that means you've tried dired, so try neotree. Also Ace is a good counterargument to the moose thing IMHO.
>>
Hey /g/

I'm trying to understand LazySelect, I'll probably have a couple questions but first- rank refers to the position an element would have, given the array is sorted, correct? e.g.in {2,15,4,7}, 15 has rank 4, right?
>>
when parsing languages, how do you resolve stuff like "intVariable" which is an identifier but also matches "int" keyword
do you just continue parsing until you hit a whitespace or something?
>>
>>55297543
Parse keywords as identifiers, and then check afterwards to see if they match a keyword.
>>
>>55297543
A whitespace character, or a non-alphanumerical character. We have this concept of tokens, that is elenents of the language that you could parse without knowing about their relationship to each other, and whose order determine tge meaning of the sentence of which they are the words, yeah. A language that doesn't separate those things is just harder to predict and parse, don't you think?
>>
>>55297706
>>
>>55291614
tried it, got the same results senpai
>>
>>55297715
you don't
>>
>>55297715
isn't this just a reference?
>>
What is the algorithm to interleave a matrix of ints with variable size? (They're not stored consecutively, but first the first bytes, then the second bytes, so goes on)

Example:
0x01, 0x02, 0xA, 0xB

To:
0x01, 0xA, 0x02, 0xB
>>
>>55297856
deinterleave*
>>
 select a + 1
from x
where a > 1;


Assume 'a' gets loaded (LLVM Instruction) 2 times in the 'select' block and once in 'where' block. For an optimization I only want to load it once and store it in an appropiate structure like an Map (seperation of llvm ir-code and c level code) and load it in the other block. What other optimizations do you recommend?
>>
>>55295944
>Makefiles are very fast, and can build things in parallel.
http://voices.canonical.com/jussi.pakkanen/2012/10/01/building-cc-what-really-happens-and-why-does-it-take-so-long/
>>
>>55298045
>quotes statement about make
>blog post about autotools
are you fucking retarded?
>>
>>55297735
>>55297782
constexpr void *const ptr = foo;


compiles fine, i just kind find any documentation about it, the docs are autistic as shit and don't even mention this, at least not explicitly
>>
>>55298045
>There are alternatives to Make. The fastest of them is Ninja
There is no way for anything to be faster than make, simply because make does the absolute minimum: stat, is the date newer? run command.
That idiot confuses make with other abominations (autotools/cmake) built on top of make.
>>
>>55298100
>just kind find
just can't find
>>
>>55298100
and it seems i can write to the pointed-to buffer despite the constexpr at the start, the compiler doesn't complain
>>
I just passed Assembly Language with an A+, however, I'm not really sure if I'll eventually use it because I was told different brands of CPU use different instructions, is this true?
>>
daniel what the fuck
try
{
....
}
catch (Exception ex) { throw ex; }
Thread replies: 255
Thread images: 18

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.