[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: 23
File: 1453493396375.webm (3 MB, 320x180) Image search: [Google]
1453493396375.webm
3 MB, 320x180
Python is SHIT edition

Previous thread: >>52644165

Kill yourselves
>>
STATIC TYPING

NO TYPE INFERENCE

NO OPERATOR OVERLOADING

JAVA ÜBERMENSCH

SIEG HEIL
>>
File: 1437312183407.jpg (1 MB, 1462x1462) Image search: [Google]
1437312183407.jpg
1 MB, 1462x1462
>""""""Agile development""""""
>>
>>52649931
Shitty garbage collection, basically.a language for skids, fuck java, HEIL C,C++
>>
F# is the straw that will break ocaml's back
>>
>>52649961
That would require F# to do what ocaml does, or more. Maybe in a thousand years.
>>
>>52649903
Your code reminds me of this one:

if(Boolean.valueOf(isWhiteTurn).compareTo(new Boolean(Boolean.valueOf("true"))) == 0) {
isWhiteTurn = Boolean.valueOf(new Boolean(false).toString());
}
else if(Boolean.valueOf(isWhiteTurn).compareTo(new Boolean(Boolean.valueOf("true"))) == 1) {
isWhiteTurn = Boolean.valueOf(new Boolean(true).toString());
}
else if(Boolean.valueOf(isWhiteTurn).compareTo(new Boolean(Boolean.valueOf("true"))) == -1) {
isWhiteTurn = Boolean.valueOf(new Boolean(true).toString());
}
>>
>>52649952
you only ever trigger garbage collection if you use objects very wastefully and you'd get similar speed reductions (just "smeared" instead of a momentary freeze of some milliseconds once in a while) in C/C++ by being shitty with your memory management.
>>
>>52649985
kill yourself idiot

you can make almost any language look equally as bad with deliberately crappy code
>>
>>52649985
That code is more autistic and overdone than the OP.
Point for.it being so autistic it's funny
>>
>>52649995
I'll live just to spite you.
>>
>>52649986
Native > JVM
Still faster technically
>>
>>52649931
That's fine for most applications, it makes things clearer.
>>
>>52649961
Can I get into F# and C# and all on loonix or do I really need ms visual whatever?
>>
Paging vulkan
>>
>>52649968
True, F# will never be a sheltered meme language. It can be sued for real world work sadly.
>>
>>52650019
Use mono for C#>>52650019
>>
(use loop format)

(: x integer)
(define x 7)

(: plusx (number -> number))
(define (plusx n)
(+ n x))

(format #t "result is ~a~&"
(loop for n from 1 to 10
summing (plusx n)))
>>
>>52650019
I don't know
Worst case you can fuck around with a web ide
>>
File: download.jpg (118 KB, 1280x720) Image search: [Google]
download.jpg
118 KB, 1280x720
Who has the best desktop on /dpt/?
>>
>>52650019
F# and C# work just fine on linux. You can either use monodevelop, or use tons of plugins for most popular text editors.

VS Code will be released soon too, so you'll have a MS supported IDE for C# and F# development on Linux. It's in beta now.
>>
>>52649986
OCaml's GC is fantastic. Java's? It's
garbage
>>
>>52649931
So you don't use ANY form of type inference in Java? Talk about unnecessarily verbose code.
>>
>>52650030
>>52650045
Cool thanks, I'll look into mono.
>>
File: DzbFomX.jpg (47 KB, 614x718) Image search: [Google]
DzbFomX.jpg
47 KB, 614x718
>>52650011
>search for java 4chan troll benchmark
>this image comes up
TFW NO GF FUGG
>>
>>52649968
Like parallel computing ? OH WAIT
>>
>>52649931
Java has type inference, ya dingus, via generic methods.
>>
>>52650031
what implementation is that?
>>
>>52650072
example?
>>
>>52650073
Chicken
>>
>>52650062
HashMap<Integer,String> killYourself = new HashMap<>();
>>
>>52650028
Call me when F# is used at facebook and bloomberg. Call me when haxe is written in F#. Call me when F#'s GC is good. Call me when it's fast. Call me when it's not de-facto bound to M$ platforms. Call me when it has even 1/10th of the power of OCaml modules.
>>
>>52650071
https://github.com/ocamllabs/ocaml-multicore
>>
>>52649952
>a language for skids
>HEIL C,C++

I really hope you're joking.
>>
>>52650080
>no 64-bit types
>green threads only
>final destination
>>
>>52650086
>Call me when these very specific companies use F#
LOL. F# is used widely in the financial sector for one. Jet.com built their entire backend with F#, and not just some tiny throw away product like Facebook did. There are more F# jobs than ocaml jobs too.

>Call me when it's fast.
It is. It also supports multi core, and in the main release too.

>Call me when it's not de-facto bound to M$ platforms.
But that's one of it's biggest strengths. .NET is fantastic.

>Call me when it has even 1/10th of the power of OCaml modules.
Name a single thing ocaml modules can do that can't be done in F#.
>>
>>52650079
public <T> T ayy(T t) 
{
return t;
}

ayy("lmao");
ayy(new Integer(1337));
>>
>>52650082
I'm going to humor you. How do you add something to that HashMap?
>>
>>52650086
m8
Type Providers can insert arbitrary code
>>
>>52650092
already debunked.

>>52649878
>>52650038

Ocaml's creator himself is hostile to parallel threading
http://mirror.ocamlcore.org/caml.inria.fr/pub/ml-archives/caml-list/2002/11/64c14acb90cb14bedb2cacb73338fb15.en.html

It's like you don't know a thing about the ocaml scene.
>>
>>52650101
>>no 64-bit types
What applications do you write where 2^62 is not enough but 2^64 is?
>>
>>52650143
Not him

That's not really type inference
That's function overloading with generics
>>
>>52649919
>Penis in the snow too much for the town
What the shit sweden.
>>
File: 18211.png (98 KB, 400x300) Image search: [Google]
18211.png
98 KB, 400x300
>>52650153
int nigger = -1;
HashMap<Integer, String> killYourself = new HashMap<>();
killYourself.put(nigger, "fag");
>>
>>52650174
>That's not really type inference
But it technically is type inference.
>>
>>52650143
fair enough, though it's pretty shitty. Generics is pretty broken in Java, as I'm sure you know. That stuff pretty much compiles to:
public Object ayy(Object t){
return t;
}

ayy("lmao");
ayy(new Integer(1337));


which is probably why Java doesn't care so much if you don't specify the generics types explicitly.
>>
>>52650174
It's 100% type inference.

>>52650198
I'm surprised you don't do
killYourself.<Integer, String>put(nigger, "fag");

you verbose piece of shit.
>>
>>52650214
>killYourself.<Integer, String>put(nigger, "fag");
epic meme tard
>>
>>52650205
>>52650214

The kind that all languages (except ocaml) have had since their inception and nobody is really impressed by
>>
good morning dpt
what are you working on

i am working on a listview for my gui library... finding it really difficult

its the perfect mix of not braindead easy to implement and incredibly boring that im finding it hard to work on
>>
>>52650234
Okay.

Java has type inference.
>>
>>52650241
>java users are this desperate
>>
>>52650241
>>52650214
not the kind where you go like
var nig = nig();


>>52650082 is more along those lines
>>
>>52650126
>nobody.com used F# once therefore F# is used everywhere!
I don't even need to read the rest. As expected of F#fags, logic is not their forte.
>>
>>52650154
So can camlp4, camlp5, ppx, etc.
>>
>>52650205
it's not: you still have to denote the type.
>>
>>52650260
I don't use Java for any reason ever outside of the few classes I took.

>>52650264
You're right, it does not have an equivalent to C#'s var, for example.

However, I never made that claim.

My only claim was simply "Java has type inference"
>>
>>52650266
>$500m company
>nobody
yes anon, it's much more impressive that facebook made one single project with ocaml that is probably abandoned now.
>>
>>52650172
Scientific computing applications. When optimizing non-linear systems, it often happens that the cost reaches a peak (either even at the very beginning, or it could be later during training if conditioning isn't very good). 2^64 is relatively safe (but not always), 2^62 isn't safe for shit.
>>
>>52650156
>2002
You guys really are desperate.
>>
>>52650295
You'll need to provide sources for that statement.
>>
>>52650234
Yeah, ocaml's is very impressive. Too bad other languages don't follow suite.
>>
>>52650291
>less than $10b
>somebody
Choose one.
>>
>>52650295
>2^64 is relatively safe (but not always)
In that case you're fucked either way. Better use 256 bit numbers.
>>
File: fact.webm (436 KB, 1280x544) Image search: [Google]
fact.webm
436 KB, 1280x544
>>52650301
and since then ocaml has still no parallel threads.
>>
>>52650312
My sides! You want me to prove that natural numbers are infinite with that? Didn't you learn that shit in middle school like the rest of us?
>>
>>52650172
2^62 is literally only one fourth of the size of 2^64
>>
>>52650330
Way too slow.
>>
>>52650331
https://github.com/ocamllabs/ocaml-multicore
>>
>work in restaurant
>stressful as fuck, a lot of work
>shit pay
>hired as a webfaggot
>flexible schedule
>spend 6 out of 8 hours shitposting
>pay is super high
i just dont get it
>>
>>52650278
is camlp4 built into ocaml, or just part of the distribtion
>>
>>52650340
>You want me to prove that natural numbers are infinite with that?
Are you retarded? Can you not even read posts? You made the claim that 2^64 is mostly enough for scientifical problems but 2^62 isn't. Prove it.
>>
>>52650387
any chad can be a waiter
only enlightened weeaboo can shitpost
do not underestimate, nor undersell your level
>>
>>52650387
it's going to take some time for the webfag dotcom bubble to deflate entirely
>>
>>52650328
>Haha, I'll just pretend I was being retarded :D
You're not fooling anyone ocaml fag.
>>
>>52650045
VS Code is about as useful as Notepad though
>>
>>52650411
The reality is any chad can be a programmer too. 99% of programming done for websites and apps don't require any problem solving skills whatsoever and when they do you have StackOverflow

You don't need a degree, you just need good old fashioned nepotism or luck.
>>
>>52650436
>You don't need a degree
You do to break paywalls early in your career.
>>
>>52650435
It's a full IDE with debugging and everything. It even has a debugger for Go and a bunch of other languages because of a nice plug-in system.
>>
>>52650435
To be fair, I don't care for VS Code when Visual Studio exists, but it does have Intellisense and a debugger.
>>
>>52650456
It's a nice option when you're on Linux or OS X.
>>
does anyone know haskell here? not him but i'm genuinely curious to see how you'd solve >>52650078 in idiomatic haskell
>>
>>52650057
It's commonly accepted that java has the current state of art garbage collector (G1)
>>
>>52650436
...the result will be shit, won't work and won't sell
I mean, lots of inept quasi-programmers in big corporations for sure; but still, it's not _that_ trivial:
>>52649888
it might be trivial for you, yes. Like I said, do not underestimate, nor undersell your power level.
>>
>>52650485
this
>>
List<Integer> foo = Arrays.<Integer>asList(1, 2, 3, 4);
List<Integer> bar = foo
.stream()
.map((Function<Integer,Integer>)(Integer x) -> x * 2)
.collect(Collectors.toList());


How do I stop the return type of Collectors.asList() being inferred?
>>
>>52650436
web dev is much easier than programming. any non-retarded chad can get a programming job if they really try but most of them won't get good enough to make non-shit software.
>>
>>52650414
>deflate
elaborate

>>52650436
>The reality is any chad can be a programmer too. 99%
no

>99% of programming done for websites and apps don't require any problem solving skills whatsoeve
i dont know if you've ever worked on a large project, but "problem solving" isn't the hard part
keeping everything well structured/modulated and reasonably maintainable is, and shit programmers are notoriously bad at this
>>
>>52650485
That's because Java is filled with state of the art garbage
>>
>>52650505
it's not being inferred there.
>>
chineseFoodOrder.Add("three orders of garlic chicken")
.AndThen("three order of white rice")
.AndThenSoup("sure, three orders of soup")
.AndThen("uh, some fortune cookies")
.AndThen("that's about it")
.AndThen("no, that's it")
.AndThen("NO AND THEN");
>>
>>52650518
>web dev is much easier than programming
maybe if you're a frontend faggot
if you're doing backend, there isn't really much difference from writing a regular application desu senpai
>>
>>52650235
>its the perfect mix of not braindead easy to implement and incredibly boring that im finding it hard to work on
that's why most people use pre-made controls
i'm currently doing a single-line textbox and will also have to do a listbox afterwards
luckily i already have a file manager detail view with a scrollbar though so that won't be too difficult for me
>>
>>52650548
backend is still CRUD shit lmfao there is not much depth to it at all it's just servers n networking n databases. end-user installed applications can involve all sorts of things
>>
>>52650488
>I mean, lots of inept quasi-programmers in big corporations for sure; but still, it's not _that_ trivial

It really is. For the realm of the vast majority of everyday programming, you don't need to be smart. You just work with tools others have created, patterns others have proven, etc

Unless you're one of the few high level fags creating algorithms, doing actual CS, implementing research papers on the daily etc your work is trivial and you can easily pick up what you need to know without a degree.

>undersell
All I'm pointing out is the vast majority of software development people do doesn't require a degree. Agree or disagree?
>>
>>52650527
>keeping everything well structured/modulated and reasonably maintainable is, and shit programmers are notoriously bad at this
Right, that isn't problem solving, that's organizational skills. So what you're saying is people with management experience and business qualifications (MBAs?) are better suited to programming... good stuff.
>>
File: 50314_288865372137_2985807_n.jpg (12 KB, 200x219) Image search: [Google]
50314_288865372137_2985807_n.jpg
12 KB, 200x219
>>52650581
>i literally just finished hello world and browse /g/ that's the extent of my experience in total
>>
>>52650561
>that's why most people use pre-made controls
I'd use Qt but I can't use *GPL tained shit and there's nothing else in C++-land that isn't garbage
>>
>>52650580
>it's just servers n networking n databases
Yeah, it's *only* those things...
>>
>>52650533
How so? It's inferring the return type to Collector<Integer, ?, List<Integer>>. From what I can tell the ? is an internally maintained constructed and inferred type so it's impossible to be explicit.
>>
>>52650611
>doesn't even know that Qt is LGPL
>doesn't know what LGPL is
>thinks it taints anything
You, Sir, are a colossal moron.
>>
>>52650594
i've seen some strawmen in my life anon, but holy shit
>>
>>52650527
>elaborate
Billion dollar evaluations for a site which is yet to turn profit is a good sign of a bubble.

>>52650581
>doesn't require a degree. Agree or disagree?
It doesn't need a _degree_. It _does_ need a certain level of clarity of thinking and depth of understanding, which is orthogonal to having a degree.

Dumb people doing programming results in a huge mess of a codebase, speed of development slowing to a crawl, and then - either shifting deadlines, (semi-)unusable software, or an altogether failure of a project.
>>
>>52650396
There's no semantic difference between the two. Camlp4 is part of the distribution and can be run standalone, but the ocaml compiler can invoke camlp4 automatically during compilation.
>>
>>52650485
>there are people who unironically believe this
It's widely known that OCaml has the best GC of any language (least latency and highest responsiveness by a wide margin).
>>
>>52650633
LGPL can't be used on closed platforms, fampai. I wrote *GPL to be inclusive of LGPL too. Previously using LGPL v2.1 on closed platforms was kind of a grey area (even though the Qt devs sort of explicitly stated you shouldn't, in typical legal-nonspeak)

But now that its v3, its crystal clear. No embedded, no app stores [no android, ios, etc]
>>
>>52650664
ca/mlp/4 isn't part of the core language?
>>
>>52650594
Organizing the code and organizing the people are two different things; MBA _won't_ teach you the clarity of thinking. (And not guaranteed to teach you actual managerial skills, but that's another story altogether.)

