[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: 36
File: haskell-logo.png (4 KB, 128x87) Image search: [Google]
haskell-logo.png
4 KB, 128x87
old thread: >>54314128

What are you working on, /g/?
>>
fuck mediocrity and mediocre people.
>>
>>54322512
Thinking about a database scheme and reading about different database abstraction layers for Haskell.

What about you OP?
>>
File: 1460517574202.png (333 KB, 823x720) Image search: [Google]
1460517574202.png
333 KB, 823x720
>>54322552
>he hasn't done anything significant his whole life
>calls others mediocre
>>
Listening to Wolfgang Gartner, Savant and M|o|o|n while learning java.

>>54322512
Okay, made it different now:
package QaE_Objects;
public class SomethingIsWrong {

public static void main(String[] args) {
Rectangle myRect = new Rectangle(40,50);
myRect.getWidth();
myRect.getHeight();
System.out.println("my Rect's area is: " +
myRect.area());

}
}

package QaE_Objects;


public class Rectangle {
private int height;
private int width;

public Rectangle(int h, int w){
h= this.height;
w= this.width;
}

public int getHeight(){
return height;
}

public int getWidth() {
return width;
}

public int area(){
return this.height * this.width;
}


}


but a question I do still have:
How could I have made the Rectangle class to fit the SomethingIsNotRight main class?

And why do I not need setters here?
Anything I can do better, more secure?

I also think about working on Haskell in the summer
>>
File: lisp.png (135 KB, 600x551) Image search: [Google]
lisp.png
135 KB, 600x551
>>54322553
Thanks for asking. I'm a bit disenfranchised rn. It's sunday afternoon, I have little work to do, but nothing to divert me, preferably programming-related. Pls poast quick algorithms+datastructures problem I can think on. I can into lazy evaluation, continuations, Curry-Howard, and all the 120+ IQ stuff btw.
>>
>>54322576
I'm not even a professional developer but the shit I've made is way better and a least of a professional quality compared to the garbage you seem on greenlight by amateurs.
>>
>>54322591
assignments in your constructor ar still backwards, and you're calling the getters into the void.
>>
File: 1408294214005.jpg (29 KB, 377x377) Image search: [Google]
1408294214005.jpg
29 KB, 377x377
>>54322594
>says the indie scene is garbage
>says greenlight is garbage
>moves the goal post
>>
File: looking.jpg (167 KB, 506x735) Image search: [Google]
looking.jpg
167 KB, 506x735
>>54322512

Ive been using Vim and looking for ways to use it better. Watching youtube video about python in vim and pair programming tmux stuff like that.

This guy builds his vim for python somehow. Where I have just been installing the vim from the repo on ubuntu.

What is there to gain through that? I know stuff that used to work like powerline no long works as a plugin and more of a mod to the program itself.

How do I learn about that shit? Modifications to vim that are not addons but actual mods tot he source?
>>
File: clj.png (4 KB, 120x120) Image search: [Google]
clj.png
4 KB, 120x120
>>54322592
Also please find concurrent problems that can be tackled efficiently by Clojure's model pls pls pls
>>
>>54322597
thanks. I am taking a break and tidy up my room first, though.
>>
>>54322609
>>54322594
>>54322576
>>54322552

As long as hes not a prick at least its the right attitude. Fly with eagles instead of turkeys and all that.
>>
>>54322609
>some of the amateur stuff on greenlight/indie scene is so garbage compared to my stuff. Not all of it tho.
I think he's coherent. Wrong but coherent
>>
>>54322592
What about writing a scheme parser in Haskell?
I believe scheme has an LL(1) grammar so you can create a simple recursive descent parser.
Or it would be a good time to learn parsec or something.
>>
>>54322609
>he ignores the fact my post was about mediocrity
>moving the goalposts to talk about the best example of mediocrity
and yes, the american indie scene is trash made of subhumans who don't even play games.
>>
>>54322609

Greenlight stuff is probably people learning. There more to it then just programming ability. You would be suprised the massive amount of shit there is to learn around every corner.

Which is why indie has always been weaker then big team projects. Corporation or just small company.
>>
>>54322630
Yeah why not! I remember fiddling around with Parsec already. This way I can go back to it. Thanks anon-ra.
>>
>>54322615
Same guy that just replied with >>54322630

Take a look at WOOT (Without Operational Transformations) which is an alternative to operational transformation for doing collaborative realtime text editing.
You could try implementing a WOOT library in Clojure and do a small web backend that can synchronize the text and store it in a database as JSON or something.

There is an example implementation in Haskell here https://hackage.haskell.org/package/woot
>>
File: france.jpg (55 KB, 1200x675) Image search: [Google]
france.jpg
55 KB, 1200x675
>>54322667
>https://hal.inria.fr/inria-00071240/document
mothertongue orgasm. Merci mon frère
>>
>>54322643
nigger, one of this first shit I uploaded to the internet and the google play store was basically an original take on breakout.

And it was something polished.

no excuses nigga.
>>
I'm doing a couple things for work. One is a JSF (Java ServerFaces) application. JSF sucks. It uses this stupid "component based" model for trying to write web applications and it's terrible. Not only is it fundamentally bad, but it's also incredibly buggy. I spend almost every day having some issue only to find a Stack Overflow page describing how it's actually a bug in the implementation.

The other project is a replacement for some database export code. The original developer is one of these "geniuses" who sits on a high horse of complex design patterns. He's the kind of person who would write Enterprise Fizzbuzz without any sort of irony. The utility to export some database tables is so horrifically complex and over designed. Everything is a fucking abstract class like AbstractOracleTable or AbstractIntegerField with an inheritance hierarchy longer than his virginity streak. It's thousands of lines of code and reinvents the wheel for god damn everything. I was able to rewrite it in about an hour. The hard part is convincing this other team to actual use it. I keep telling them that I'm no longer supporting the old tool so if they have issues then they're up shit creek. They're still resisting and of course they are falling behind schedule because they have to stop everything they're doing every couple days to figure out why the old application is broken again.

Even when this export utility "works" (doesn't crash), it still produces bad output. So even in the best case scenario, we still have to run the export files through a custom parser we wrote to get the exported data back into the correct format.
>>
File: ddh.jpg (595 KB, 1945x1140) Image search: [Google]
ddh.jpg
595 KB, 1945x1140
>>54322688
Retracting. There's only the abstract in French, and his English is horseshit. Anyway.
>>
>>54322667
I'm working on some collaborative editing and I'm curious if anybody could tell me if it's recommended to create a lot of tables?
I want to create a table for each project. Each project contains a lot of documents.
>>
Rust is the best language. Prove me wrong. Protip: you can't. Protip2: the coc is not part of the language. Checkmate, atheists!
>>
>>54322630
a :: [Int]
a = 0 : a

main = print $ a == a

hangs forever.

Seriously, fuck Haskell.
>>
>>54322695
This.
Compared to the garbage that gets on phones and greenlight, the crap I throw in the trash for being too broken, simple or ill-thought-out are AAA masterpieces.

Hell, the text adventure I made in qbasic when I was 8 is objectively a significantly better game than crap like gone homo and whatnot, yet it was quite short and purely text-based (with colors, music, player stats and skills, etc.) so I never dared show it to anybody.
>>
>>54322767
It's fine, but the syntax is pretty shitty and the ownership system gets in your way too much.
>>
>>54322792
Ok
>>
Just benchmark my shit up senpai.
from random import random
languages=['C', 'C++', 'C#', 'Java', 'Haskell', 'Perl', 'Python', 'JavaScript']
for language in languages:
print language+':', random()*100
>>
Is there an algorithm to shuffle an array but to keep each element within a certain distance from its original position? I was thinking of splitting the array into distinct subgroups and shuffling each. Is there a better way?
>>
>>54322810
The syntax is comfortably C-like for the pajeet while also offering high-level constructs for people who know what they're doing, all the while retaining consistency compared to the likes of C++ which require intensely complex backtracking parsers to parse.

The ownership system is the best way to ensure memory-safety, and the easy way out is just an @ away if performance doesn't matter.
>>
>>54322834
Start at the first item. Pick a random item at most K units forward. Swap them. Register both of them. Go to the next unswapped element.
>>
>>54322851
>The syntax is comfortably C-like for the pajeet
were pointers too hard for ya, buddy?
>>
>>54322834
It's not an algorithm if it produces a random result.

>I was thinking of splitting the array into distinct subgroups and shuffling each
This would be very good for parallelization so I guess it would be a good idea.
>>
>>54322512
How hard is it for a python pleb to get into C++
>>
>>54322868
>I have literally no clue what an algorithm is: the post.
Never post in this thread ever again.
>>
>>54322834
Yup i wrote work about it, i used it for cryption/decryption... i can give you the paper, only math is in the paper, and its on Serbian :|, look at formulas only ;) xD if you want it just tell me i will put it online :)
>>
File: asdasdasdcuck.jpg (338 KB, 800x1077) Image search: [Google]
asdasdasdcuck.jpg
338 KB, 800x1077
>>54322884
>>
>>54322873
How well do you know Python?
>>
Alright niggers, what's the good lisp. Something with a good standard library.
>>
>>54322867
Rust essentially retains pointer syntax, but the semantics are different so as to prevent bugs by rejecting bad programs. This allows pajeet to work for you for pennies without making your program unpublishable, while also ensuring mission-critical programs worked on by the foremost experts in the field actually work and don't reproduce therac-25.

