[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: 29
File: octagonecologyst.jpg (310 KB, 900x900) Image search: [Google]
octagonecologyst.jpg
310 KB, 900x900
Previous thread: >>53549267

What are you working on, /g/?
>>
Java is a real good programming language you are bad programmer if you think otherwise
>>
>>53558631
this
>>
>>53558609
markdown->latex converter
>>
>>53558631
No.

Source: I have worked with Java and Scala for 5 years. Scala is better in almost every way.
>>
File: 1457548855279.jpg (183 KB, 640x480) Image search: [Google]
1457548855279.jpg
183 KB, 640x480
Working on my file server in Go.
>inb4 muh generic
>inb4 muh do while
>>
>>53558652
No you are so wrong
>>
>>53558656
Looping is deprecated.
>>
>>53558652
>optional semicolons
>fedoratipping FPshit
there is no reason why scala is better other than if you're a hipster who thinks it's better because it's not named java
>>
>>53558631
you are bad grammar
>>
>>53558631
No

Source: I have worked on an actual Java project.
>>
>>53558665
Okay: why is Java better than Scala?
>>
>>53558609
I'm currently working on my epic FizzBuzz that pings google with each line and a fancy GUI written in visual basic
>>
>>53558670
Blub paradox in action
>>
>>53558609
I'm working on fooling google.
>>
>>53558670
i bet you think programming is about syntax, too!

ahhahahahhhaha
>>
>>53558729
Are you moot?
>>
File: convnet.jpg (163 KB, 1255x601) Image search: [Google]
convnet.jpg
163 KB, 1255x601
ML >>> programming
>>
>>53558744
ML === overrated meme
>>
>>53558742
Nah, just an above average programmer trying to game the system.
>>
>>53558773
So you're the one deliberately mistyping the captcha.
>>
File: sample_results.jpg (431 KB, 1853x950) Image search: [Google]
sample_results.jpg
431 KB, 1853x950
>>53558765
You wouldn't be able to write picrelated by hand even if you had 10 years of free time. ML literally makes impossible possible.
>>
>>53558794
Nope. I'm fucking Google's ranking algo, basically.
>>
>>53558844
and what do you plan on using it for? i'm sure it has its uses but it's not like it solves fucking everything
>>
>>53558868
How? You know you can't mess with the machine. They know all the tricks.
>>
>>53558911
And even if you do, they'll just patch it out whenever, ruining your business model.
>>
>>53558868
Good luck kid

Smarter people than you have tried and failed
>>
>>53558844
Source?
>>
>>53558880
I'm using it for computer vision and natural language processing. Even simple fully connected networks give ok-ish results.

I'd like to implement an RNN and picrelated though. It would look like magic to me if I didn't knew how it works.

>but it's not like it solves fucking everything
Not yet. But strong reinforcement learning will solve everything you give it.
It already solves some hard tasks (see. http://arxiv.org/abs/1602.01783 )
>>
>>53558911
They are way more stupid than they are PRing themselves. There are tons of tricks that can be used to trick ranking engine.

Low frequency queries.
>>
>>53558944
https://github.com/abhshkdz/neural-vqa
>>
>>53559027
I'm sure you can boost up your rank, but you'll never reach top #100 this way before they catch you
>>
>>53558880
Example idea:
1) use some face data to train a face classifier
2) use it to get 100k selfies from face book or instagram , also scrape comments
3) train neuraltalk on face+comment dataset
4) now you have a network that can comment on any human face photo you give it
>>
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)


why is this necessary
>>
>>53559106
I routinely achieve top10 on low freq queries. The main success metric is unique IPS/day on my sites.

>catch me
Good luck Mr google, I'll be back with 100 new sites in a couple of days (^:
>>
>>53559203
it's not

what are you doing?
>>
>>53559231
You should make money off that shit. Redirect normies search for porn on Google to your ad riddled site.
>>
>>53558993
>vegetables at the fruit stand
needs work
>>
>>53559251
Kek. That's what I'm trying to do. We'll see how it goes.
>>
>>53559247
#define FOO 0.123
#define TOSTRING(x) #x
const char *foo = "foo " TOSTRING(FOO) " bar";


i haven't checked if this works, maybe it does

i got the double wrap thing from here http://stackoverflow.com/questions/240353/convert-a-preprocessor-token-to-a-string
>>
>>53559267
So now tell us your magic.
>>
>>53559231
webcancer being cancerous as usual
>>
Hi guys,

this is more of a proof of concept/pseudo code question rather than any general question, and I would greatly appreciate any advice.

Say supposing I was designing a console based script, which had a list of information stored, and this information belonged to three different people, bob, alice and eve.

Say for instance that I wanted to list information belonging to only one person, because it would breach user's privacy by outputting every user's information.