>>52650612
Yeah. Dem nerds sitting around in deir chairs pressing buttons. I bet I can do the same, where's my $100k salary?
>>
>>52650683
>>>/reddit/
>>
>>52650677
the one gc that has a GIL ? lel
>>
File: 0pQ8G.jpg (403 KB, 2340x4160) Image search: [Google]
0pQ8G.jpg
403 KB, 2340x4160
>>52650698
Great argument. I'll just take it that you're too retarded to come up with a real response you're so confused the only thing you could think about in your deluded state of buttmad was your homepage.
>>
>>52650698
>i haven't read gpl v3
>>
>>52650722
they shouldn't have put up that warning
>>
>>52650737
modern dysgenics
>>
>>52650618
? is a wildcard and can be any type. It's essentially a covariant Object (? extends Object).
That type argument is literally irrelevant.
See: https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html
"A - the mutable accumulation type of the reduction operation (often hidden as an implementation detail)"
>>
>>52650683
>LGPL can't be used on closed platforms
If you program software on one of those you should end yourself anyway.
>>
>>52650686
camlp4 isn't, but ppx is.
>>
>>52650761
Yeah, I figured out I can do
Collectors.<Integer>toList()
>>
>>52650723
>>52650722
>>>/reddit/
>>
>>52650773
"Correspondingly, it is no longer possible to extend syntax in arbitrary ways."
>>
>>52650713
It's OK, Timmy, you may keep denying reality. Whatever helps you sleep at night. Maybe one day you'll be ready for the real world.
>>
>>52650763
I should end myself if I want the convenience of being able to run applications I write on a smartphone or a tablet?