Understood, pajeet? This is good for you!
>>
>>54322901
They all suck. Even the ones with the best standard libraries (racket and common lisp) are not good enough.
>>
>>54322901
Racket is real good, with a real good planet. Also it handles cyclic data structures better than Fcking Hasklel >>54322792
>>
>>54322884
You don't have a deterministic runtime if you iterate random lengths.
>>
>>54322910
How is webpages+slides+John Carmack's VR shit not enough? Seriously?
>>
>>54322901
MacLisp, which is Lisp before the Dunning-Kruger Lisp weenies became 99% of the Lisp programmer population.
>>
>>54322862
Would this not result in the last elements not being shuffled well? Or is that taken care of by the previous elements?

>>54322868
>It's not an algorithm if it produces a random result.
https://en.wikipedia.org/wiki/Algorithm
https://en.wikipedia.org/wiki/Shuffling#Shuffling_algorithms
Where are you getting that definition of algorithm?

>>54322886
Thanks, but I don't have a strong background in maths so it probably won't help.
>>
>>54322924
See >>54322884
>>
>>54322933
>Where are you getting that definition of algorithm?
I explained myself badly there. Yes an algorithm can create a randomized result but what I meant was that the algorithm he is looking for isn't an 'algorithm' since it doesn't have a deterministic time complexity.
>>
>>54322911

Racket actually looks pretty good. Even the web stuff in the standard library looks pretty straightforward.

I might have to start tinkering with it.
>>
>>54322926
Because that's not general programming. Carmack can afford to rewrite the entire standard library in an afternoon, you can't. Carmack et al. can produce 10 man-years' worth of work in a week, you can't. If you could, literally any language, no matter how niche, could be used for any task, no matter how common.
>>
warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ [-Wformat]


ayy
>>
>>54322946
Congrats, you are dumber than my big toe.
>>
>>54322899
>just realised I don't know shit about python
Isn't python a very self-explanatory language, how much is there to *know*?
I can do simple things like web scraping and bash-tier scripting
I've never made a module and have no idea how classes work but I'm not bad at figuring out things
It's just that compared to python, C++ seems impossible
>>
>>54322969
Try doing some OOP in Python before jumping to C++.
Or you might try C instead which doesn't make use of classes.
>>
>>54322959
Then fuck is your requirements for a "good standard library" ? Racket has the most extensive one of any language, no doubts about it. lazy evaluation, continuation capture, hygienic macros, best module system, threading, and more, where else?
>>
I am working on learning C# , I could not find a good PDF so giving this a try https://channel9.msdn.com/series/C-Fundamentals-for-Absolute-Beginners