So my real question is this, would it be possible to implement a python script, which firstly retrieved information, but then prompted input from the user to specify either bob, eve or alice, and then displayed the information accordingly.

My concern is basically about hooking the user output to matching the users, should I watch out for anything or should this be simple enough?

It should just be a case out, retrieve input, then if statement to match the names, then a catch exception is misspelled, and a break to prevent a loop?
>>
>>53559252
Its mistakes are quite human-like. They should rough out if you give 10x more data. Aldo: another cool ml demo: https://m.youtube.com/watch?v=za8DzsHUgbw
>>
>>53559332
>Its mistakes are quite human-like. They should rough out if you give 10x more data.
keep dreaming
>>
>>53559306
No mercy for the largest megacorp in the world, anon.
BTW I promise I stop being a bad goy if you enable basic income. But you won't (^:
>>
>>53559359
It will happen when full automation takes over don't worry guys robots will be able to program themselves in the near future
>>
>>53559293
Nothing really. Advanced rich content generation, mobile ready pages, massive number of sites.

Lots of technical problems were solved by myself to make it all work.
>>
>>53559351
We'll get that data and see, anon. ML is empirical science.
>>
File: memes.jpg (123 KB, 648x729) Image search: [Google]
memes.jpg
123 KB, 648x729
>>53558656
>>
>>53559372
I hope, I hope.
>>
File: 1457550501121-3.gif (2 MB, 612x639) Image search: [Google]
1457550501121-3.gif
2 MB, 612x639
>>53559407
Nice one. I've been gathering megumin pics from cripple chan.
>>
>>53559380
Also a bit of cloaking (^:
>>
>>53559280
nope, definitely need the double wrap
>>
>>53559446
so what's her deal?
she makes things go boom?
>>
>>53559554
That's about it.
>>
why the fuck in C++ you need to put an extra space after a declaration??


vector<vector<int> > items; // everything OK

And
vector<vector<int>> items; // ERROR

error:
error: ‘>>’ should be ‘> >’ within a nested template argument list
>>
>>53559831
Because the lexer will recognise >> as a right bitwise shift token.
But really you should just stop using that shitty meme-lang.
>>
>>53559831
Because otherwise it would lex the
>>
as a right shift.

Yes, it's retarded.
>>
what is good code
>>
>>53559863
hasklel
>>
>>53559850
>>53559849
hmm interesting
thanks
>>
>>53559831
what compiler are you using and what standard? i never get that error.
>>
>>53559903
$ g++ -v
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)


yeah its shit
>>
>>53559831
Use a c++11 compiler.
>>
>>53559831
>C++
>>
>>53559321
Please help
>>
>>53560011
>virgin NEET
>>
why is programming so fucking hard
>>
>>53560058
Because the tools are not very good. Those that approach utility are dismissed as 'meme languages'
>>
>>53560058
It's not for everybody, that being said programmers are terrible at a lot of things like socializing
>>
File: animation3.webm (389 KB, 397x453) Image search: [Google]
animation3.webm
389 KB, 397x453
>>53558609
Let there be light!
>>
>when your struct has "seed" and "speed"
so much for readability...
>>
>>53560158
you need some ambient light nigga

or try half lambert
>>
>>53560166
use synonyms.

synonyms of seed: berrystar,cornstar,cell,germ....
>>
>>53560185
i think i'll go with "step" instead of speed
>>
>>53560174
Whoops, I'll add that next. I won't be able to post again for a few days so who cares! Everybody forget what I just did ok?
>>
I'm thinking about getting into FP

which language should I use and why?
>>
File: Kornheiser_Why.jpg (73 KB, 600x1040) Image search: [Google]
Kornheiser_Why.jpg
73 KB, 600x1040
>>53560216
>I'm thinking about getting into FP
>>
>>53560216
haskell
because memes
>>
>>53560216
Ocaml
>>
>>53560248
>>53560241
googling gives me a lot of people saying scheme is a good first fp language, why should I use haskell or ocaml instead?
>>
Writing a compiler for Java bytecode.

Biggest problem I'm facing a few problems right now. Mostly to do with stack verification, class linking and maintaining jump integrity.

For example, if you have the snippet:

goto F23+2
// ...
F23 {
nop
nop
aload_1
}

If you inserted an instruction before the aload_1, like:

goto F23+2
// ...
F23 {
nop
nop
iload_2
aload_1
}

You'd have to adjust the offset of the goto instruction.

Really fucking stupid to deal with, but its coming along nicely.
>>
>>53560271
scheme is not FP
>>
Creating a game in C# using the Unity API.
Infact, if anybody can help me iron out a little annoyance that would be grand.
Once every frame a script on a seperate gameobject, checks to see if the gameobject(player) is destroyed, if so - it will play an explosion sound.
However it is delayed by at least a good 5 secs, quite odd tbqh
>>
>>53560332
https://en.wikipedia.org/wiki/Scheme_(programming_language)