I want the software I write to run in as many places as possible and not be restricted by the legalese of some toe-cheese eating fat hippie fuck who hasn't contributed anything to society in many many years. Praise your god and watch as he slowly destroys the greatest things free software brought everyone like gcc.
>>
>>52649931
>NO OPERATOR OVERLOADING
But java itself does have operator overloading, it just doesn't let you do overloads. But inside the language there are overloaded operators. Otherwise you wouldn't be able to use + with numbers and strings.
>>
I'm using C++ for the first time in like a decade.

I try to make all my code modular so functions are grouped together but it means I have a bunch of header files shitting up my project directory that only declare one or two functions. Is this normal? It seems awfully retarded, even while saying nothing of the idea of header files in general.
>>
>>52650791
That means you don't have a C-style preprocessor anymore, instead you have a lisp-like preprocessor. You can insert whatever you want, but you can't process whatever you want.
>>
File: feel the bern.webm (2 MB, 1000x1000) Image search: [Google]
feel the bern.webm
2 MB, 1000x1000
Java to make this
>>
>>52650812
Its fine. Just make sure you aren't defining your functions in header files as well.
>>
>>52650062
>>52650804
how about this then you pedants

OBJECT-ORIENTED PROGRAMMING

NO MULTIPLE CLASS INHERITANCE