Any recommended resources for learning C# ?

I can program in PHP and shell but those are nonsense langues.
>>
>>54322933
Man look at permutation matrices... And permutation matrices with k0,..kn shifts i think that will be the translate :)
https://en.wikipedia.org/wiki/Shift_matrix
And Kronicker two Shift matrix ;) do it on the paper you will see that will help you...
You can group elements and shift them, and you control groups and shift :)
>>
>>54322985
>Racket has the most extensive one of any language
No.
> no doubts about it.
Oh, you're just trolling, nevermind then. I r8 you 4/10.
>>
>>54322997
>>>/tumblr/
>>
>>54322512
A recursive function to calculate your moms mass.
>>
>>54323020
.!.
>>
>>54322993
>could not find a good PDF
libgen
>resources for learning C#
c# 6.0 in a nutshell by albaharis
or Bart De Smet's latest c# unleashed
>>
I know that /g/ loves Haskell so hopefully this is a good place to ask.

I've recently been learning a lot about functional programming concepts via work I've been doing with JavaScript and Scala.
>inb4 language flamewar
At this point I know "babby's first fp concepts" like streams, monads, higher order functions, currying, immutability etc. Now that I've got the basics, I want to pick up a "strict" functional language so that I can learn about what it means to build software completely in a functional style, rather than just using functional concepts within an imperative-style program. I've decided on Haskell.

I've worked through a good amount of "Learn You a Haskell for Great Good!" but I don't learn very well from books. I really need a project to work on where I'm forced to figure out how to use the language to achieve a desired result, rather than just following steps and trying to memorize what I'm shown.

So, does anyone have any good ideas for a reasonably complex "first project" in Haskell? I'm looking for something like the "ToDo App" that JS devs use to compare libraries and frameworks. I haven't really seen this kind of thing in the Haskell world. I want something complex enough that I'll have to really think about how to use the language, but not so complex that it'll take me more than 40-50 hours to complete.

Thanks in advance!
>>
>>54322984
sounds like a good idea
python OOP looks very interesting
thanks
>>
>>54322997
Thanks for this, I'll try figure it out.
>>
>>54322512
So I made this function that computes the logarithm using taylor sums. The problem is that it returns garbage values. I made it print the values of the sum and they are correct for ln(5), but it returns a bigass number.
double ln(double x)
{
int i;
double sum;
if(x>0.5f)
{ return sum;
for(i=1; i<100;++i)
{
sum= sum+ pow((x-1)/x,i)/i;

}

}
else return -1;
}

What is wrong /dpt/? It only works for x>1/2 so -1 is the stupid user input number.
>>
>>54323122

Maybe initialize sum to 0.
>>
>>54323116
You can make the algorithm to be the compexity of n because permutation matrix are rare possed matrixex + then only have one 1 i each row and each column, and when you multiply them the you will get one big matrix and with it you can multiply the array you have and thats how you will get the shift you want ;)
>>
>>54323010
>look at him. HE's the troll, not me
1/10, but nvm. Either you show me an equivalent of the following in any other lang, or you get to stfu.

#lang racket