>Scheme is a functional programming language
>>
>>53560336
maybe related?

http://answers.unity3d.com/questions/747275/playing-an-audio-clip-before-destroying-object.html
>>
Got the Vulkan validation layers to work. Excited to actually be able to make headway, now.
>>
>>53558609
Best fucking hip hop album of all time.
>>
>>53560370
That person has attached the script to the gameObject, which naturally will not function as the game will destroy it, I've my script on a separate hidden GO to act as a game controller for my audio.

void isPlayerDead()
{
//Checking to see if player is dead
if (player == null)
{
//if (x=/=y), x==y & audio plays
if (explosion != hasPlayed)
{
pexplode.Play();
explosion++;
}
}
}

I had used PlayOneShot() but that provided a bunch of problems of the audio clip playing over and over whilst also delayed. Quite odd.
>>
#include <iostream> 
using namespace std;

int main()
{
int gokuPowerLevel = 0;
char userInput = 0;


do {
cout << "Nappa, what does the scouter say about his powerlevel? ";
cin >> gokuPowerLevel;

if (gokuPowerLevel <= 9000) {
cout << "Silly ape. Go train \n";
}
else{
cout << "IT'S OVER 9000! \n";
}
cout << "Would you like to Re-Analyze the powerlevel? Type y for yes.";
cin >> userInput;
}
while (userInput == 'y' || userInput == 'Y');
return 0;
}


Dabbling with C++ and practicing. I took a C++ class in the fall and gonna get into a second level of the C++ to learn more programming.
>>
how to erase all elements from this vector?
items.clear() doesnt work...
vector<vector<int> > items;
>>
I get ~10 insertions per sec on my SQLite database. Is that normal? It feels really fucking slow.
>>
>>53560762
buy an SSD
>>
>>53560810
I'm using a Samsung 830.
>>
I just installed debian (I can not change the keyboard to ABNT2 to save my life), never used linux before. SHit is cool. I am getting into programing too and I want to know what you people use to code on linux? I will not use niggerblocks on windows anymore. Can anyone tell me how to change my keyboard to ABNT2? I have tried dpkg-reconfigure console-data to no avail, it is as if the option I pick there makes no effect. Sorry posting here but there is no QTDDTOT arround and I did not want to put a thread up and risk lowering someone's.
>>
I've been learning Python for a bit and I've got a pretty good grip on it so far. I want to do more with it, but I don't really like how limiting it is in terms of only being able to work in one file, and also I want to just work on something more complex. C++ or Java?
>>
>>53560879
>but I don't really like how limiting it is in terms of only being able to work in one file

I don't use Python but doesn't it have an import function?
>>
>>53560688
for each vector in items.clear()
not sure it will work, just a suggestion.
>>
>>53559321
>firstly retrieved information, but then prompted input from the user to specify
I would identify, then authenticate the user, then retrieve. As long as the users can only access the info through your script, then that should be fine.
>>
>>53560688
for (int i = 0; i < items.size(); ++i)
items[i].clear();
>>
>>53560688
>items.clear() doesnt work
What do you mean? You're saying that after calling items.clear() you can still retrieve elements from that vector?
>>
>>53559849
What should he use?
>>
>>53561043
Common Lisp
>>
>>53561067
Kek'd
>>
File: 1411902731439.gif (996 KB, 245x196) Image search: [Google]
1411902731439.gif
996 KB, 245x196
>>53560879
mano mano mano wtf u doing there is import and classes and shit
>>
>>53558609
Ugly table stuff

function(sender, text, teamChat)
for k, v in pairs(lastMsg) do
if k == sender:SteamID() then
if CurTime() <= v[1] then return false end

if v[2] == text then
if 2 <= v[3] then
v[1] = CurTime() + 60

return false
end

if CurTime() <= v[1] + 5 then
v[3] = v[3] + 1
end

v[1] = CurTime()

return text
end

v[2] = text
v[3] = 0
end
end
end)
>>
Can any of you sepples fags explain why this code throws regex_error::paren (for mismatched parentheses)?


regex fuck("{([^]*)},?");
>>
>>53561363

>( Unbalanced group
> [^ Incomplete character class

put you regex in this website:

https://regex101.com/

and see for yourself
>>
>>53561407
I actually used the site linked below (which is better desu senpai) and it says everything's okay

https://www.debuggex.com/r/KCuwUZq9LJMy_MhM

clang++-3.7 says it won't work though....
>>
>>53561512
but even if it didn't work, the problem is that clang++-3.7 won't even compile it because it supposedly has mismatched parens.
>>
>>53561512
C++11 uses ECMAScript's regular expression syntax

careful with that

http://coliru.stacked-crooked.com/a/accb4bea51328b68
>>
>>53561363
>>53561512
>[^]
If the ^ is at the start of a character group, it means "not the following characters".
However, since you have to following characters, the regex assumes that ] is a character not to match, instead of a closing bracket to the character group.
So the characters being not matched are
]*)},?");
and you don't have another ] to close it.
>>
>>53560336
lol, fucking garbage