STATIC TYPING

RESTRICTED TYPE INFERENCE

NO USER-DEFINED OPERATOR OVERLOADING

JAVA ÜBERMENSCH

SIEG HEIL
>>
>>52650824
why not both
>>
Sure is a lot of programming discussion and code being posted in here.
>>
>>52650825
nice
what toolkits did you use
>>
((new Integer(100)) == (new Integer(100))) != ((new Integer(1000) == (new Integer(1000)))
>>
File: 1317251842582.jpg (19 KB, 214x320) Image search: [Google]
1317251842582.jpg
19 KB, 214x320
>>52649931
NO UNSIGNED TYPES

NO PASS BY REFERENCE

THE RIDE NEVER ENDS
>>
>>52650847
Because it makes it impossible to reason about a program, since you don't know which part, if any, will be transformed. You can still use camlp4, but you really shouldn't. You don't lose any power by using ppx, but you make sure it's clear where the code gets transformed (and by which extension) and when it doesn't get transformed.
>>
>>52650796
>I want the software I write to run in as many places as possible and not be restricted by the legalese of some toe-cheese eating fat hippie fuck who hasn't contributed anything to society in many many years

Yet you were considering using that library until you read the legalese.
And a lot of other people use those libraries.
Ironic enough, that fat hippie probably contributed more to society than that egoistic asshole called (You).
I believe you are shit out of luck, enjoy implementing your own stuff.
>>
>>52650886
What about something like generating types for json files, or databases, etc?
>>
File: 320.jpg (145 KB, 1650x1100) Image search: [Google]
320.jpg
145 KB, 1650x1100
>>52650044
Me
>>
>>52650842
>NO MULTIPLE CLASS INHERITANCE

What about multiple interfaces?
>>
>>52650893
>Ironic enough, that fat hippie probably contributed more to society than that egoistic asshole

No he didn't, the license is cancer and now he actively goes out of his way to fuck projects up (like what he did with gcc and its AST -- as someone who's used it since the very beginning its sad to see its going to be surpassed by clang but thats solely because of his poisonous ideology)