(module dummy lazy
(require (for-syntax (only-in racket/base syntax)))
(provide (for-syntax anchor))
(define-for-syntax anchor #'x))
(require 'dummy)
(define-syntax (lazy-code stx)
(with-syntax ([(lazy-code expr) stx])
(datum->syntax anchor (syntax->datum #'expr))))

(println (force (lazy-code (let rec ([n 0]) (cons n (rec (add1 n))))))) ; (0 . #<promise>)
(println (let rec ([n 0]) (cons n (rec (add1 n))))) ; puts you in OOM
>>
File: 80640695.jpg (50 KB, 400x572) Image search: [Google]
80640695.jpg
50 KB, 400x572
>>54322614

When you type vim --version and see all the possible options that can be compiled in, how do I learn about them? I am digging through the wiki now for a list or table or something.
>>
xD man in if(){
return sum
}
that return sum should go down bellow for :) that is the problem besides >>54323144 :)
>>
File: chinese homer.png (76 KB, 441x411) Image search: [Google]
chinese homer.png
76 KB, 441x411
>>54323144

Woopsie, I had the memory of doing that, only the memory. Being a dyslexic STEMfag is the living hell. Now it works.
>>
>>54323172
Yeah, I was going to type that it was a retard debug version but the namefriend answered first and I noticed the errors at the same time. Thanks people.
>>
i need to create a function in c++ that gives me the length of a string, basically strlen, but strlen and external libraries are prohibited

int lengthFunction (char x[]) {
for (int i=0;i<(sizeof(x)/sizeof(x[0]);i++)
return i;
}


output for any char[]-input is always 0.
something went wrong somewhere.
i think my function doesnt grab my char array. anyone has a clue?
>>
>>54323082
search github for something along the lines of
 language:Haskell stars:<50 

stars limit is there to exclude most bigger projects that will be unfeasible to implement
you could also try repo size limit in kilobytes e.g.
size:<100

Scroll through projects, see what you'd like to implement and as a bonus when you're finished you'll have a 'reference' implementation to compare with that probably doesn't suck massively (assuming repo has some stars/forks)
>>
does /dpt/ have a monoscreen or multiscreen setup?
>>
>>54323192
>>54323177
>>54323172

By the way, I'm the only one who gives hentai-esque sentences when asking for input or answering wrong user input like "OH SENPAI IT IS TOO SMALL HOW CUTE BUT IT WON'T WORK UGUUU :3" in my assignments?

>>54323217
Why sizeof(x[0])? Use the size of the unit (char). And you said in the for loop that i=0 and asked for a return value. When you return you quit that function. (You return to the other one)
>>
Hello, /dpt/.
I would like to write a script that downloads all files from mega.co.nz links on a blog.
Can someone please point me in the right direction on how to start?
Feel free to send me to /sqt/ if stuff like this isn't usually discussed here.
>>
>>54323246
wut?
return ends the function and returns to main() again, return i.
char is 1 bit.
sizeof("fuckyou") = 7.
sizeof(x[0])=1 cause 1 bit.

so 7/1 = 7, is quite redundant in terms of chars but useful in other primitive data types.

the mistake is somewhere else
>>
>>54323243

Ive got 2 4k korean things 40 inch each. Allong with a 27inch 1440p monitor in the middle that is for gaming.

I usually dont need more then one of the 4k monitors for work though. It replaced 1080p ones I had in portrait. Now I just split the screen into 2 or more columns with different windows. Its all on monitor arms cause these things are fuck huge.

You dont really need multiple monitors for work as I do alot of coding on a laptop with tmux and other ways to manage screens. But its nice for everything else.
>>
>>54323286
You're retarded.
>>
>>54323260
Too add to this:
Would something like pic related be useful?
I don't care too much about what language to use since I have not dived too deep into a particular one.
I just found something I really want to solve and think it's a good start to finally further my interest in programming.
>>
damn, first time on this board, i usually browser other programming related sites.
you guys seem like jerks, everyone is insulting each other, what's wrong with you people
>>
>>54323232
Good idea, thanks. I didn't think to do this.
>>
>>54323286
The loop runs one time, executes the only thing it can (return) and gives the values of i, which is 0 because it didn't ran more than one time. Look m8 I have 2 weeks of C, and no matter what be polite when asking for help you triple nigger.
>>
File: Web-Scraping-with-Python.png (66 KB, 250x328) Image search: [Google]
Web-Scraping-with-Python.png
66 KB, 250x328
>>54323303
forgot pic
>>
>>54323260
>>54323303

Python though you might just want to get into some popular rss reader.

Thats what you want you need to scrap. Beautiful soup I think is a python library full of this shit.

RSS reader is a good starting python project though. You can put it on a pi and just make it more complex over time as you learn.
>>
>>54323334
>>54323323

I dont know if you need a book. Just start with something that downloads rss feeds and move on. You can make it scrap anything pictures links whatever. Then make a script to do something with them.
>>
File: algorithm.jpg (33 KB, 444x500) Image search: [Google]
algorithm.jpg
33 KB, 444x500
What is the best way to study this book? Should I just read it from cover to back or should I jump around or follow some guide?
>>
>>54323294
isn't the text super small on 4k?
>>
>>54323334
>>54323346
Thank you, Anons.
I'm going to look into RSS feeds.
>>
>>54323347
bumping for info on this
>>
>>54323356
Increase the DPI, nigger.
>>
>>54323376
Kill yourself, retard.
>>
>>54323356

You can mod it but mostly no. I have no problem with any of the ubuntu/debian flavors right out of the box. Even windows display scaling (historically shitty) works well on 40'' 4k and 27'' 1440p cause thats the no display scaling sweet spot. They might have fixed that in 10 anyways.

>>54323374
There is a guy on youtube sentdex who has a tutorial on some basic shit. Usually I get away from videos after breaking the ice though. Tends to be slow going that way and I dont retain as much as when I am working with text.
>>
>>54323383
half the programs i use don't have scaling, nigger
>>
>>54323347
You can definitely jump around, reading what interests you the most first. Just get through the 'Foundations' part before doing that
>>
>>54323401
>tfw the programs you make don't have scaling because you're too tarded to know how
>>
>>54323442
i didn't say i made them, they're just old
>>
File: 1424991401624s.jpg (7 KB, 240x232) Image search: [Google]
1424991401624s.jpg
7 KB, 240x232
>>54323453
I meant my own.
>>
>>54323442
>>54323453
>>54323401

Doesnt matter 40 inch is big enough that 4k doesnt make the text small.
>>
File: 1462111448879.png (2 KB, 120x120) Image search: [Google]
1462111448879.png
2 KB, 120x120
>>54322615
I could not help but notice your png was not optimized anon.
I have optimized your png.
Your png is now optimized.
>>
>>54323471
ah, try xaml, it's pretty neat

>>54323473
guess you have a point, altho i use scaling on a 23inch 1080p monitor
>>
File: Untitled.png (2 MB, 1680x1050) Image search: [Google]
Untitled.png
2 MB, 1680x1050
rate my image viewer, and post yours.

you HAVE made an image viewer, right?
>>
>>54323396
Please, die in a fire.
>>
>>54323502
Doesn't count if you used any libraries. You must write your own renderer, decoders, and decompressors.
>>
>>54323502
it's pretty shitty
>>
>>54323554
well I only used the winapi (gdi+). am I still disqualified?

>>54323555
t-thanks
>>
>>54323578
Only a little disqualified. Net qualified.
>>
Has anybody else thought of making a machine learning thing that tracked everything you did and gave you a report once a week on your activities?
>>
>>54323619
I want to make a smart cum rag one day that will track your dietary and exercise habits and correlate it to load volume. But I'm still figuring arduino and sensors out so it'll be a while.
>>
>>54323619

Might be a good idea to make something that pays attention to you and tells you what shit you do that makes you trackable. So you can either change it or obscure it.

Like when you look at your browser finger print but a more general thing. I know you could make a little vm that sends out bullshit to cloud anything tracking you.
>>
>>54323619
I'm not following how machine learning is related to that
>>
>>54322614
Certain plugins depend on having language support compiled in. The plugin community is pretty against writing plugins in anything other than vimscript unless you've got a good reason, so most plugins don't need the language support.

There are a few notable exceptions, mostly depending on Python support and a couple needing Ruby. But most package managers have a few different versions of vim with different language support, so you won't need to compile your own. I think ubuntu's vim with the most language support is vim-nox if I remember correctly.
>>
>>54323619
Where does the learning factor in? Do you want it to give you the report before the week?
>>
File: 1461011038295.png (850 KB, 600x919) Image search: [Google]
1461011038295.png
850 KB, 600x919
const char *names[] = {
"Peter", "Bob", "Richard", "Stallman"
};
const int names_len = (sizeof(names)/sizeof(names[0]));

int main() {
printf("%s\n", names[names_len]);
return 0;
}


why does this segfault?
>maki as thanks
>>
>>54323628
you could train me to do that desu
>>
>>54323502
This is so completely unimpressive I'm not sure why you even bothered to post it. Was it written in machine code or on an atari?
>>
>>54323676

Im looking for something that tells me what each of the features are. Having a hard time. I can get a list inside vim itself but mostly its one word or abbreviations and I was looking for a description of each.
>>
>>54323260
scraping those links and sending them to a different script/function can be done in less than 15 lines
it's the downloading from mega.nz part that's going to be the real challenge
>>
>>54323658
>>54323677
It should learn your behavior and give you suggestions on where to improve.
>>
>>54323619
I have something like that. It's even better though because it gives me the report before I start doing the things.
>>
>>54323681
I can't tell if you call namelenght minus one or not (because I'm on mobile) but do the former.
>>
>C
extern const volatile unsigned long int cuck;
>>
>>54323619
You wouldn't need an ML alg for that. Hell, what part of the system would even use ML at fucking all?
>>
Programming noob, trying c#. Why is the type juggling so painful?
>>
>>54323676
Literally install gentoo.
>>
>>54323502
Change it to show images from a specified /s/ thread instead and set margins to 0px and I would use for months
..wait a second
it crops images to fit width??
that's crap
but still
post source pls
>>
>>54323730
the part that automatically scrapes sadpanda when anon comes home
>>
>>54323728

> he doesn't know how to manage memory
> he can't cope with data types
>>
>>54323700
Most of those really don't matter. I'm sure you can find out, but you're going down a rathole with that, and won't come out with much to show. They're more important if you're compiling vim for a limited system and need to take features off to remove bloat. Otherwise, just make sure you've got python and Ruby support, and that's as much as you need to worry.
>>
>>54322512
I'm writing a simulation program for a highly specific field.
If all else fails, I'll take the old Fortan code pieces and put them into a mex for Matlab - and hope no one ever looks at it too close while I'm still around to maintain it.
>>
>>54323760

There is a python 3 flag in there. These dont matter for in editor though right? Its just to enable plugins written in python?
>>
>>54323703
This is less machine learning heavy than you think, I see two components: define improving yourself, what should the algorithm maximize or minimize and more importantly think about psychology and about what you can actually change and suggest to the user aside from "do more of the thing that's good and less of the thing that's bad".
>>
File: Untitled.png (2 MB, 1680x1050) Image search: [Google]
Untitled.png
2 MB, 1680x1050
>>54323696
post yours, if you can do so much better.
>>
File: 1428996417366.jpg (104 KB, 800x500) Image search: [Google]
1428996417366.jpg
104 KB, 800x500
>>54322512
I'm creating a GUI interface using visual basic to see if I can track an IP address
>>
>>54323813
>my work is good because I worked on it!
you can work as long and hard as you want on shit, it'll still be shit
and I won't need to make better shit to say yours is shit
>>
>>54323781
Exactly.

Something you will get good use out of:
nnoremap Q @q


Put that shit in your vimrc and enjoy easy throwaway macros. qq to start recording, then q to stop. Then mash that motherfuckin Q button to repeat forever.
>>
File: 46GB.png (26 KB, 460x644) Image search: [Google]
46GB.png
26 KB, 460x644
holy fucking shit
>>
>>54323879
>it occupies so much space it turns German
holy fucking shit indeed
>>
File: browser #113.png (975 KB, 840x1010) Image search: [Google]
browser #113.png
975 KB, 840x1010
>>54323752
>to show images from a specified thread
that's not quite possible. it only really has a board gallery. the thread "gallery" is just a column of images.

>source
lol. no.
>>
>>54323964
>le america is the only language :^)
>>
>>54323879
I went through that shit yesterday
it didn't take more than 1.5 hours though
>>
>>54323681
>names[0.8]
u wot m8
>>
>>54324006
>What is integer division.
>>
>>54323972
>that's not quite possible
What?
You already got it to display all images from a specific thread
Now just get it to display those images on where the threads would be
>>
File: persuasion.webm (2 MB, 640x360) Image search: [Google]
persuasion.webm
2 MB, 640x360
Ask your much beloved programming literate anything.

>>54322512
>What are you working on, /g/?
Implemented generic trampolines in C on x86 32 bits.

>>54322873
http://preshing.com/20141202/cpp-has-become-more-pythonic/
>>
>>54324035
easier said than done.
and what would be the technique to switch back and forth between board and thread galleries?

no. any thread gallery mode would be handled in the thread preview window, but instead of a column it would be a grid. that's the best way to handle it.
>>
>>54323217
char x[] decays into a pointer in the param
>>
File: led.png (33 KB, 791x547) Image search: [Google]
led.png
33 KB, 791x547
I am designing a small weather station that has an ambient light sensor. It uses a 5 mm LED as a sensor and a transimpedance amplifier circuit. Its linear measurement range is approximately from 500 to 10 000 lux. Is this enough for outdoor measurements? Pic related..
>>
>>54323347
BEST BOOK EVER :D but it only contains begginer stuff so biginners get on it ;)
>>
>>54323879
took like 30min for me, mostly because i forgot to turn off peerblock
>>
>>54324471
Are you really using an LED as the sensor, or is it an LDR like a sensible person would use?

Also, the light sensor on my chinkphone can measure ambient light between 5 and 30,000 lux, so you probably need a larger range.
The lower end isn't quite so important if you're in a built-up area with enough light pollution that it never really gets properly dark, but will definitely make a difference in rural areas.
I'd suggest using a sensor with a usable range of at least 100 - 20,000 lux.
>>
why havn't the devs of django released their ORM as a separate module yet?
shit's fantastic, and if it was released you could extend it to generate code for other languages as well
>>
>>54322792
Well no wonder, you're using a non-productive function on codata.
a = 0 : a
main = print $ map (\x -> x == x) a
>>
>>54324471

In addition to: >>54324638
Looks like even my shitty phone sensor doesn't cover a large enough range:
https://en.wikipedia.org/wiki/Daylight#Daylight_intensity_in_different_conditions

Mid day sunlight is around 100k lux, and even moonlight can be as low as 1 lux, so your given range is nowhere near enough.
>>
Is Java certification worth it?

I don't have a CS degree, but I really like java so far.

What kind of stuff do you need to know for the Associate cert?
>>
>>54322591
You barely understand how variables work, don't start Haskell any time soon.
>>
>>54324713
Yes, but make sure you get that JME1 certification - mobile is the future.
>>
>>54323619
rescuetime.com
>>
>>54324769
What kind of stuff do you need to know for the most basic level?
>>
File: 1439545899669.png (10 KB, 327x173) Image search: [Google]
1439545899669.png
10 KB, 327x173
>>54323879
>git integrated into VS
>>
Can someone recommend a good resource to learn OpenGL for someone who knows Java pretty well?
>>
>>54324769
Well i agree but i not at all... Because i think OS's on cloud and your hole PC on cloud is the future ;)
>>
>>54324769
>mobile is the future.
that was 10years ago, the future is now
>>
>>54324871
http://ptgmedia.pearsoncmg.com/images/9780321399526/samplepages/0321399528.pdf
but you need math to do it ;)
>>
>>54324850
http://nehe.gamedev.net

>>54324833
Is this new? Pretty sure I've had that for a year which is when I started developing on it.
>>
>>54324638
>>54324694
I'd like to use a LED because it is cheap and has a linear, albeit very high-impedance, voltage output.
At the moment I am mostly interested in the illuminance levels between sunrise and sunset.
>>
>>54324850
>>54324898
xD Drunk me drunk that is the post...
>>
>>54324902
It gives a linear response to lux, but maybe consider whether that's actually a good thing or not.

The visible difference between 20,000 and 25,000 is much harder to detect by eye than the difference between 50 and 100 lux.
Either through additional circuitry or using a different component, you should be getting a logarithmic response back to make the data actually useful.
>>
Just wrote this sudoku solver:
#define V ;for(n=0;o=q[n],n<81;n++)
int o,n,q[];d(i,a,j){V i=o?i:n;V a|=(n-i)%9&&n/9-i/9&&i/27^n/27|i%9/3^n%9/3?0:1<<o;for(j=9;q[i]=j;)i=1<<j--&~a&&d(n,0)?n:i;return n==i;}main(m){for(scanf("%d",&m);m--;){V scanf("%d",q+n);d(n,0)V printf("%d ",o);}}
>>
>>54325020
may be a nice solution but the readability is -10/10 and most likely not faster or anything than any similar readable solution you could write
>>
>>54325062
>-10/10
>0/20
>10/30
>>
>>54324554
did you read all of it or just parts of it?
Also how hard is the questions in the book?
>>
>>54325092
?
are you new to sarcasm and the internet?
>>
>>54325103
Well dont know about the question because i dont look at them... I only lear the theory book have because that is what is important, and when you learn that you are on horse ;) thats that btw you should ask more people because my branch isnt computer graphics but you must pass the exam ;) :) btw we here learned OpenGL version 1.0 xD i know its the 90s but you learn much more and are better prepered for other stuff :)
>>
>>54324968
That's indeed a good point. I need to re-consider using an LDR in this project.
>>
>>54325103
>how hard is the questions in the book
Some are retard easy because they just require some small modification to the algorithm/data structure just reviewed in the chapter and some are retard hard.
Look for instructor's manual on the internet, so you have a better idea on how to answer some harder questions if you're stuck (only thing is I've been only able to find the instructor's manual for the 2nd edition not 3rd)
>>
File: marx.jpg (131 KB, 1920x1080) Image search: [Google]
marx.jpg
131 KB, 1920x1080
>>54322512
Happy workers day, /dpt/
>>
>>54325249