it shouldn't check it every frame, it should just play it when it's destroyed, no checking involved, you know it's getting destroyed when the destroying occurs
>>
>>53558631
t. Freshman in CS taking OOP 1
>>
>>53561583
Thanks, that makes sense.

I'm trying to group all characters between two matching braces (i'm not trying to balance the braces, as I know that's outside of the realm of regex). So, essentially I want to do something like this {(.*)} but the problem is that there's new lines characters between the braces. So how would I go about grouping everything in a { } match?

I've tried this:
{([\s\S^])},?

but it has the same error as before and clang will not compile.
>>
>>53561738
>So, essentially I want to do something like this {(.*)}

Formatted:
{(.*)}
>>
File: orangutan_1600x1000_279157.jpg (418 KB, 1600x1000) Image search: [Google]
orangutan_1600x1000_279157.jpg
418 KB, 1600x1000
whats a side project I can do that will get me a job in the next 3-4 months?
>>
If I wanted to make a simple 2D platformer in C++ (for practice), what would be a good way to start?
should I use a framework like LÖVE? should I try to make an engine "from scratch" to figure out how things work?
>>
>>53561829
rewrite the large hadron collider in VB6
>>
int main()
{
int b = 2;
foo(b) += 5;

assert (b == 9);

return 0;
}

ref int foo(ref int a)
{
return a *= 2;
}


Now I just have to find a use for it
>>
>>53561829
write a compiler
>>
>>53561829
Make a couple of websites, or a mobile app.
>>
>Dr Octagon
Great taste OP
https://www.youtube.com/watch?v=VSacCUQW0vI
>>
>>53561855
Just use sfml. If you want a full blown engine you can use Godot.
>>
>>53560442
Agreed.
>>
>>53562070
thank you.
>>
>>53562101
I disagree with you. Wu Tang Clan's 36 Chambers is the best hip hop album of all time
>>
How do I fix a leak in node.js?
>>
>>53560216
I did Lisp, then Haskell, then I went back to Lisp.
Starting with Lisp lets you cling to other paradigms you're accustomed to. Then, Haskell brutally rips it out and makes you learn FP well. Then, you can go back to Lisp and use your discretion and pick the right tool for the job.
>>
Can someone explain the usefulness of PULP/encapsulation in game development? I understand how it's useful in programs with sensitive information, but why would you need to hide data behind setters and getters in a game?
>>
>>53562870
*POLP
>>
Physicsfag here. So I'm visiting grad schools for Scientific Computing now. Pretty much everyone says that FORTRAN is the end all of languages for scientific computing, so I've been learning it in my spare time, since my comp sci program minor only taught java and c++.

Is there a better language than FORTRAN for the field that I could start picking up also, to use when I get projects that allow more freedom?
>>
Literally this this this this this

This

This

This

This

This

Literally literally this this this this this

Literally this

This this literally this

Literally literally literally

This

This

This

This

This
>>
>>53562870
Encapsulation isn't about hiding sensitive data, it's about knowing exactly how data is being accesed and set so nothing fucks with your code it. DESU if your making a game by yourself (or any other project) you can just make everything public. It only has an advantage in teams.
>>
>>53562908
Man, I can't English, I'm going to go sleep.
>>
>>53562870
It's to help you avoid making mistakes when writing the code. It's nothing to do with having sensitive information - reflection will always let you access the data if you really want to.
>>
>>53562908
Gotcha, thanks.
>>
>>53562761
Hah! Good one: https://bugs.chromium.org/p/v8/issues/detail?id=2869

function copyStr(s) {
return (' ' + s).replace(/^\s/, '');
}

Also use global.gc() every now and then.
That helped me to tame the leaky node.js
>>
What's the best way to read in a bunch of user set variables, when the user can put them in any order.

Like they out something such as

b= 5
c= 3
a= 1

In a file. I need to set a b and c in my program to those values. Right now, is just have a bunch of if statements.
>>
>>53562805
I did assembly, C,C++,D,perl,python,ruby, scheme, common lisp, and then I stopped caring about languages. I write mostly javascript (basically a fast lisp with C syntax), sometimes python, C/C++ when necessary.

What really interests me these days is ML & deep learning. ML is on a level above ordinary programming, it can do stuff you can't possibly code by hand.