The GPL trades everything for ideals. Other licenses have sane practical considerations. Modern day GPL software would be way better if it wasn't under the GPL.

Even Linux would have been better off; just look at how well clang is doing.
>>
>>52650933
Thought she was using a laptop from the thumbnail. Disappointing.
>>
>>52650950
>she
>>
>>52650950
Why would you want to look at pictures of people using computers all day?
>>
>>52650948
GPL is cancer but LGPL is ok. mobileshit can fuck itself anyway.
>>
>>52650611
what do you make controls for if you don't use qt?
>>
>>52650991
>Trap maymay

You're confusing the weebs with the well adjusted people in this thread.
>>
>>52650933
>I'm bored
>my boobs are cold
>I wish I was at home compiling linux
>>
>>52650683
> But now that its v3, its crystal clear. No embedded, no app stores [no android, ios, etc]
Mostly false.

You can't use GPL/LGPL v3 on iOS (without jailbreaking) because of Apple's control-freak walled-garden bullshit. Most Android-based platforms aren't as restrictive, and the (L)GPL certainly doesn't have a general prohibition on "embedded" use.

As for Qt: you're free to buy a commercial licence if you want to use it in proprietary products (e.g. anything on Apple's store).
>>
>>52651000
Without it she's just sitting in a car funny. Why would you want to look at THAT?
>>
>>52651023
>compiling
>implying she didn't create a processor that is inherently unix conformant
>>
>>52650948
>No he didn't
Yes, he did. Most people can live with that license just fine. Just you cant. It's your personal problem.
>>
>>52650683
GPL and other copyright licences are garbage.