I'm so glad he died in his 60s, before he could continue to do more damage to the world.
>>
>>54325282
shut the fuck up, you anarcho-libertarian-capitalist-christian-neoliberal-traditionalist bullshitter

btw, since you are here: 1st may is what it is because REAL anarchists were executed by the Chigaco state.

also, this is NOT the "labor" day, it's the WORKERS day.
>>
>>54325282
>tripfag being stupidfag as always
>>
>>54325348
>REAL anarchists

"REAL anarchists" are grimy socialists. That's why they were an utter failure.

Good riddance.
>>
>>54325249
yeah no, the day and that person are not connected
>>
>>54325376

Actually, REAL anarchists are capitalists.

https://www.youtube.com/watch?v=KXNRzI64L9Q
>>
>>54325398

I was only speaking to his claim. Proper modern-day anarchists are anarcho-capitalists.
>>
>>54325410

Hey, you were looking for a Lisp earlier, right? Tried Clojure/CLR?
>>
>>54325381
I know, but communists and socialists, alongside anarchists, commemorate may 1st

>>54325348
forgot to mention, statist...
it's funny that these lolbertarians hate the state so much, and talk about coercion of the state (as shown in >>54325398 ), yet they love the military
see, murricans are retarded.
>>
>>54325249
they are, in some sense: https://en.wikipedia.org/wiki/International_Workers'_Day
https://en.wikipedia.org/wiki/Haymarket_affair
>>
File: 1442567755375.png (104 KB, 316x442) Image search: [Google]
1442567755375.png
104 KB, 316x442
I want to open source some software. What fucking license do I use? What's the difference between BSD, GPL, and MIT?
>>
>>54325459
>yet they love the military
>see, murricans are retarded.