Languages are just memes. Learning systems are the future.
>>
Lets collab guys
>>
>>53562957
"Oh, language doesn't matter" is the refrain of people who never got their head around anything more advanced than Python. Choice of language absolutely matters.
>>
>>53562983
Wrapping your around around Java is one of the most difficult programming challenges especially treating everything as an Object even when it doesn't make sense to
>>
>>53562893
this
>>
>>53560955
It's meant to be a forensic tool, the user should be able to specify the user and retrieve the information
>>
Is it possible to just not be smart enough to be a programmer? I am getting my ass kicked working on a massive enterprise app every day, I think I should just become a tester.
>>
>>53562957
I agree with you. I still am a Lisper, but people should use whatever. What matters more is the actual engineering quality and algorithms. I'm doing ML research currently (I'm in uni working as a research assistant.) I've learned a fuck ton of neat shit.

>>53562983
Choice of language doesn't necessarily matter all of the time. There are plenty of instances where you can build quality software with several different languages.
>>
>>53563064
It's just practice Java especially takes a lot of time to fully understand it well
>>
Interview prepping for jobs
>>
>>53562948
If its not FizzBuzz, no one here can do it.
>>
>>53559831
You don't need to do that unless you're using an old and obsolete standard which you shouldn't.
>>
>>53562892
No one has any suggestions?

OK then, anyone here use FORTRAN and how do you like it?
>>
>>53563106
nice. keep us posted.
>>
>>53561855
make it from scratch unless you want your game to look like it came straight out of mspaint. it's not even hard, especially for 2d and especially if you're doing it to learn
>>
>>53563129
Scientific computing is mostly done in Python(Anaconda) and R nowadays. FORTRAN has been on it's way out for a while now
>>
trying to figure out if there's a way to get TrackMouseEvent to trigger when the mouse leaves the entire window (not just the client area, but the non-client area as well). it doesn't look good though. :/

3000: https://www.youtube.com/watch?v=6sBI60bV-A8
Earth People: https://www.youtube.com/watch?v=tjKHQeRSvjk
>>
>>53561855
http://lazyfoo.net/tutorials/SDL/index.php
>>
>tfw 99% of lua libraries are way the fuck out of date and i don't know anything about writing bindings
>>
Lets discuss Java

In Java proper coding standards to find lets say the sum of all factorials of a number would be like this to split it in two different classes one for testing it and another to have it as it's own class


public class TestFactorial {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
FactorialSum fact = new FactorialSum();
int sum = fact.FactorialSum(56);
System.out.println(sum);
}

}

public class FactorialSum {

public int FactorialSum(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
if (n % i == 0) {
sum++;
}
}
return sum;
}

}



Instead of making everything Objects and calling on them it would be much easier to just implement this in your main method


public class TestFactorial {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int sum = 0;
for (int i = 1; i <= n; i++) {
if (n % i == 0) {
sum++;
}
}
}

}



Why is Java like this when it makes much more sense not to treat everything as an object
>>
>>53563157
I've been talking with grad students and I haven't heard R come up once.
>>
>>53563129
>>53563157
What he said, but I hate R so, so much. See SciPy.
>>
>>53563210
It depends on what field your in. Physics people don't use R because they aren't idiots and can do statistics without all the handholding.

I know some people who do bioinformatics and they use R occasionally.
>>
>>53563209
because in any project beyond "FactorialSum" you don't want everything to be in your main method.
>>
>>53563210
Depends on your country as well I suppose, I hear about R being used in science all the time. But SciPy/Anaconda are used pretty extensively

https://docs.continuum.io/anaconda/index
http://www.scipy.org/
>>
Hey /dpt/, newbie question here.

I have a class called Geometry which has a 3xn array containing xyz coordinates for a set of points.

I want to be able to fetch these. Is it better to make a function that takes an m and n arguments, and returns a the value of arr[m][n]

Or have should I have functions that return a pointer to the array and its size?
>>
>>53562893
if(this.literallyThis == "this"){
print("this");
return this;
}
>>
>>53563295
pointer of course
>>
>>53563295
You should make a Point class to easily facilitate vector arithmetic and return a pointer to that.
>>
>>53559921
compile with as a flag
-std=c++11
>>
File: wastedLife.png (11 KB, 381x381) Image search: [Google]
wastedLife.png
11 KB, 381x381
So i've been using linux and emacs for a while because I'm a shallow person and wanted to seem cool to my one friend. I learned a tiny bit of Python and C but not enough to do more than fizzbuzz. I actually kinda like programming and would like to learn an interesting language. I was thinking something like Lisp(since I use Emacs) or Scala(java is easy? better java?). Yeah I know that there are more usefull languages but I think I just want to fill my life with something interesting.
>>
>>53558656
Go is terrible in every way.