MIT is the only way. Even Microsoft know this.
>>
>>52651048
That reminds me Webm for retards uses the MIT license with lgpl licensed shit like ffmpeg, did anyone tell the guy?
>>
>>52651074
so it's a mixed licence? That's not unusual.
>>
Daily reminder that GPL is a pyramid scheme
>>
>>52651088
Is it? I thought you had to make all your shit *gpl if you wanted to use a *gpl licensed library or program with your own. Is it only true for the main gpl line?
>>
>>52650948
I love it when people are completely fine when they have to implement everything for themselves, but then go apeshit because they don't like the license of some code they didn't have to write themselves.
Pure egoism and utter disregard for copyrights. You're probably also a hypocritical fuck who's pissed when people copy your software without your consent.
>>
>>52650936
it's fine
>>
>>52650948
> Modern day GPL software would be way better if it wasn't under the GPL.
Most of it would be dead or mutated into proprietary derivatives with 100-page EULAs.

> just look at how well clang is doing.
Slower code than gcc and supporting a fraction of the platforms, in spite of having the backing of one of the world's largest tech companies.
>>
>>52651101
How can you even function, being this fucking retarded? No really, tell me. You're talking shit about licenses and don't know shit about them yourself?
Holy fuck.
>>
>>52650880
two's complement signed integers and no pass by reference is fine for a high-level language
>>
>>52651124
>>52651074 was my first post in this thread and you should probably stop posting if you can't act like you're old enough to post on 4chan
>>
>>52650172
8x8 bit board
>>
>>52650911
ppx can do that.
>>
>>52651144
yes, that uses 64 bits.
>>
>>52651152
does it generate variable and type names properly?
>>
>>52651160
Yes.
>>
File: wNWC1.jpg (65 KB, 480x270) Image search: [Google]
wNWC1.jpg
65 KB, 480x270
>>52650796
>but i want to take freedom and destroy it
fuck you faggot
>>
>>52651144
The argument was about 64 bit numbers.
Of course you can have arbitrarily long vectors.
>>
>>52651171
Wait, so what can't it do
>>
>>52651101
> I thought you had to make all your shit *gpl if you wanted to use a *gpl licensed library or program with your own. Is it only true for the main gpl line?

That's the difference between GPL and LGPL. GPL requires that the entire work be GPL. LGPL only requires a) that the library remain LGPL and b) that the user has the ability to actually use a modified library with the program (which basically means that binary-only programs can't link LGPL libraries statically, and you can't use them on "tamper-proof" platforms like iOS).

Plenty of commercial software uses LGPL libraries (e.g. anything which runs on Linux, as glibc is LGPL).
>>
>>52651210
It can't transform
hello world

into
print_endline "hello world"

but it can transform
[@@hello world]

into it. Hence, it's like lisp macros (in the sense that only specific forms are allowed as transform-identifiers - in the case of lisp macros it's proc-position symbols, though, which is more natural, but less explicit).
>>
>>52650722
>your deluded state of buttmad
You, sir, are a poet and a wordsmith.
>>
>>52651202
It's represented that way for a reason, it's extremely efficient. All chess games do it. If the language doesn't expose a 64-bit type, you have build a much less efficient structure.
>>
>>52651192
>thinks copyright licences defend freedom
lel
>>
>>52651219
>GPL requires that the entire work be GPL
No it doesn't.
>>
>>52651262
>It's represented that way for a reason, it's extremely efficient.
It's only space-efficient. It's significantly more processor-demanding to do all the bit-shifting than to just do an address-offset.
>>
>>52651271
>"copyright licences"
oh boy here we go again
>>
>>52651317
What else would you call them?
>>
>>52651232
Oh, that's good

I wish MS would turn F# computation expressions into a full blown macro system

This is the syntax I want for macros

MacroTransformer params {
Transformed code
}
>>
>>52651317
copyleft is a form of copyright
>>
Sup, /dpt/.
I want to get a huge monitor, but I don't know how huge it should be. What do you use and what will you recommend?
>>
So is started learning C with "C ANSI" book and I'm having problems just on start.
                                                                
#include <stdio.h>

#define IN 1 /*inside word*/
#define OUT 0 /*outside word*/

main()
{
int c, nl, nw, nc, state;

state = OUT;
nl = nw = nc = 0;
while ((c = getchar ()) != EOF) {
++nc;
if (c == '\n')
++nl;
if (c == ' ' || c == 'n' || c = '\t')
state = OUT;
else if (state == OUT) {
state = IN;
++nw;
}
}
printf("%d %d %d\n" , nl, nw, nc);
}

^this is copied from book word by word but it is not working, it seems like loop does not stop and it doesn't give any result. Where I did a mistake? I'm using gcc if it's changing something.
>>
>>52651356
*code to transform
>>
>>52651121
>Slower code than gcc and supporting a fraction of the platforms, in spite of having the backing of one of the world's largest tech companies.
Its years younger as a project and growing at a far faster rate.

