[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: 25
File: Valutron.png (17 KB, 750x216) Image search: [Google]
Valutron.png
17 KB, 750x216
Valutron edition.

Previous thread at >51577055

What are you working on, /g/?
>>
>>51583493
Report this thread for advertising
>>
>>51583493
>failed to link properly to the old thread
OP, delete this.
>>
>>51583554
Jessicas rumbled

Previous thread at: >>51577055
>>
>>51583493
stop shilling
>>
>>51583493
If your programming language can't

- read from a file into a string
- interpret that string arbitrarily
- do so concisely with its std library
- generate arbitrary code from that
- insert that code before the program runs because you're still in compile time

it's trash
>>
>>51583599
>compiled language

Get with the times grandpa. It's 11111011111.
>>
Poll time, /dpt/:

1 - What's your sexual orientation?

2 - What's your default programming language of choice?
>>
>>51583599
I believe what you're describing is known as a "compiler".
>>
>>51583611
-33?
>>
>>51583599
What are the advantages of that over, say, something like Template Haskell where you can modify the AST programmatically?
>>
>>51583619
Actually, I think it's called a bigger D
>>
>>51583618
Transgay
Python
>>
>>51583618
1. straight
2. OCaml
>>
>>51583619
There's a compile pass even in interpreted languages: it's the part where you go from raw text to AST, and typically you apply a series of transformations on that AST. The resulting AST is a representation of the target language.
>>
>>51583618
straight
java
>>
>>51583618
Gay
Go
>>
>>51583618

Same as >>51583663.
>>
A Java compiler that converts it to native machine code instead of bytecode.
>>
>>51583693
Pretty sure that already exists.
>>
>>51583693
GCC does this.
Next?
>>
>>51583711
>>51583710
Excelsior JET does it, but it's $3000 for a license.

>>51583711
GCC only supports up to Java 5.
>>
so I want to learn java so I can understand how my android works better. how hard is java? how difficult is it for a beginner to pick up?
>>
Last repost to gather feedback:

I uploaded my language in its current state at: http://neetco.de/languagedev/language

1. There are design issues with the typenodes (MNode in pmf.h/cpp) which makes the code bloated, error-prone and leaky.
2. The primitives only work with int types. Beside, they're handled ad-hoc and bypass most of the code generation, which is also bug-prone and oogleh.
3. I haven't tested that it actually produces valid executables (but the llvm looks OK).
4. printf-and-continue-until-segfault is used instead of proper erroring,

build.sh provides the commands to run to build the entire thing. Only the last command is required if the .y (bison file) and .l (flex file) aren't touched.

The code is mostly written as almost-throwaway code so it's not pretty, but it should be understandable and workable.

The language's syntax is in the .y file. There is support for if-then, if-then-else, while, set!, let, lambda, type declaration (might not work, not sure) and function calls. Moreover, any symbol can be placed infix to represent an infix call without ambiguity under LALR(1):

let fn = lambda (x, y) x + y;
fn(3, 4) fn fn(8, 9);
\\should output the llvm IR for "7 + 17"


There are some simple to correct syntax flaws such as require ; after {} in if and while statements.

llvm_backend.h/cpp does code generation. No passmanager is used, so it outputs unoptimized code, which is especially useful for debugging.

I like the base syntax (beside some flaws that need to be addressed, as outlined above) so far, but the codebase is starting to be hard to work with. Next up is probably, implementing multiple dispatch and type translation (e.g. <number> = <u>(<long>, <double>) should unify the union type, not the <number> type, with whatever argument is used in a function call).

Any pull request, patches, or suggestions would be appreciated.

I'll keep following these threads hoping one of you senpaitachi looked at it and have some input, but I'm done spamming now.
>>
File: best Lang best D.png (22 KB, 637x336) Image search: [Google]
best Lang best D.png
22 KB, 637x336
>>
>>51583740
Do you have prior programming experience?
>>
>>51583779
no
>>
>>51583790
don't learn java
jesus christ
>>
>>51583799
why? how hard is it for someone without programming experience?
>>
>>51583790
http://codecademy.com/

That will cover the absolute basics of programming.
I would recommend that you take that, then pick up a book on Java (Head First Java is pretty good), then take the Java course that's on Coursera.
Java in a Nutshell is great to keep on your shelf as reference material, but not necessarily to learn programming (if you had prior experience and just needed to learn Java, it's good).
>>
>>51583824
it's a shit programming language
>>
What is the best programming language to learn in terms of what is most wanted in the job market, specifically the free lance job market. I already know HTML, CSS, and JavaScript (I know they aren't really programming languages). What should I learn next?
>>
>>51583877
not much choice if he wants to program for android tho
>>
>>51583895
not exactly program for android, I want to know how my android ticks and the best way is to know the language it was programmed in.
>>
what are some things that every dev should implement as practice before getting a real job?

>Binary Search trees
>reversing a string with pointers only
>>
What should I eat for lunch guys? Almost 11am here.
>>
>>51583920
Feces
>>
>>51583824
Java is a good language for *some* beginners:
-It's relatively easy to understand at a basic level due to its proximity to C's syntax, and there's a lot of information about it floating around online
-It's a language that'll be useful if you ever want to make some serious programs
-It's static and strongly typed with automatic memory management (this eliminates lots of mistakes you may make as a new programmer)
-It's challenging/big enough that you'll always have something new to learn if you're a curious person

But the last point is precisely why it's not a good language for the majority of beginners: Even if they are able to use it, most people will be put off by how often there's something new that they don't understand in their face, instead of intrigued/stimulated to learn.

You won't lose anything for trying it, despite what /dpt/ might say
>>
>>51583891
learn python!

also, javascript is a programming language
>>
>>51583907
learning about UNIX-like operating systems is helpful for that cause as well. android runs on the linux kernel
>>
>>51583937
>-It's relatively easy to understand at a basic level due to its proximity to C's syntax
That's actually only true if you already have programming experience due to the forced OO crap (public static class Foo { public static void main(String[] args) ...)
>>
>>51583618
it's not gay when I'm wearing a skirt
python
>>
>>51583988
That's part of my 4th point: That's something that he can just ignore, like the majority of beginners learning java, and write his code inside main (which is the easy part), or he can be intrigued by what these things mean and start looking into them.
>>
>>51583913
>Hello Anon, welcome to your first day as an employee at our company! Your task is to implement a <whatever algorithm you learn in cs101>
>Real Job
Pick one and only one
>>
>>51583683
>>51583663

>straight
>java
pick one
>>
>>51584030
using java isn't gay
>>
>>51583618
Straight
Haskell
>>
>>51583618
gay
java
>>
>>51583618
Hard gay
Valutron
>>
>>51583618
Transorganic negroasian bimolusk multimodal homoiconic
python
>>
>>51583678
>>51584094
>>51584104
>tfw no qt anon bf
>>
>>51584204
If it makes you happy, there's a strong likelihood of none of us being compatible mates. I mean, one of us likes a meme botnet language, the other one likes a lisp-like abomination, and one of us has reasonable taste.
>>
>>51583611
3737?
>>
>>51583618
lunar lander
anything that runs on less than 100 kb
>>
>>51583493
>and one of us has reasonable taste
s/reasonable/terrible/
>>>/out/
>>
>>51583618
straight
java
>>
>>51584293
>>51584270
fuck, I responded to the wrong post
I keep forgetting shift+q responds to the OP if you don't have a post selected
>>
>>51583693
why hasn't anyone made a free java AOT compiler for desktop yet ;_; or just a transpiler so you can plug the output into GCC
>>
>>51583618
Gay
C#
>>
>>51584324
Because it defeats basically the only benefit of Java -- that it can run anywhere
>>
>>51583891
JavaScript is a programming language (a pretty shitty one, but it's still a programming language).
>>
>>51584305
What's not reasonable about liking java, mate? Is it not memetastic enough for you?
>>
>>51583891
Ruby on Rails for web
Python for toys/pet projects
Java/C# for Enterprise

Also javascript is a programming language, albeit a shitty one.
>>
>>51583740
it's easy if you're not retarded

check out https://docs.oracle.com/javase/tutorial/

also you can check out http://developer.android.com/reference/packages.html and look up the source code grepcode.com
>>
Why is everyone in this thread so gay?

>>51584104
Even OP
>>
>>51584366
Its just that C# is better by a landslide
>>
>>51584391
>>51584366
whats wrong with java?
>>
>>51584338
what if you just want to write code in java or you have an existing codebase and then if you're targeting windows for instance you can get an executable with compile-time optimizations that's more difficult to reverse-engineer
>>
>>51583618
Straight white atheist poor unemployed hebephile educated young male.
C and Python.
>>
>>51584391
I've had limited exposure to C#, but the naming conventions rub me the wrong way.
>>
>>51584411
there is nothing wrong with java. it's just some stupid meme. java is one of the most popular programming languages in the world. and it's funny that shills say C# is so much better than java when they're almost identical
>>
>>51584378
>>51584416
>>51584441
all me
>>
>>51584411
Verbose Pajeet language for people who like writing spaghetti code.
>>
>>51584457
nice meme
>>
>>51584457
Say that to my face, not online, and see what happens
>>
>>51584457
nice meme
>>
>>51584493
I don't want to smell curry.
>>
>>51583618
Genderfluid non-binary trigender foxkin
Valutron
>>
>>51584502
companies choosing to outsource to save money does not reflect how good the language is.
>>
>>51584348
>>51584377
Why is JavaScript considered shitty? Sorry I'm new.
>>
>>51584484
>>51584501
nıce meme
>>
>>51584557
dynamically typed, interpreted
>>
>>51584441
popular != good
>>51584366
cobol for 21st century
>>51584457
this desu
>>
>>51584348
you could consider it a scripting language but the distinction isn't super-clear. python for instance could be considered both a programming and a scripting language.

>>51584557
anything dynamically typed is absolutely disgusting. there is no rigor to it, it's like if a woman designed the language
>>
>>51584595
You can compile it dumbfuck.
>>
>>51584607
it has to be used heavily for a reason
>>
>>51584622
OO was heavily shilled in the 90s
right place, right time
>>
>>51584621
eval("compile this *unzips eval*");
>>
>>51584650
there is nothing with OOP it's literally the best programming paradigm depending on the use case
>>
Where should I go or what book should I read if I want to learn Python?
>>
>>51584665
>it's literally the best programming paradigm depending on the use case
You don't say.
>>
>>51584665
>there is nothing
*there is nothing wrong
>>
>>51584670
don't bother with python, it's a meme language. only language worth understanding is C.
>>
>>51584665
there is no best paradigm, and there is no best language
use what works
>>
>>51583618

1. niggers
2. C#
>>
>>51583618
Straight while male.
C.
>>
>>51584670
https://docs.oracle.com/javase/tutorial/
http://en.cppreference.com/w/cpp/language
>>
>>51583618
>Bi
>Scheme
>>
>>51583618
Lesbian
AngularJS
>>
>>51583618
Gay
C
>>
>>51584665
there is no reason to ever use java if you're white
>>
>>51584706
while(male) {
straight = true;
doStuff();
}
straight = false;
>>
>>51584546
Sure you're not gay, faggot?
>>
>>51584650
also, linus torvalds, the creator of the linux kernel, hates java so it's shit.
>>
>>51584457
10/10 description. i'm keeping it.
>>
>>51584764
>autist who only works in kernel dev hates a high level language
youdontsay.jpg
>>
>>51584764
Everything linus says is objectively wrong, so java must be good.
>>
>>51583618
Trans-Abstract queer gender-kin
Rust
>>
>>51584811
>Everything linus says is objectively wrong
no its not
>>
>>51584827
Name one thing unwrong that linus said. I'll wait.
>>
>>51584736
while (straight, male)
if (!privileged) break;
>>
>>51584617
>you could consider it a scripting language but the distinction isn't super-clear. python for instance could be considered both a programming and a scripting language.

Scripting languages are a subset of programming language. Any "scripting language" is by definition a programming language. However, any programming language can in theory be interpreted or compiled (and interpreters inevitably involve some compilation) so the term "scripting language" is often misleading.
>>
>>51584840
>java is shit
>gnome is shit
>GNU emacs is shit
>its linux, not GNU/Linux
>>
>>51584844
parsing is not compilation
>>
File: 1439933772731.png (226 KB, 620x670) Image search: [Google]
1439933772731.png
226 KB, 620x670
>>51584694
>just niggers
>doesn't specify whether male or female
>>
>>51584857
>>GNU emacs is shit
He uses emacs to program

>its linux, not GNU/Linux
Never said that
>>
I'm the faggot doing threading in python,
thread one finds ip_address
thread two doesn't even start until that is defined globally,
The problem is, thread two tries to read ip_address as a local variable, How do I get it to read the global one?
Shit's confusing, yo.
>>
>>51584844
"A script is what you give the actors. A program is what you give the audience." - Larry Wall
>>
>>51584857
Except he likes gnome, uses emacs, thinks we should call it NT instead of windows, and java must be good since linus says it's shit.
>>
>>51584898
and the audience are more important than the actors
>>
>>51584896
Why are you learning about threading in anything *other* than C? It's the one thing that's easier to teach on C with Linux+GNU than on anything else.
>>
Threadly reminder that this compiles on gcc
#define ayy(x) x(lmao(x))
#define lmao(x) x(ayy(x))

int main()
{
ayy(lmao);
}
>>
>>51584932
>*other* than elixir?
FTFY
>>
>>51584932
This. The whole lie of "with high level languages and today's computers you don't need to care about how anything actually works" falls apart as soon as you introduce threads.
>>
>>51584932
Because I only know python, I already have two working modules, they even work in threading.
The very last thing I need to get working is that variable.
I'll learn some C++/whatever a little later though.
>>
>>51584939
>threading
>elixir/erlang
mount_stupid.jpg
>>
>>51584937
as it should
>>
>>51584957
>threading
>C
kilimoronjaro.jpg
>>
>>51584881
>>doesn't specify whether male or female

You already know, though. I haven't hidden my love of negresses.
>>
>>51584945
When it comes to threading, "working" is not acceptable. A program can work 99% of the time and still be hopelessly, irredeemably broken.

Just finish whatever you're doing and go learn threading properly in C afterwards. It will be awful and you'll have no fucking clue of what you're doing at first, but you'll come out a much better programmer.
>>
>>51584981
Yes, in C you work with threads. In Elixir or Erlang, you do not.
>>
>>51584932
threading in java is fine
>>
>>51584986
Cmen, everyone!
>>
>>51584993
Threads are a very specific concept, and you don't work with them in Erlang.
>>
>>51584988
It's fine, but I actually find it more confusing than C.
>>
>>51585007
I'd work with your threads
>>
>>51584939
Elixir is shit, just use erlang.

>muh syntax :)
faggot
>>
>>51585025
Elixir is erlang if erlang wasn't garbage.
>>
>>51583493

I am working on C++ with the Stroustrup book. Currently working on a small problem from the chapter in which vectors and loop are introduced. Problem is to take a list of string inputs and use a list of disliked words to filter them out replacing them with BLEEP. Trying to use two for loops compare then and replace the word with bleep if needed. This is what I got.

#include "std_lib_facilities.h"

int main() {

vector<string> words;
vector<string> disliked = i{"broccoli", "beans", "spinich"};
for(string temp; cin>>temp;)
words.push_back(temp);
cout << "Number of words: " << words.size() << "\n";

sort(words);
vector<string> print_list;

for (int i=0; i<words.size(); ++i) {
for (int j=0; j<disliked.size(); ++j) {
if(words[i]==disliked[j]) {
print_list.push_back(disliked[j]);
break;
else:
cout << word[i] << "\n";
break;
}
}
}

return 0;
}


This seems like a bit jump in difficulty and I keep having trouble with it. Specifically the break I don't understand how far they kick me back up. I would like to abandon the comparison to the disliked vector upon finding a match. And let it continue until exhaustion if no match is found.
>>
>>51585062
Elixir is Erlang with ruby syntax (aka the shitty version of erlang).
>>
>>51585094
Elixir enable executing arbitrary code in module. Checkmate.
>>
>>51585118
proofs?
>>
>>51585065
something like this?
std::replace(words.begin(), words.end(),
[&disliked](std::string s){for (const auto& d : disliked) if (s == d) return true; return false; }, "BLEEP");
>>
>>51585142

Ill try and figure this out thanks.
I am only on chapter 4 dont recognize most of this.
>>
>>51585137
Check the website.
>>
>>51585167
most of those are standard library functions in algorithm

that's probably cheating
>>
File: 1425045169580.png (815 KB, 631x677) Image search: [Google]
1425045169580.png
815 KB, 631x677
>>51583630
>not knowing binary
>being a hipster nerd
>>
>>51585142
>not
return s == d;

CU CK
>>
>>51584843
enum gender {MALE, FEMALE, FLIUD, PAN, DEMI, OTHER, NONE};
enum replytype {PROGRESSIVE, BACKWARDS, MANSPLAIN, OTHER};

inline bool
male(person p) {
return identifies_as(MALE, p);
}

inline bool
straight(person p) {
return identifies_as(STRAIGHT, p);
}

inline bool
privileged(person p) {
return male(p) || straight(p) || white(p);
}

while (privileged(person)) {
struct person bigot = person;
if ((reply = lecture(bigot)) == MANSPLAIN)
continue;
else if (reply == PROGRESSIVE)
break;
}
>>
>>51585210
Oh the irony
>>
File: 2015-11-28_20-11-17.png (3 KB, 237x143) Image search: [Google]
2015-11-28_20-11-17.png
3 KB, 237x143
so this is like 1/20th related to programming

on my html audio element, the volume slider isn't updating the graphic depending on the percent of volume, pic is what im talking about

i messed around a bit and found out if i remove my two self made CSS styles from being imported it fixes the problem, but the weird ass part is if i remove all the lines of text in those css files the problem is still there

so im not really sure whats going on
>>
>>51585216
return s == d would only check one

you complete and utter failure, remove yourself from the thread this instance
>>
>>51585236
>implying you didn't just plug that number into a calculator set to byte
Better act smug when you dont wtf you're talking about right?
>>
>>51583618
Straight - Haskell
>>
>>51584889
>>>GNU emacs is shit
>He uses emacs to program
he uses a customized micro emacs, not GNU emacs. and even that he hates
https://git.kernel.org/cgit/editors/uemacs/uemacs.git/commit/?id=fa00fe882f719351fdf7a4c4100baf4f3eab4d61
>I really should just learn another editor, rather than continue to polish this turd.
>>
>>51583913
Genuinely the thing you should learn is build systems. You should learn how to debug tools that don't build. Algorithms are shit easy, debugging why make failed and searching through 10,000 pages of g++/clang++ template errors in search of what went wrong is far more valuable skill.
>>
so is C a bad first language?
>>
>>51585446

No.
>>
>>51585446

I did python and really felt the need to understand more of what was under the hood. Working on c++ now.

Do whatever you want as long as you are moving forward.
>>
>>51585464
is C hard as a first language?
>>
>>51585509
yes try python for a simple start
>>
>>51585446
int main()
{
int (*){} no
}
>>
>>51585551
why python over C?
>>
>>51585509

Hard is a relative term. Nothing is hard if you put your in the time and work. Also I should have added you should have a motivation for learning a language and what you want to use it for, just like how you wouldn't just start learning Hindi or Punjabi just cause you think it's easy.
>>
>>51585509
C is a great first language if you want to really learn how software works. LIke the guy above said, if you learn python you'll be able to write some working code easily but it'll all seem magical and you'll wonder how it really works.
>>
>>51585446
good lord, C is the fastest language, dont blasfeme xd as a first language i wouldnt recommend, but it is a must for programmers
>>
>>51585574
just try a hello world in python,
try it in C, post results
>>
>>51585574
Python teaches you poor habits from the start
>>
>>51585611
Languages don't teach bad habits, bad teaching materials do. For example, K&R C.
>>
>>51585604
Fuck off you celcius iq autist lord.

It's not all about ease of syntax, it's about learning how it works. Anyone who knows how to program should be able to pick up any language regardless of syntax in a very short amount of time. It is C that best teaches you the underlying principles of programming. If you learn python first your are ruining your chance to become a decent programmer.
>>
>>51585627
I never said anything about K&R, it is a succinct introduction to the language but a little dated.

K&R is not teaching you how to program, it is teaching you how to program in C
>>
>>51585633
the language chooses the programmer? rly?
>>
Learning python first is like taking an elevator your entire life, then when you go to other languages where you have to learn how to take the stairs, your attitude is, "Lol why do I need to do this when elevators exist?" If you learn a language like C++, C and Java first, you will get to appreciate Python's shortcuts a lot more when you eventually get to it.

But those are just my 2 cents.
>>
>>51585633
why is learning python first ruining your chances of becoming a decent programmer:
>>
>>51585627
I started with K&R and now I am an expert programmer.
>>
>>51585669
that is stupid
>>
>>51585656
No but you only have once chance to learn it for the first time. Learning the more complex concepts that C has to offer allows one to pick up anything that follows with ease.
>>
>>51585676
no, I was asking a question.
>>
>>51585676
see
>>51585658
>>
>>51585677
what advantages will I have if I learn C first?
>>
>>51585684
one step from crazyness :P
>>
>>51585707

Why don't you google it family?
>>
>tfw you fell for the monad meme
>>
>>51585736
hes' the one making the claims about advantages about learning it first time, I want him to clarify.
>>
>>51585210
It was a joke about 2's complement you dense retard. It's as much "binary" as the more natural system you're thinking of
>>
>>51585746
>Most modern non function languages are C based
>Used for everything from embedded systems to operating systems to desktop applications
>Can run on almost anything that calls itself a computer
>learning dynamic memory management makes your really understand how everything works


I am not talking down python, but I think that you should learn C first and then move on to python.
>>
>>51585820
functional*
>>
>>51585835
functional is a misnomer since they don't actually function
>>
>>51585820
>>51585835
GHC and CHICKEN use C too.
>>
>>51585749
It's not a good joke about two's complement then - the most significant bit is a fucking 0. Kill yourself.
>>
wat u think of nim?

> Python like syntax
> always outputs better C than you
>>
>>51585952
I think the "programmable optimizer" is pretty neat
Shame about everything else
>>
>>51585903
>he doesn't use 11-bit numbers
>>
>>51585952
me like the macro system
>>
>>51585903
all bits are equal
>>
>>51585892
*cocks pistol*
ohh shhiiiitt
*bangs pistol against railing*
functional languages
blown.
the.
fuck.
OUT
*squeezes off 16 hot loads of 9mm*
>>
>>51585892
>>51586042
#SHOTSFIRED
>>
>>51586042
please drink bleach
>>
File: Pipes.png (61 KB, 1366x768) Image search: [Google]
Pipes.png
61 KB, 1366x768
Well... pipes work, even if it does feel as though my kernel is held together by duct tape.

Also, note to self, you cannot make a post on 4chan by hitting escape and :x. No, that will close the reply box. This is what happens when we spend too much time editing files until they stop failing all of the tests.
>>
>>51586042
>>51586052
I've been waiting for the functional paradigm's reply, but I guess it's lazily evaluating
>>
>>51586094
OHHHHH SHIIII
*ejects spent magazine*
FUNCTIONAL LANGUAGES...
*slaps in fresh magazine*
*drops the slide*
FUNCTIONAL LANGUAGES ON SUICIDE WATCH
*pops off 15 more rounds*
>>
>>51586042
>>51586123

Something tells me you've never touched a gun in your life.
>>
>>51586181
*throws away Glockamatic .357 Special*
*draws wakizashi*
Functional Defence Force is finally here, deshou?
*bangs sword against railing*
>>
>>51586181
one of many things he can't get up
>>
currently making a FM synthesizer in C

pretty fun. 3 oscillators, square/sin/triangle wave, etc. trying to mimic alesis ion FM synth
>>
>>51583493
Extended the kanban webapp manipulating my todo list text file today to bulk-move tasks from one stage to another, as well as to add new tasks.

There's plenty more left to be done, but it's ready for general purpose use, granted I intend to still regularly manipulate the text file to do what the webapp cannot.

But I hope to reduce how much this needs to be done over time, so that I can do it all from a mobile device without having physical or ssh access to the server it's all based on.
>>
File: finished.png (377 KB, 320x386) Image search: [Google]
finished.png
377 KB, 320x386
Well, I've been jerking off my image-thingamajigger again.

Points are now selected randomly, such that error is distributed through the image.

This is American Gothic with the palette from Starry Night.

Gonna try a different method and see what results I get.
>>
>>51585903
The most significant bit is clearly a 1. There is only one 0 in that number and it's in the fucking middle of it, I have no idea how someone can be such a fucking failure of a human being that they manage to confuse the most unrelated fucking bits possible in any fucking number. Stop posting here you mongoloid, and go back to ricing (field) threads.
>>
>>51585952
why has nim been shilled recently?
nobody gave a fuck when it came out, everyone thought it was stupid & would never take off
why the sudden surge of discussion?
>>
>>51586284
does this take every pixel from starry night and then map it onto the other painting?
>>
>>51586379
>everyone thought it was stupid & would never take off

Where? Here?
>>
>>51585739

Does anyone NOT know what monads are at this point?
>>
File: finished.png (380 KB, 320x386) Image search: [Google]
finished.png
380 KB, 320x386
>>51586421

Yes.

This one selected colors from the palette by using the lowest distance in intensity from the random sample (which is r+g+b/3).

I actually really like this result.
>>
>>51586442

They're monoids in the category of endofuckers, obviously.
>>
>>51586442
I tend not to learn meme languages so I don't know what they are.
>>
>>51586516
You can use them in non-meme languages like C++ and D and they become useful
>>
>>51583542
>>>51578992 (You)
>>>51578934 (You)
>If you're still here, may I know the concept/math behind your picture? Is it like a lorenz equation or attractor or something?
yep, attractor
I think the colour is based on the distance to the previous point.
The algorithm is
xnew=sin(y*b)+c*sin(x*b)
ynew=sin(x*a)+d*sin(y*a)
repeated as many times as you like, I probably did it 10 million+

but sorry...I stored ones that looked cool, but I didn't store the a/b/c/d....you might never find this image ever again
>>
File: 1443766594746.jpg (51 KB, 650x647) Image search: [Google]
1443766594746.jpg
51 KB, 650x647
>>51586545
>non-meme languages
>D
>>
>>51586565
D is largely imperative
>>
>>51586379
people shill random programming languages as a way to troll noobs.
see: every single functional lang
>>
>>51586565
>>51586575

As an example, do you use generics much?
>>
>>51585892
Replace "functional" with "working" in those posts.
>>
As a complete noob other than some code noodling years ago, I figured I would compile a glossary of programming related terms.

Should I get definitions for every possible word, or just the ones I'll be dealing with for now? (Learning Python for pet projects, with web dev to come much later.)
>>
>>51586665
Start with Haskell
>>
r8 my scrape
require 'nokogiri'
require 'open-uri'
require 'httparty'

link = "http://imgur.com/a/fpxqU"
page = Nokogiri::HTML(open(link))

image_tags = page.css('meta')

image_links = []

image_tags.each do |tag|
link = tag['content']
image_links << link.chomp unless link[0..5] != "http:/"
end

image_links.delete_at(0)
counter = 0
image_links.each do |image_link|
File.open("#{counter}.jpg", "w") do |file|
file.binmode
file.write HTTParty.get(image_link).parsed_response
counter += 1
end
end
>>
>>51586682
>ruby
shit/10
>>
>>51586665
As long as you know streamline content integrated with machine learning/big data [science] with a obfuscated stack pipline delivering a webscale portable system/platform

is utter bullshit

You are okay
>>
>>51586707
you are of one who is utter the bullshit
>>
>>51586675
B-But me and my flatmate already agreed on Python ;_;

I'll look into it.
>>
>>51586807
i forgot about python
start with Python and then Haskell

then Java then Go
>>
>>51586835
oh PHP too, can't forget that one
think that one goes between Java and Go,
definitely above python though
>>
>>51586785
oh no did I trigger you by listing buzzwords?
>>
>>51586889
did someone say buzzfeed
>>
>>51586807
Bad idea dude, go with C.
>>
What's a good, cheap web host? I want to play around with writing applications that interact with a remote server. Stand alone applications, not web pages, if that matters.
>>
>>51586665
(: a left parenthesis
): a right parenthesis

Done.
>>
>>51586930
heroku is free and can run any server on linux
>>
>>51586930
you can get free hosting and domain from hostringer.in for a short period of time. Assuming you don't mind having the hosting be done in curry land
>>
File: finished.png (357 KB, 320x386) Image search: [Google]
finished.png
357 KB, 320x386
Here's American Gothic with the Mona Lisa palette using the same technique.

Produces an interesting effect.
>>
Working on a flashcard app
>>
File: 1441165540792.jpg (89 KB, 621x621) Image search: [Google]
1441165540792.jpg
89 KB, 621x621
>want to learn clojure
>it's the slowest piece of shit on planet earth
>>
>>51583618
straight
C#
>>
>>51587390
Maybe you should

D n r a e L...........D
............ e ...........n.
....DD....a...DD....r.
....DD... r ...DD....a.
.............n............e.
L e a r n D n r e a L
e............n.............
a...DD....r....DD.....
r....DD....a...DD.....
n............e ............
D............L e a r n D


instead
>>
>>51587522
You fucked that up real bad. Now I hate D.
>>
>>51587522
>>51587527

Wow,
 really messed that up

Copy into reply message window to l3et decrypt
>>
>>51587522
D n r a e L . . . . D
. . . . . e . . . . n
. . D D . a . D D . r
. . D D . r . D D . a
. . . . . n . . . . e
L e a r n D n r a e L
e . . . . n . . . . .
a . D D . r . D D . .
r . D D . a . D D . .
n . . . . e . . . . .
D . . . . L e a r n D
>>
>>51586665
A monad is just a monoid in the category of endofunctors, what's the problem?
>>
>>51586997
Here's how it looks for me when I just go at it directly in photoshop.
>>
>>51587692

Is that saving the file and forcing it to use the Mona Lisa palette?
>>
>>51586997
>>51587692
gtp on suicide watch
>>
File: 1b097b73a1.png (672 B, 263x29) Image search: [Google]
1b097b73a1.png
672 B, 263x29
>>51587703
Just using the 16 color palette I created from Mona Lisa picture.

Still doesn't look good though. Only uses a tiny bit of palette. I think the best result would be to reduce both pics to 16 colors and then just replace the palette in second one.
>>
>>51583618
gay lisp
>>
File: my brain is full of fuck.jpg (27 KB, 450x268) Image search: [Google]
my brain is full of fuck.jpg
27 KB, 450x268
>http://developer.android.com/reference/android/view/MotionEvent.html

>Motion events are always delivered to views as a consistent stream of events. What constitutes a consistent stream varies depending on the type of device. For touch events, consistency implies that pointers go down one at a time, move around as a group and then go up one at a time or are canceled.

>While the framework tries to deliver consistent streams of motion events to views, it cannot guarantee it. Some events may be dropped or modified by containing views in the application before they are delivered thereby making the stream of events inconsistent. Views should always be prepared to handle ACTION_CANCEL and should tolerate anomalous situations such as receiving a new ACTION_DOWN without first having received an ACTION_UP for the prior gesture.

>Motion events are always delivered to views as a consistent stream of events.
>While the framework tries to deliver consistent streams of motion events to views, it cannot guarantee it.
>>
>>51587801
>http://stackoverflow.com/questions/10422476/android-motionevent-consistency-guarantees

it's been like this since 2012-2013 and no one seems to give a shit
>>
>>51587801
J . . . a
. a . v .
. . X . .
. a . v .
J . . . a
>>
>>51587719

No, actually.

>>51587735

What you're doing here and what I'm doing are fundamentally different. In mine, once a color is used, it cannot be used again. That is to say: you get one of each pixel in Mona Lisa and must rearrange them in order to create a different picture.

Watch, I'll run mine without removing the used colors and it won't have that dark color 'cleavage' or spottedness (depending on the method) anymore.
Thread replies: 255
Thread images: 25

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.