I've been working with go for the last 3 months and it is truly the worst.
>>
>>53563580
Java is worse so is Php
>>
>>53563580
well yeah it was a language invented for dumb people
>>
>>53563139
Thanks. I just finished 2 problems for a company challenge

One was find all distinct palindromes
e.g. 'aabaa' => a, aa, aba, b, aabaa

and the other was determining if a set of forward, left, and right commands will result in a loop.
>>
>>53563588
Java is better, both from a theoretical and practical perspective.

>Inb4 muh verbose

Not a very big con compared to go
>>
>>53563552
What do you want to program?
>>
>>53563601
Nice! What position are you applying for
>>
>>53563436
So I my From class that has my 3xn array should actually have n point objects?
>>
>>53563614
How so explain how it's better than php
>>
>>53563552
Lisp is cool, especially if you write your own in C. It's not that difficult.
>>
Is the actor model ideal for programming basic games, or is it fine to just do most things imperatively the moment conditions are met? I haven't encountered any problems yet, but I might end up expanding the scope of the game considerably.
>>
>>53563634
That's what I would do.
>>
>>53563642
Two completely different languages, made for two completely different purposes. not comparable at all.
>>
File: reimu.png (284 KB, 572x635) Image search: [Google]
reimu.png
284 KB, 572x635
>>53563622
Text games, simple 2d games, A window manager, Emacs plugins, and maybe something like a music visualizer?

>>53563653
You can write programming languages in other programming languages? No wait actually that makes sense.
>>
>>53558609

Hey g, whats a good language to learn that is kinda obtuse? I already know Java (I develop a lot of applications/tools in it) and a couple other languages but I want to have a go at a more obscure language.

Right I'm looking at erlang, R, D.

Really looking for something that can be used for useless application but is just not something most developers use.
>>
>>53563627
Software Engineer. At this point I'm on a roll so I'm just doing a bunch of company coding challenges.
How are you?
>>
>>53563677
>You can write programming languages in other programming languages? No wait actually that makes sense.

Of course. You just write a program that looks at every character of the input file and does literally what it says. This is called interpreter.

https://www.google.com/search?q=how+to+write+a+llisp+interpreter
>>
>>53563689
Common Lisp
>>
>>53563691
Nice actually the interview question I had for my job was that same palindrome one.

I am well, currently working on a web dev project (kill me)
>>
>>53563707
This is really interesting and would be great if I knew a language. Is it suicide to just go balls deep into Scala?
>>
>>53563723
Nope, there's nothing wrong with learning a language well.
>>
>>53563659
The pattern usually used for big games is the ECS pattern. Google it, there is plenty of information.

Anything you make by yourself as a hobby is probably going to be manageable with whatever structure you want though.
>>
>>53563723
I don't know scala, but it looks like bloated ML.
"Programming is hard" is a meme. Every language after your first ones will be learned in a couple of weeks.

What I like about lisp/scheme is that its interpreter can fit on a couple of screens of code. There is nothing else to it. On the other side, Haskell and Scala are monstrous, their type systems are constantly updated etc. You can't know whole Haskell, Scala or C++ even after a year of using them in production (doesn't stop you from programming in them though).
>>
>>53563659
The actor model may not the best for games themselves, but it's certainty used for game servers. The gaming industry is one where erlang has seen alot of success because it makes it easy to model things like users and sessions compared to an imperative model.
>>
>>53563779
Ah this makes sense, and I really do want to learn lisp but i'd also like to be able to translate what I learn in my first language to every other language. Lisp seems a bit.. out there?
>>
>>53563757
>>53563790
Thanks, think I'll just leave things as they are then. No point fixing what isn't broken.
>>
>>53558744
>>53558765
By ML, are you guys referring to the piece of garbage that was created by these kids?

http://www.smlnj.org/doc/
>>
import sys
import hashlib
import os

source = 'C:\Users\Folder'
for root, dirs, files in os.walk(source):
for file in files:
ihashes = hashlib.md5(file)
hashes = ihashes.hexdigest()
with open ('C:\Users\Folder\Desktop\ohashes', 'w') as f:
f.write(hashes)
f.closed



This code only returns one hash, however it should return many more.

For example, if I remove the part where it writes it to a file, and print hashes, it prints them all.