The concern of Stallman and his fellow FSF fags is politics and philosophy.

The concern of permissive fags is actually creating useful software. The kind of utility that allows people to push software without having a crack team of lawyers to consult with first, that allows people to create billion dollar business and employ thousands, that allows technology to jump forward in leaps and bounds

But stay huddled in your free software group think and keep donating to the FSF and the SFLC -- surely hunting down the odd chinkphone manufacturer to force them to post up their slightly modified linux kernel online in the name of the GPL is what the software world needs more of
>>
>>52651361
i use a 23" 1080p monitor and i recommend a 27-32" 4k or 5k monitor if you can afford it. also it must be 8 or 10 bit per channel IPS, not any 6 bit shit
>>
>>52651295
Yes it does
http://www.newmediarights.org/open_source/new_media_rights_open_source_licensing_guide
>>
>>52651373
Apple employee please go.
>>
>>52651311
No, it's really not. For example if you need to which spaces a rook can take you & 0xFF << (8*rank), then do it on a rotated bit board(which also efficient to do). There's absolutely no, it's just a mask.
>>
>>52651436
no looping*
>>
>>52651436
>& 0xFF << (8*rank)
That's still more complex than "+ (8*rank)".
>>
>>52651311
>>52651463
memory access is by far slower than just a few CPU instructions
>>
https://www.youtube.com/watch?v=UtwaK-s9QRI
>>
>>52651370
>it seems like loop does not stop

EOF is ctrl+d on *nix, ctrl+z on Windows.
>>
>>52651479
You're accessing the exact same amount of memory in both cases. That is, two bytes.
>>
>>52651479
>i don't know how L1 caches work
>>
>>52651463
It's not the same thing, the & 0xFF is checking 8 squares, the entire rank.
>>
File: mAegWXy.gif (2 MB, 300x306) Image search: [Google]
mAegWXy.gif
2 MB, 300x306
>>52651020
>well adjusted people in this thread
>in this thread
>well adjusted people
>>
>>52651311
CPUs generally have to mask off words in order to access individual bytes, just that you don't write it explicitly in the source code
>>
>SJW
>software justice warrior
>>
>>52651495
non-trivial data sets often don't fit in the L1 cache
>>
File: noodle.gif (938 KB, 500x339) Image search: [Google]
noodle.gif
938 KB, 500x339
>>52651490
Thanks for Your help.
>>
So if I want to make a simple stupid webapp with websockets I'm stuck with either python, java or javascript for backend?
>>
>>52651575
>>52651585
>>
>>52651526
64 byte easily fit into any L1 cache on any processor that was produced in the last 20 years.
>>
>>52651617
what are you fucks even talking about? of course you will use more than 64 bits for most things
>>
>>52651575
any of those will work fine.
>>
>>52651526
>non-trivial objects
The L1 cache can hold a fucking page (4096 bytes), what kind of non-trivial local variable doesn't fit in a page anon? We are talking about 64-bit vs 62-bit integers here...
>>
>>52651681
if you need the full 64 bits per variable which you very well could then you're fucked
>>
>>52651638
>what are you fucks even talking about
Uh, what are you talking about? Not him, but I'm pretty sure we're discussing 64-bit ints here.
>>
>>52651575
OCaml.
>>
>>52651691
The point is you can just use 2 32 bit variables.
>>
>>52651638
a 8x8 chess field
>>
>>52651691
You can store 2048 consecutive and aligned 64-bit ints and it would still fit in the L1 cache. How often do you have frame sizes larger than that? (in other words how often so you have 2000 local variables give or take)
>>
>>52651726
2000 is nothing and they don't need to be local you fuck
>>
>>52651762
We were talking about representing a 8x8 chessboard as a bitmap. If you need more than 2000 64-bit integers to do so, I don't think programming is for you.
>>
>>52651720
That wouldn't be as great, you'd have to account for pieces moving off the half boards, your check mask would need to be across 2 variables, rotations would twice as many instructions, and a bunch of other crap.

It's almost like 64-bit int was meant for chess, it just works so well.
>>
>>52651791
any chess program with "AI" is going to be more complex than that
>>
>>52649919
>python is shit
[Citation Needed]
>>
You literally can't store an 8x8 chessboard in a 64 bit integer
>>
>>52651808
>>52639500
>>
>>52651805
Moving the goalposts are we? Nobody said anything about AI, we were talking about how to represent the board.
>>
>>52651811
Of course you can store a completely empty field.
Or are you saying that there can only be an empty field or a figure? Are you saying that black figures should have the same values as white people?
Fucking racist.
>>
>>52651791
As compact as you can go I think would be 8 64-bit ints, 1 for each piece(pawn, knight, ...) and 2 masks for the white/black pieces.