What do you mean "they"? I don't love the military, nor do most ancaps or serious libertarians.

>>54325442

Not yet I haven't.
>>
>>54325487
GPL: nobody can steal your shit and sell it as their own.
MIT: anyone can fuck your shit and you'll never even realize.
BSD: you're a cuck.
>>
>>54325521
Apache?
>>
>>54325501
>No true Scotsman :^)

A small handful of people who identify as libertarian are against the military, but the vast majority are in favour.
Whether or not you agree with how they define themselves is irrelevant, much the same way that no "true" Christian would openly judge anyone for anything, but most do frequently.
>>
I'm wanting to get into Scheme. Where should I start? Should I use Guile or Emacs with Guile? Should I even learn Emacs at all to begin?
>>
>>54325555
>A small handful of people who identify as libertarian are against the military, but the vast majority are in favour.

No they aren't, at least not in favor of what we have currently. Libertarians believe in a state, usually (that shouldn't be a surprise to you) and they think defense is one of the functions of the state.

I don't think the state has any legitimate functions.
>>
>>54325521
>GPL: nobody can steal your shit and sell it as their own.
not 100% correct.
you can sell GPL shit made by someone else, you just have to give your customer the GPL and also the source code, in case they ask for it. sure the copyright is owned by the creator, but the software can be sold by someone else.
>>
>>54325459
> capitalist workers don't celebrate may 1st
>>
>>54325585
You must still credit the original author even in binary form as the GPL license must be reproduced.
>>
>>54325487
CC
>>
>>54325566
Would you like some help moving those goalposts? They sure do look heavy!
>>
>>54325566
>I don't think the state has any legitimate functions.
Even military? You're going to have a hard time dealing with any equally powerful or more powerful state that wants to fuck you up.
>>
>>54325615
just filter him out like everybody else
>>
>>54325615
>Would you like some help moving those goalposts?