Why does it not print them all currently?
>>
>>53563824
Machine Learning is not Metalanguage.
>>
>>53563795
If you look at every major language they took their features (first class functions, garbage collection, symbols) from Lisp. JavaScript (the language I often use nowadays) is really a lisp with C syntax and a fast virtual machine. So I don't regret playing with lisp, but I moved on.
>>
>>53563824
Nah, by that we mean train the algorithm to do whatever you want. Who will even need to program when this ability will be perfected?
>>
nth for free books ( compared to gentooman library) https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md#html--css
>>
>>53563899
b..but I have my library genesis
I'm a Pirate!
>>
>>53563848
>JavaScript (the language I often use nowadays) is really a lisp
how?
>>
>>53563960
That anon is right. There was at least some good design that went into JavaScript.
Then they put layers of shit on top. If you scoop off the shit, it's actually a pretty good language
>>
>>53563992
I dunno about that, I actually see it the other way around. It was a pretty terrible language, but it's currently getting better with ES6+ as proper lambdas, currying, async stuff etc. is getting added to replace the old crap.
>>
>>53563992
>no macros
>no homoiconicity
>super unsafe dynamic typing
>worse eval
>not even Lisp-style lists/pairs
i just don't understand how people come to that conclusion...
i know it has some decent concepts, but it definitely has more than its fair share of trash in it. but i fail to see how that makes it a lisp still
>>
>>53564028
I don't mean that it was once a good language and then was made terrible. I mean that there were some legit people behind the initial version but also some terrible desicions made.

I agree though, can't wait for ES6 stuff to get browser support.
>>
Do you create a new CPP for every class, and should each class have its own header or can I through multiple declarations into 1 header?
>>
File: 9000atoms.webm (2 MB, 560x640) Image search: [Google]
9000atoms.webm
2 MB, 560x640
>>53563960
The history. Brendan Eich was a scheme fan, and Netscape promised him that he will do a scheme in the browser. But then marketing happened and he have to sugarcoat it in java syntax.

C/java syntax isn't that bad though, for me its good enough.

>>53563992
>it's actually a pretty good language
Not to mention it has the fastest dynamic language VM/runtime in the world. I can do physics simulation in the browser. Try that with CPython!
Also the debugger/profiler is good.
>>
>>53564062
Lambdas basically; it's not a Lisp but it has some key features in common.
>>
every time you re-open the ohashes file, you're clearing it and then writing your most recent hash. you'd have to open it as append (change your mode 'w' to 'a') to keep the previous contents of the file intact everytime you want to write a new hash
>>
>>53564098
>The history. Brendan Eich was a scheme fan
if i say im gonna make a C++ compiler and then end up writing a Python interpreter, that doesn't make my language a C++ dialect
http://journal.stuffwithstuff.com/2013/07/18/javascript-isnt-scheme/
>>53564125
Java, C#, C++ all have these. are they dialects of Scheme as well?
>>
>>53563828
every time you re-open the ohashes file, you're clearing it and then writing your most recent hash. you'd have to open it as append (change your mode 'w' to 'a') to keep the previous contents of the file intact everytime you want to write a new hash
>>
>>53564098
This is pretty legit.
>>
>>53564135
No, but again
>it's not a Lisp but it has some key features in common.
It was explicitly designed to be Scheme+Smalltalk in Java's clothing, but since it was so rushed and mangled by politics it ended up having a lot of shitty flaws.
>>
>>53564135
I don't like flamewars. Yup, js doesn't have macros, but lambdas, closures and dynamic typing are all there. I'm not saying that JS is the best language in the world, but its good for building things quickly.
>>
>>53564135
>linking articles by a dart shill as an argument
>>
>>53564184
as an interesting experiment, what if someone made a homoiconic JSON-syntax language? that would be much closer to a Scheme in Java-ish syntax I think.
>>53564199
im not disagreeing that it's useful or anything, i just don't really see the parallels to Lisp. yes, it's dynamically typed and has closures, but then again so do Perl and PHP. it's difficult for me to relate the two together at all in my mind
>>
>>53563779
Actually you'd be surprised anon. Most the people in my Data Structures class are fucking useless.
>>
>>53564153
Saviour, thanks
>>
>>53564228
No surprise, anon.. We people are just animals, we are not evolved to do programming. Its wonderful that at least some of us can.

I hope the time will come when humans won't need to learn all this stuff, they will be able just to live their cute, fullfilling lives..
Of course that won't happen unless we automate all the drudgery.
>>
>>53564218
Obviously JS could be more like Scheme than it is, but that's not the argument.
>>
>>53565164
What language and/or frameworks were you thinking?

If you're thinking iOS SpriteKit game then sign me up.
>>
>>53565164
tell me you're an artist and not le ideas guy
>>
File: game.png (24 KB, 950x652) Image search: [Google]
game.png
24 KB, 950x652
>>53565189
some mobile shit.

here it's the idea.
>>
File: madoka_by_cristianceron-d6toqv2.png (269 KB, 768x896) Image search: [Google]
madoka_by_cristianceron-d6toqv2.png
269 KB, 768x896
>>53565207
I can do art.
>>
>>53565226
yeah but it's weeb art so
>>
>>53565226
If your actually serrious, its super easy to find programmers desperate for artists. Go look on TIG or something, stay away from /agdg/ that place is worse than cancer.
>>
>>53565244
right now I want to make a game for blind people.