In a chess AI you'd need to store a lot of these to perform a heuristic search.
>>
>>52651827
>you can store a completely empty field

No you can't you retard
>>
>>52651820
any interesting "chess program" is going to have AI

or are you a multiplayeronly shitter?
>>
>>52651833
Explain to me again how a field of 64 bits can't represent an empty board with 64 fields?
>>
What data structure should I use to store a 19x19 Go board?
>>
>>52651832
I think it would be better to use 64 individual bytes tbqh
>>
>>52651832
That's just for the board, chess state would also include + 4 bits for available castling, and +64-bits to store en passant(when available), also 2 counters.
>>
>>52651882
4d string array
>>
>>52651882
my dick, probably

alternatively, as series of descriptive strings, one for each coordinate, that describes what is happening to that particular coordinate.
>>
>>52651859
We weren't talking about the program. We were simply talking about how you represent the board itself. Stop moving the goalposts.
>>
File: deferred.png (67 KB, 1050x576) Image search: [Google]
deferred.png
67 KB, 1050x576
what's the difference?
>>
>>52651882
long double to future proof your app.
>>
>>52651900
why care at all about "efficiency" if you're only storing 64 bits all in all you fucking retard
>>
>>52651875
If you mean the subtype "empty chess board" then it would only have a single possible value, and as such take up no space whatsoever.

You can't store no space in some space.
>>
>>52651884
Most operations are much less efficient on that byte array.

Although if it's meant to be very fast, that implementation is much simpler.
>>
>>52651904
they're probably using the terms interchangeably but shading means all colorization and lighting is specifically the light source effects
>>
>>52651925
*not meant
>>
>>52651904
shading is usually the act of taking geometry (polygons, usually triangles), and running it through a bunch of gpu-programs called 'shaders' to process them and get an image at the end

lighting something you accomplish through the use of certain kinds of shaders
>>
>>52651925
person you're talking to probably didn't think of this but you can sometimes combine operations

e.g. 8x8 checker board, stored { { 00, 01, 02 ... }, col1, col2 ... }
i want to check if there's anything in one column

&FF
>>
>>52651916
>and as such take up no space whatsoever.
But you CAN represent it that way and it would be accurate. Just because there is a better performing version doesn't mean that you can't do it any other way.
>>
>>52651951
No you can't.

How do you represent an empty chessboard in 64 bits? Show me.
>>
>>52651948
That would be a bit board, the 64-bit int, you can't & 0xff on a byte array.
>>
>>52651964
literally 0
>>
>>52651892
>strings to describe a limited set of actions
>some people that learned c++ because other languages are so slow are actually doing this
>>
>>52651913
Butthurt detected

As you said yourself, you need to store it efficiently because you might have heavy algorithms such as an AI. That's why storing it efficiently is important
>>
>>52651977
No, I mean if you want to check a specific column
Plus you could do that too

Check if there's anything anywhere:
8x &FF
alt:
64x &1

>>52651997
Show me the code
>>
>>52652020
>As you said yourself, you need to store it efficiently because you might have heavy algorithms such as an AI. That's why storing it efficiently is important

>>52651900
>We weren't talking about the program. We were simply talking about how you represent the board itself. Stop moving the goalposts.

HURR
>>
>>52651997
0 in which field? you can't represent all 6 pieces in a single bit. What does 0 mean? 0 pawns? 0 queens?

see >>52651832
>>
>>52652030
#define CHESSBOARD_EMPTY 0

int chessboard = 0;

if(chessboard == CHESSBOARD_EMPTY) {
puts("you are fucking retarded");
}

#undef CHESSBOARD_EMPTY
>>
>>52652049
FUCKING RETARD

what about an empty chessboard don't you understand

it's ONE THING

how can you not represent ONE THING in SIXTY-FOUR BITYS

REEEEEEEEEEEEEEEEEE
>>
>>52652057
not storing an empty chessboard
>>
>>52652070
literally retarded

you apparently have no concept of abstract reasoning

like a literal newborn
>>
>>52652057
>>52652080

if (chessboard == CHESSBOARD_EMPTY)

>I don't even understand what an if statement is
>Just because there are other options, doesn't mean there are other options - it's abstract reasoning maan
>>
>>52652097
kill yourself RETARD
Thread replies: 255
Thread images: 23

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.