The goalposts haven't been moved. That's why I said "ancaps and serious libertarians". The things you are talking about (hating the state) are usually reserved for fringe elements of libertarian-minded people.

You conflated these fringe elements with the general group, and that was your undoing.
>>
>>54325598
ok?
>>
>>54325634
>Even military?

That's right.
>>
>>54325598
yeah, that's what I meant.
I myself am thinking about selling specialized GPL software... being unemployed is no fun.

I talk to the main devs, though, I will respect their will
>>
>>54325663
use this site for human readable versions: https://tldrlegal.com/license/gnu-lesser-general-public-license-v3-(lgpl-3)
>>
>>54325686
>I will respect their will
if they released it as GPL, then you have nothing to talk to them about
>>
File: carpet fence.jpg (46 KB, 599x512) Image search: [Google]
carpet fence.jpg
46 KB, 599x512
been wanting to build android app for a long time now. so i've been learning Java, as that's supposedly the language android apps are written in. so been self teaching java and slowly building the app to run on pc. then tweak it to run on android. nearly done with pc version, so start watching google's video series on using android studio.
>Maven
>Gradle
>JSON
>Commander
>XML
WT actual F?!
do i need to learn these TOO?
what is there place beyond Java in making Andy's Apps?
>>
File: 1457686637126.jpg (48 KB, 404x600) Image search: [Google]
1457686637126.jpg
48 KB, 404x600
Ok, so I'm a first year computer science student and I'd rather not bother my teachers with every question I ever have, would anyone please be willing to act as a kind of mentor to me?