see
>>53565209
>>
File: babby.gif (2 MB, 283x313) Image search: [Google]
babby.gif
2 MB, 283x313
>>53565248
>/agdg/
I was trying to forget about that place
>what do you mean copy and pasting code into the unity editor isn't programming
>you're just one of those functional programming snobs
>of course I know what I'm doing
>how would you even do anything without mandatory object orientation
>I can use lists for everything because knuth told me optimisation is bad
>ternary conditionals are unreadable
>>
File: sad pepe.png (139 KB, 917x871) Image search: [Google]
sad pepe.png
139 KB, 917x871
>Tfw you have finally become good enough at programming to realize all the cool fun things to program require so much effort and work that you don't even want to program anymore
>>
>>53565371
I am genuinely sorry I brought up bad memories.
>>
>>53565371
>>53565248
Atleast /agdg/ produces content regularly /dpt/ has never produced any programs of any kind
>>
>>53565371
>>you're just one of those functional programming snobs

That one's probably true, though.
>>
Finally got my torrent tracker to work. Had an issue causing me grief because apparently my two torrent clients on the same ip can't download from each other.
>>
>>53565405
If you throw away interface/api/OOP cruft programs become much shorter

t.JavaScript programmer (^:
>>
>>53565452
You can't because all the real big nigga dick programming languages like C,C++,Java they all require all that and without it you have shitty programs
>>
>>53565441
Yeah I'm sure jim sterling really appreciates those glitchy asset store greenlight projects

>>53565448
>hey you can replace those 500 lines of code with a 20 line function that takes lambda expressions
>FUCK OFF FUCKING MONADS GO SUCK JOHN MCCARTHY'S DICK YOU THINK YOU'RE SO MUCH BETTER FUCKING TYPE THEORY CS DEGREE FUCK
>>
the best language is swift, because apple made it open, and now I can impress hipsters with my Apple language green lighted by steve.
>>
>>53565518

I knew it, I was right. You are a functional snob.
>>
>>53565582
no really, I don't even know what a monad is anon

it's just whenever I accidentally say 'lambda' everyone erupts into a fit of autistic rage which lasts for several hours
>>
>>53565610

Lambies and streams have made Java 100 times more bearable, though.. so there is that.
>>
>>53565209
i'm stealing that and never giving you any credit.
unlike you, i'm a damn good software developer and can pump out your shit idea into a fully fledged game in a matter of weeks. good luck beating me to the punchline, bub.
>>
Is Ruby a good programming language?
>>
i'm so alone
>>
>>53565957
me to :(
>>
>>53565957
>>53566047
both of you know exactly why you're alone
>>
>>53566060
cuz im fat and ugly and a loser :(
>>
import std.stdio;

void main(string[] args)
{
uint rows;
uint[][] pascal;

write("Enter number of rows: ");
readf("%s", &rows);

pascal = new uint[][rows];
pascal[0] = new uint[1];
pascal[0][0] = 1;

foreach(int i; 1 .. rows)
{
uint rowLen = i + 1;

pascal[i] = new uint[rowLen];

pascal[i][0] = pascal[i][rowLen - 1] = 1;

foreach(int j; 1 .. rowLen - 1)
{
pascal[i][j] = pascal[i - 1][j - 1] + pascal[i - 1][j];
}
}

//Bunch of weird formatting bullshit, I couldn't even tell you how I got this
//20 is the max number of rows before the result starts looking wonky
int spaces = (rows * 2 - 1) * 3;

foreach(uint[] a; pascal)
{
foreach(i; 0 .. spaces)
{
write(" ");
}
writefln("%(%5s %)", a);
spaces -= 3;
}
}


Cleaned up my Pascal's triangle code, took out ~15 lines of code
>>
was looking up the algorithm for division using logic gates

found this

https://answers.yahoo.com/question/index?qid=20130331224635AANXaMX

>There have been revisions of binary coding. They were enhancements to it's capabilities, but no numbers have been added.

What enhancements to "binary coding's" capabilities were made in these revisions?
>>
>>53565638
1. Anon does not need to beat you to the development of the game, he just needs to copyright it first and then sue you when you steal it. By the way, in posting it here, he's already been given an automatic copyright (in the US at least).
2. No you won't. You're on DPT, so chances are high you won't do much of value.

>>53565658
It is as long as you don't need it to be fast and you don't need other people to work with you on your projects.
>>
>>53565209
just wondering, what's the input method here?

Also I would imagine not a lot of blind people have smartphones, because touchscreens.
>>
C++ or Java for first language?
>>
>>53566696
python
Thread replies: 255
Thread images: 29

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.