I'm currently stuck on an assignment and google isn't answering my questions (and it's due tomorrow)

I can use Skype or Kik or whatever you want to talk over but it'd be really nice to have someone to talk to about stuff since I don't like anyone in my class.
>>
>>54325459

It should be noted that Libertarians are not Anarchists like Jacob Spinney in that video I linked. What makes a Libertarian a Libertarian is the desire for a minimal state, not a non-existent one. An economically successful stateless system would inevitably be crushed by rival militaries. What keeps China and Russia playing nice instead of invading the US with their rather large militaries? A solid, unified military... with as many aircraft carriers as the rest of the world combined.

Clearly a state is necessary. What a Libertarian argues for is that we don't have the state intervening in business or in our daily lives.

>>54325555

Most Libertarians I've met are for a military, but against its use to police the fucking world. That said, I'm personally okay with sending our military out against ISIS, since they're a threat to more than just the region they're inhabiting.

>>54325521

Why do you believe that someone forking your program and using it in some proprietary code is "stealing"? No one is being denied the use of your code.

>>54325501

Well Clojure's a pretty cool Lisp if you're interested in going that way. It's like Scheme... with more sanely named builtin functions and keywords, and with a fairly large standard library depending on if you're targeting the JVM, the CLR, or JavaScript (and a sizable core standard library that's available on all platforms).
>>
>>54325686
what's the issue? let someone pay you to make a specialised version of a GPL project. Then there's no issue.

Most people generally won't be happy about software they pay for being open source and freely distributed. Might as well just charge for custom software like most freelancers.
>>
Sorry for the dumb question, but will C++ crash if I do

>if(ptr == null || ptr->someBoolFunction)

when the pointer is null? Or will it stop checking after the first condition is satisfied?
>>
>>54325733
>Java
just use a common compiler and drop java. the common compiler will let you export to IOS too.
>>
>>54325739
Another tripfag to the filter.
>>
>it's a "tripfags blow another commie bastard the fuck out" thread
God bless
>>
>>54325738
>bother my teachers with every question I ever have
that's the whole point of being in school is to ask questions, ffs just kill yourself
>>
>>54325758
actually i'm glad i'm learning java. want to get my nephews into programming soon. and they are total minecraft addicts, so i'm sure they'd love making their own mods, and i'd like to help them along. (one is addicted to cheating, so i KNOW HE will wanna make the mods lol)
>>
>>54325798
Another tripfag to the filter.
>>
>>54325818

I was already in your filter, comrade.
>>
>>54325798
I find extremists of any political paradigm tend to share a common trait of wanting to ignore or silence anyone who disagrees with their own opinions.
>>
>>54325746
>Or will it stop checking after the first condition is satisfied?
yep
>>
>>54325797
>minecraft
>mods
you don't know jack shit about minecraft modding, it's a fucking shitshow and you'll need third party tools because the game creators have never released modding tools because they're fucking stupid.
no, you won't be modding minecraft, you're too stupid for it.
also
>lol
fuck off to facebook
>>
>>54325746
It's fine, "||' is short circuit

you can do
if (ptr && ptr->function)
since null is false
>>
>>54325798
Personally ignoring someone is a long, long way from having them black-bagged.

If the only reason you have for people to listen to your ideas is "muh free speech", don't be surprised to find your audience limited.
>>
>>54325787
>tripfags
>lolbertarians and "anarcho"-capitalists
>blowing anyone
ok.

you can put your trip back on now.
>>
>>54323681

Arrays in C are not actually arrays and exhibit weird behavior, anon.
>>
>>54325842
why are you /b/tard trolls in /g/ today?
>>
>>54325835

I don't care to silence communists or socialists. In fact, I wish for them to speak freely. By doing that, they condemn themselves. The reason that communism and socialism are so unpopular now is that people have the wealth of information the internet provides. People can look and see the incredible failures. They can see the cost in human lives. They can even read first hand accounts from the people that were unfortunate enough to live in these places.

Free speech is beautiful.
>>
>>54325867
Lurk more.
>>
>>54325862
>blowing anyone
What if they're gay
>>
>>54325835
Another tripfag to the filter
>>
>>54325790
I see them once a week and would rather just have someone to chill and talk with than be emailing my lecturers non fucking stop.

Take the stick out your arse mate.
>>
>>54325883
after years of being here, i've lurked enough
get off your bloody rag and stop being a cunt
>>
>>54325738

Just ask your questions here. We won't do your homework for you, but we could probably point you in the right direction.

>>54325733

>Maven
>Gradle
Some pretty standard build tools. If you're working with Android Studio, you can probably do without knowing these.

>JSON
Not really necessary for Android development. Useful to know anyways.

>Commander
Don't know what this is. Never used it when making Android applications.

>XML
In Android development, typically what happens is you use XML to describe the GUI -- what components have what positions in what layouts, etc... and Java to describe the interactions between components. The rules of XML are pretty goddamn simple though.
>>
>>54325904
Lurk moar newfag.
>>
>>54325872
>The reason that communism and socialism are so unpopular now is that people have the wealth of information the internet provides.
lol
you don't know shit about history, or even real life.
you live in a country that elected a president that promised (social) "change", and now has a candidate that calls himself socialists... even after the communists/socialists were politically prosecuted and practically hunted for decades.

dumbass
>>
>>54325849
>
if (ptr && ptr->function)

yeah but that won't mean the same thing as in the original code
>>
File: sad.jpg (411 KB, 3264x1952) Image search: [Google]
sad.jpg
411 KB, 3264x1952
>>54324067
>tfw no question
>>
>>54325936
are you a fag?
>>
>>54324067
>>54325936
Who's your waifu
>>
>>54325872
>They can even read first hand accounts from the people that were unfortunate enough to live in these places.
did you know that most russians would prefer to go back to the soviet union, rather than live in the current russian state?

>>54325936
are you celebrating Workers' day?

do you feel the need to get some attention, even when you are posting anonymously?
>>
>>54325933
>has a candidate that calls himself socialists

Who is losing horribly to a war-hawk. That should show you just how unpalatable people find 'socialism.'

It's a curse, a stain on humanity. I'm so glad the historical record on communism and socialism hasn't been whitewashed, despite how desperately its proponents try (e.g. "Not Real™ Communism").
>>
>>54325935
Yes it will
>>
>>54325923
thank you kindly, Anon!
>>
>>54325974
No it won't you're right
>>
>>54322905
>implying pajeet could ever get his programs through the borrow checker
Why do you think they use Java?
>>
>>54325999
Nice trips, faggot. You're now a tripsfag.
>>
>>54325967
>did you know that most russians would prefer to go back to the soviet union

The collapse of the Soviet Union was not graceful. Complete governmental failure is never pretty.

I'm not surprised that these people had more stable lives during the latter years of the USSR.

>are you celebrating Workers' day?

I am now. :)
>>
>>54325997
Also
if (!ptr || ptr->someBoolFunction())
call the actual motherfocker or...
>>
>>54325972
>Who is losing horribly to a war-hawk.
that has enough power to play dirty tricks with thousands of voters.
but hey, the US is the major exporter of democracy, how can one have any doubt about these elections. democracy in the US is so good, here we are seeing a so-called anarchist DEFENDING IT.

top kek, fucking ignorant retard.
>>
>>54326031
>here we are seeing a so-called anarchist DEFENDING IT.

I'm not defending it, I'm just telling you how it is. In fact, I hope Hillary's underhanded tactics hurt the population enough that they decide it's time for a revolt. That'd be good. Sanders' bread lines would have worked just as well. If Trump wins, I doubt he'll have enough clout to actually bring down the US, even by mismanagement.

>the US is the major exporter of democracy

Which is a terrible tragedy. Democracy is an awful system. It enforces the tyranny of the majority.
>>
File: umaruic.webm (1 MB, 640x360) Image search: [Google]
umaruic.webm
1 MB, 640x360
>>54325962
Umaru-chan, the best himouto.

>>54325967
>are you celebrating Workers' day?
No

>>54325967
>do you feel the need to get some attention, even when you are posting anonymously?
Just want to help.
Thread replies: 255
Thread images: 36

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.