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

/dpt/ - Daily Python Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 330
Thread images: 42

What are you working on, /g/?

Old thread: >>61056544
>>
Have you bought yourself a rad github t-shirt already?
>>
Threadly reminder not to use Rust.
https://doc.rust-lang.org/1.4.0/book/dining-philosophers.html
struct Philosopher {
name: String,
}

impl Philosopher {
fn new(name: &str) -> Philosopher {
Philosopher {
name: name.to_string(),
}
}
}

fn main() {
let p1 = Philosopher::new("Judith Butler");
let p2 = Philosopher::new("Gilles Deleuze");
let p3 = Philosopher::new("Karl Marx");
let p4 = Philosopher::new("Emma Goldman");
let p5 = Philosopher::new("Michel Foucault");
}
>>
File: 1494592459187.gif (2MB, 270x188px) Image search: [Google]
1494592459187.gif
2MB, 270x188px
Started reading the Rust book. It feels a bit restrictive but I think I'll get used to it
>>
>>61059021
Do you prefer Plato or something?
>>
>>61059037
He prefers Adolf Hitler for maximum edgyness
>>
I want to program in many languages, some that don't have auto-completion in any IDE.
I also want to want to edit just regular files easily and possibly remotely.
Which editor/IDE is the best and easiest to extend to my liking?
Currently using emacs.
>>
Can /dpt/ implement this function?

f : forall α β β' γ γ'. (β -> α -> β') -> (γ -> α -> γ') -> (β, γ) -> α -> (β', γ')
>>
>>61059037
Nice try, Anitfa.
>>
>>61059059
Notepad
>>
>>61059059
(Neo)Vi(m) is the most suited to your need, but if you're already using Emacs, it's already peachy.
>>
>>61059060
f a b (c, d) e = (a c e, b d e)
>>
>>61059079
>neovim
splitter!
>>
>>61059074
Yeah 'cause you have to be a retarded crypto-fascist to appreciate the value of the works of Marx.
I bet you don't even know that Marx wasn't a marxist.
>>
>>61059021
Why does it have String and str type?
Why do you need to specify -> return-type instead of just having the return type after closing ) and ) { meaning void?
If you are defining fields in the struct declaration why do you need specify fn for the new in the implementation?

>let
>let
>let
Why is there million lets and why do they need = after let, shouldn't it be pretty obivious that value comes after symbolname?
>>
>>61059086
Brothers, we have to unite against the real enemy!

Nvi.
>>
>>61059082
You fucker.

I wanted /dpt/ to argue about me not saying what the function should do
>>
>>61059104
String is a variable length string, &str is a reference to a fixed size array of chars.

And let is needed because denoting initialization from declaration is useful to both scoping flexibility (which is important in a RAII language) and compiler optimization.
>>
>>61059104
>Why does it have String and str type?
162
down vote
accepted


String is the dynamic heap string type, like Vec: use it when you need to own or modify your string data. (It is the replacement for the old ~str type, which has now been removed.)

str is now just always a (immutable1) sequence of UTF-8 bytes (of unknown length) somewhere in memory. Since the size is unknown, one can only handle it behind a pointer, meaning that str most commonly2 appears as &str: a reference to some UTF-8 data, normally called a "slice". A slice is just a view onto some data, and that data can be anywhere, e.g.

in static storage: a string literal "foo" is a &str, where the data is hardcoded into the executable and loaded into memory when the program runs.
inside a heap allocated String: String dereferences to a &str view of the String's data.

on the stack

>>61059104
>Why do you need to specify -> return-type instead of just having the return type after closing ) and ) { meaning void?
I don't see anything wrong with it
>let
>let
>let
Actually pretty nice. let (x,y,z) = (23,1,-34);
>>
>>61059096
I cannot see the correlation between Karl Marx and programming.
>>
>>61059118
Stop trying then.
>>
>>61059155
Congrats, you figured out why >>61059021
is a troll.
>>
>>61059166
That's me dumb fuck.
>>
>>61059181
Introspection is a wonderful thing.
>>
>>61059181
Of course, since you are the only one who cares
>>
>>61059187
>>61059191
Antifa x 2
>>
>>61059104
> Why does it have String and str type?
The same reason C++ has std::string, std::string_view and char* - one own the string, and other doesn't.
> Why do you need to specify -> return-type instead of just having the return type after closing ) and ) { meaning void?
I have no idea why -> is needed, but you can omit it and it means (), i.e. void.
> If you are defining fields in the struct declaration why do you need specify fn for the new in the implementation?
I don't understand the question, are you talking about fields not being public by default? Because you can use put `pub` in front to make them.
> Why is there million lets
Because this is not an assignment but a declaration. The same reason you need to write `int` in `int a = 10;` in C.
> and why do they need = after let, shouldn't it be pretty obivious that value comes after symbolname?
Why do people use punctuation? It makes texts easier to read.
>>
File: wDbF4sl.jpg (261KB, 489x1200px) Image search: [Google]
wDbF4sl.jpg
261KB, 489x1200px
>>61059204
>>
>>61059222
Have fun throwing fire bombs at police officers while wearing Ray-Ban sunglasses.
>>
>>61059204
No I am an uncucked true aryan popularist globalist journalist nationalist with a recipe to save the near extinct white people from cultural degradation coming from outer space and reptiles
>>
>>61059104
Because the language is failed by design. Obviously Rust shills like >>61059208 won't acknowledge it and come up with poor excuses.
>>
SOMEONE GIVE ME GOOD PROJECT TO WORK ON AND NOT SOME TIMEWASTER TRIVIAL SHIT
>>
>>61059208
>> Why is there million lets
>Because this is not an assignment but a declaration. The same reason you need to write `int` in `int a = 10;` in C.
>> and why do they need = after let, shouldn't it be pretty obivious that value comes after symbolname?
>Why do people use punctuation? It makes texts easier to read.

Meanwhile in superior lisp
(let ((
x 1
y 2
z 3)))
>>
>>61059251
>Because the language is failed by design
Are you really an uneducated? Ada has 8 string types
>>
>>61059261
(((okay)))
time elapsed: 2 hours
>>
>>61059263
>ada being shit somehow make rust any better
ok buddy
>>
>>61059263
Ada is from the 80's. So is C++.
One might think that new languages would learn from the mistakes made in previous languages.
>>
>>61059284
>>61059285
That's not what I meant, idiot. You simple are too dense to understand. Why do you have bools when you got ints? Why do you need ints when you got longs? They have differences
>>
File: 1493426861354.jpg (41KB, 400x400px) Image search: [Google]
1493426861354.jpg
41KB, 400x400px
>>61059251
But you, being the obvious patrician that you are, won't dignify these "poor excuses" by an answer, for of course you couldn't be wrong.
>>
>>61059261
Well, you can do
let (a, b, c) = (1, 2, 3);

if you *really* wish to.
>>
>>61059285
>>61059284
>representing data ownership in the type system is a bad thing
>>
>>61059321
These brain dead idiots don't even understand what ownership means
>>
>>61059285
>not passing everything by reference like a Java-toddler and relying on GC to collect it
>a mistake
Whatever you say, pajeet.
>>
>>61059337
If property is theft, then surely using Rust is criminal?
>>
>>61059300
>String::from("antifa")
>"antifa".to_string()
>"antifa".into()
>&str
Great langauge. Too bad I'm too stupid do understand all of it :^)
>>
>>61059365
>Too bad I'm too stupid
I know. I bet you also watch watered down shows like anime too.

Some people never grow past the age of 12.
>>
>>61059357
Are you having a mental break down now that your shitty arguments ran out?
>>
>>61059357
Nice try Proudhon.
>>
>>61059382
I bet you only only read books because you're so intellectual.
>>
>>61059414
uguu
>>
>>61059414
We, however, don't have to guess on the fact that you don't read books. It's pretty evident.
>>
>>61059021
>1.4.0
Why are you linking to outdated docs?
>>
>>61059021

It's really a shame that helicopters didn't yet exist in Marx's time, otherwise he could have been thrown out of one into a large body of water.
>>
>>61059435
Who do you mean with 'we'? Your Anitfa friends? Also, reading Marx's manifesto doesn't make you smart.
>>
>>61059472
If by "Anitfa friends" you mean people that have the attention span of reading a book, yes why not
>>
File: 1486024652652.png (488KB, 1000x1050px) Image search: [Google]
1486024652652.png
488KB, 1000x1050px
>/pol/tards derailing the thread
>again
Can you not, please?
>>
>>61059472
Das Kapital is the only useful one anyways.

But here's something you ought to read http://www.ada-auth.org/standards/ada12.html
>>
>>61059498
/pol/ shit doesn't only ruin thread, it ruins a board too.
>>
>>61059488
I've never thought that Antifa members and sympathizers were able to read. I guess they're just as intellectual as Karl Marx.
>>
>>61059526
It ruined this whole site desu.
The influx of newfag since the election has really put the last nail in the coffin of all boards, including /pol/ ironically.
>>
>>61059261
>Meanwhile in superior lisp
>
(let ((
x 1
y 2
z 3)))

Now this is boyond sad, it's tragedy
>>
>>61059547
It started with the fappening. Election gave it a real boost. Now that plebbit banned their containment subreddit, 4chan is pretty much the facebook for edgy kids these days.
>>
File: 1493245789653.jpg (299KB, 900x900px) Image search: [Google]
1493245789653.jpg
299KB, 900x900px
>>61059566
lul dude redbill me on 4chen xD
>>
>>61059566
Normally I wouldn't care and just go away, but atechan and lainchan are ded as fuck these days.

Hacker culture is finally dead.
>>
>>61059585
C A N C E R
A
N
C
E
R
>>
>>61059585
>tfw the normies kicked us from even Desolation Row
>>
>>61059585
What really saddens me is that probably some of these scum of the earth is shitposting in /g/ as I write this.
I bet the neo nazi cancer ITT is one of those.
>>
>>61059611
Watch you mouth boy. You're pro diversity goyim. Remember that.
>>
>>61059622
FUCK OFF!
>>
File: miwUuDe.jpg (77KB, 1168x804px) Image search: [Google]
miwUuDe.jpg
77KB, 1168x804px
>>61059611
>>61059622
Dubs confirm, gas all non programmers, thread war now.
>>
>>61059628
Wow, rude. I didn't expect that from Antifa.
>>
>>61059357
Property is indeed theft and I can prove it.
As an example let's consider the case of food.
Let a thing belong to you if and only if you've earned it.
A food is, of course, a thing.
Let earning a thing mean working as hard to have it as you would have had to work to make it. (Trivially, if you have made a thing, you have of course worked this hard by an axiom of identity, and so you have earned it.)
If you have worked as hard to have a food as you would have had to work to make it (from scratch, of course) then you have expended the calories in that food.
If everyone justly earned everything they ate, everyone would starve very quickly.
The human race is not extinct.
Therefore, property is theft.
>>
>>61059590
Science is not really popular these days. Millennial are more interested in using the technologies, not researching them.

This is what you get when a nation gives up critical thinking and starts slurping all the hot garbage they are fed by the media --left and right
>>
>>61059645
Why don't you fuck off back to your day care board you useless fucking piece of filth?
>>
>>61059663
>Millennial are more interested in using the technologies, not researching them.
That's because scientific research is so poorly paid, and nowadays people have five or six figures of student debt to pay off.
>>
>>61059663
I'm willing to bet most americans think science is some sort of black magic done by "the liberals".

I'll enjoy watching Americans fall off the cliff
>>
File: monitor.png (320KB, 1920x1080px) Image search: [Google]
monitor.png
320KB, 1920x1080px
>>61058989
I'm builing a shitty version of M/Monit because I didn't know it existed until recently.

Features
- HTTPS with client auth
- JSON-lines logging format, allows you to log arbitrary data alongside time/values
- Automatic actions when data is bad or overdue (e.g. no hearbeat from system X for Y hours)
- Easy plugin system for automatic loggers like CPU/HTTP response/bitcoin price/whatever
>>
>>61059681
>student debt
Can't wait for that bubble to burst. The whole wide world is going to be in shambles, but the US will never recover.
>>
>>61059676
Why do you get so upset when Antifa is mentioned? You even called me a neo-nazi. I'm thoroughly shocked.
To make things up, I'll send you the manifesto of another great philosopher: Adolf Hitler. They say he's on par with Karl Marx.
>>
>>61059699
Most Americans outright deny many scientifically proven facts.
>>
>>61059663
> Science is not really popular these days. Millennial are more interested in using the technologies, not researching them.
This was always the case, stop romanticizing the past. If anything, people were even more stupid back then due to worse education.
>>
>>61059717
>makes a thread about programming political on the getgo
>B-but I was only pretending to be retarded
Fuck off, seriously.
>>
>>61059709
Right after I finish my degree.
>>
somebody PLEASE help me

>>61059630
>>61059630
>>61059630
>>
>>61059723
>people were even more stupid back then
Are you implying anything changed?
>>
>>61059723
People were less educated, true, but they weren't as anti-intellectual.

A few decades back, being a scientist was not only a high paying job but the shit people aspired to do.
>>
>>61059720
Most Americans believe tap waters make frogs gay
LMAO
>>
>>61059662
>Therefore, property is theft.
I realize now that this conclusion may seem obtuse.
The point I'm making here is that the extreme example of fairness I propose as a definition of property (owning = earning, earning = expending energy equal to that necessary to create from scratch) is unrealistic, and is not the actual definition we use.
However, it's the only definition that's truly fair.
Since the definition we use must by necessity fall short of this definition, and by extent of true fairness, our definitions of property are therefore UNfair.
An unfair definition of property is akin to theft.
In this, I have proven that "property," as we know it, is theft. (From mother nature, in particular.)
However, I have also proven that theft (from mother nature) is necessary for survival and there is fundamentally no alternative.
>>
>>61059736
It's hard, but it's definitely possible.
Try and make a list of all the instructions you can use, then of all the ones you need, and then write pseudo-instructions to replace the ones you can't use directly.
>>
>>61059750
>People were less educated, true, but they weren't as anti-intellectual.
This
>>
>>61059709
I worry there's a whole barrel of shit waiting to explode. Student debt, house prices, personal debt, mass job automation just around the corner, aging population needing social security and medicare (or equivalents in other countries)
>>
>>61059729
Wow, you already told me to fuck off twice. That makes it even more rude.
Did you know that Karl Marx was the founding father of two other great philosophers? Maybe you've heard of Joseph Stalin and Mao Zedong.
>>
>>61059736
Shellcode which does what exactly?
Either way, just go look at how amd64 instructions are encoded and see what you can produce with that.
>>
>>61059775
Have you ever had the feel of "I don't belong here"?
Now is the time.
>>
>>61059741
Educational standards are higher, more people have college degrees.
>>61059750
>they weren't as anti-intellectual.
They were, creationism and flat earth aren't new things.
>shit people aspired to do
What's your source tho? How do you compare such things? Back then and right now there are people who are genuinely interested in science and people who think the Earth if flat. If anything, it's better now because you can make fun of the latter on the internet.
>>
>>61059786
Nah, it's pretty comfy. Too bad there was a sudden influx of Rust "academics" from Reddit.
>>
File: 1456740776959.png (72KB, 512x512px) Image search: [Google]
1456740776959.png
72KB, 512x512px
>>61059021
I don't actually see any reason not to use Rust. Care to elaborate?
>>
>>61059765
>>61059776

Thanks for the tips, I'll make a list of instructions that fall within 0x20-0x7e

The shellcode is just supposed to open a shell, the target program uses setuid
>>
>>61059791
Academics are welcome.
>>
>>61059789
>people who think the Earth if flat
But it is. Along some axes.
Just not the four we're familiar with.
>>
>>61059802
All commies should hang
>>
Can I get anyone to write a simple for me that'll take an XML document, grab some information from it and output another XML document?

I'll give you a couple of rare wizard pictures or $2 dollars on paypal, your choice

Basically I need to turn
<?xml version="1.0" encoding="UTF-8" ?>
<orignal>
<item>
<irrelevant>junk</irrelevant>
<relfirst>hello</relfirst>
<relsecond>world</relsecond>
</item>
</original>


into
<?xml version="1.0"?>
<fixed>

<useless>0</useless>

<fixeditem>
<type>s</type>
<first>hello</first>
<second>world</second>
</fixeditem>
</fixed>


with every item being turned into a fixeditem

Or tell me if this is too complicated for /g/
>>
>>61059833
Why? Because they have different opinions? And can you answer my question please?
>>
>>61059831
>But it is. Along some axes.
What axes?
>>
>>61059842
Literally 10 lines of your favorite scripting language.
But it's boring drek so do it yourself.
>>
>>61059822
Rust "academics" are special. They only care about forcing their political opinion on you. That's why the language is in such a bad shape.
>>
>>61059873
>They only care about forcing their political opinion on you
So just like you?
>>
>>61059854
The 4747445th, for example. Because there are not that many dimensions.
>>
>>61059873
You don't see the irony of saying that when you're the one whose hammering politics into this thread?
>>
>>61059888
>The 4747445th
What is 4747445th?
>Because there are not that many dimensions.
Earth is a 3 dimensional object.
>>
>>61059909
>Earth is a 3 dimensional object.
HAHAHAAHAHAHAHAHAHA

Time.
>>
>>61059887
>>61059892
I didn't force my political opinion into the Rust language.
>>
>>61059926
Time is not a dimension
>>
>>61059859
Would do if I had any scripting languages or could write any lines of it...
Code is black magic to me
>>
>>61059927
What part of the language enforces any political opinion?
>>
>>61059909
>What is 4747445th?
What do you mean "what is it?" It's an axis, like any other.
>Earth is a 3 dimensional object.
How do we know? There are dimensions we can't see. Maybe Earth has breadth in them.
But I guarantee it has no breadth in the dimensions there aren't. Which is my whole point.
>>
>>61059934

can't you just open your document in a text editor and do a find+replace?
>>
>>61059933
What is general relativity?
>>
>>61059944
Diversity tickets, commies in the docs, antifa member in the rust board
>>
>>61059948
Can't just change the tags, some elements have to be deleted and other elements added. Slightly to complex for find + replace since every <irrelevant> tag has to be deleted and every <fixeditem> has to have <type>s</type>
Believe me, I've tried to find a codeless solution to this
>>
>>61059946
>It's an axis, like any other.
Okay, you seem to be interested int an arbitrary axis. Now what?
>How do we know?
>there are dimensions we can't see
If there are more dimensions, it will definitely not be flat
>>61059954
A geometric theory of gravitation published by Albert Einstein.
>>
>>61059966
>Diversity tickets, commies in the docs, antifa member in the rust board
May be you are confused so I'll ask again:
What part of the language enforces any political opinion?
>>
>>61060006
>A geometric theory of gravitation
I said GENERAL relativity.
>>
>>61060027
General relativity (GR, also known as the general theory of relativity or GTR) is the geometric theory of gravitation published by Albert Einstein in 1915
>>
>>61060014
What I just mentioned?
>>
>>61060037
What part of the language did you mention again?
>>
>>61060006
>If there are more dimensions, it will definitely not be flat
*in those dimensions. Which is beside the point. I'm talking about dimensions there AREN'T. And unless there are infinitely many dimensions, there are plenty of dimensions for there not to be. And in every single one of them, not just the Earth, but the entire UNIVERSE is flat, because that's what it MEANS for there not to be a dimension.
>>
>>61060033
http://www.exactlywhatistime.com/physics-of-time/relativistic-time/
>>
>>61060045
>in those dimensions
No, if there are more than 2 dimensions, an object cannot be flat (2D)
>>
>>61060064
>No, if there are more than 2 genders, an person cannot be women (male)
L-lewd.
>>
>>61060059
No where does it say that time is a dimension
>>
>>61060084
>women (male)
my pepee hard
>>
>>61060084
Who are you quoting?
>>
>>61060064
>flat (2D)
This is a very limited perspective on what "flat" means. I'm talking about "flat" in a multidimensional sense. You're correct that there are no dimensions in which the Earth is 2D. That query doesn't even make sense. But if I could perceive more dimensions than the Earth occupied, the Earth would be "flat" to me. The fact that I can't should not prevent any sensible person from being able to extrapolate the word in those terms.
>>
>>61060085
>the traditional Newtonian idea of absolute time and space has been superseded by the notion of time as one dimension of space-time in special relativity, and of dynamically curved space-time in general relativity.
>>
File: 1498108612020.webm (924KB, 600x336px) Image search: [Google]
1498108612020.webm
924KB, 600x336px
>>
>a single point is 0D
>"extrude" it, get a 1D line
>"extrude" it, get a 2D plane
>"extrude" it, get a 3D cube
>"extrude" it, get ??????

What is the ??????
>>
>>61058989
Udemy Django tutorials
>>
>>61060111
4D tesseract
>>
>>61060097
>I'm talking about "flat" in a multidimensional sense
True, flat is a multidimensional shape, it has two dimensions

>Earth would be "flat" to me.
>to me
If you climb up a mountain you will notice that the earth is not flat

>>61060101
That's a space-time graph. Time is not a dimension itself. Spaces have dimension
>>
File: 4d.gif (821KB, 240x240px) Image search: [Google]
4d.gif
821KB, 240x240px
>>61060129
you mean this?

looks like a retarded 3D cube to me
>>
>>61060133
You're insisting on "flat" meaning 2D. It shouldn't. It should mean (N-1)D.
>>
>>61060143
flat actually is 2D, whether you like it or not. It has width and length. And if it has height, it's 3D
>>
>>61060142
>to me
To all of us.
And there's your (our) problem. The "to."
>>
>>61060133
>That's a space-time graph. Time is not a dimension itself. Spaces have dimension
Lemme share a secret with you anon.
Dimensions are a made up mathematical formalism to understand the variability of the world. Spatial dimensions aren't special.

In fact most string theories have upwards of 10 dimensions to explain particle interaction.
>>
>>61060160
What's flat to a flatlander?
Everything?
I think not. The word would then have no useful meaning to them.
Flat is (N-1)D, not 2D.
>>
>>61060162
but i can express any possible coordinate inside that tesseract with 3 coordinates (x, y, z) from any fixed point in its vicinity.

how, then, can it be anything other than 3D?
>>
>>61060190
That's a 3D projection of a tesseract.
>>
>>61060180
>What's flat to a flatlander?
Something that has 0+ height and 0+ length and exactly 0 width
>>
https://en.wikipedia.org/wiki/Flatness_(mathematics)
>>
>>61060206
that's interesting
is it possible for a person to comprehend the full 4D structure?
>>
>>61060222
>comprehend
Define that term.
Nobody "understands" quantum physics.
>>
>>61060190
>but i can express any possible coordinate inside that tesseract with 3 coordinates (x, y, z) from any fixed point in its vicinity.
No you can't. You could if we were reasoning about its projection into 3D space. But you wouldn't be describing the full tesseract, you'd be describing the infinitely "thin" (or "FLAT") slice of it expressed in the world we can perceive.
What's more, what we're actually reasoning about here is even less than that. It's an animated gif of what we would see if we observed that 3D "slice" from one angle.
>>
>>61060207
Wrong.
"Flat" to a flatlander has to additionally have exactly 0 height. Because it's a flatlander who's using the word.
>>
>building project produces compiler warning
Why is it even legal to distribute such thing?
>>
File: mexican_alien.jpg (85KB, 553x674px) Image search: [Google]
mexican_alien.jpg
85KB, 553x674px
Trying to learn dynamic programming at the moment and I'm feeling a true scrublord.

It's easy to understand it in the context of a Fibonacci problem, but every other lecture I watch about something a bit more complex just leaves me pretty lost.
>>
>>61060255
see >>61060216
>>
>>61060041
The docs and the community. And yes, they're crucial to any programming language.
>>
>>61060273
>docs and the community
Will a book on rust force me to vote for certain political party?
>>
>>61060216
>>61060270
Thanks for proving you only have the brain power to read a maximum of one sentence per paragraph.
>The term is often generalized for higher-dimensional manifolds to describe the degree to which they approximate the Euclidean space of the same dimensionality.
>>
>>61060269
The way that made me click is saying that dynamic programming is building part of the complete solution every time you iterate.

Djikstra's algorithm for instance is dynamic because you build part of the best path every time you iterate.
>>
>>61060298
Are you implying that using the generalization of the term isn't formal?
>>
>>61060293
Apparently Das Kapital did.
>>
>>61060255
Uhm the "flatlander" is a point in the 2D space, right? You can refer yourself in general theory
>>
>>61060310
No, I'm implying the generalization of the term is fair game, and therefore the Earth is "flat" when viewed as a degenerate case of an N-dimensional manifold where N > the number of dimensions that there actually are.
>>
>>61060315
What is das kapital? And how did the book force someone to vote for a certain political party?
>>
>>61060340
Well I was agreeing with you then.
>>
>>61060354
Oh.
I assumed you weren't since you were telling me "See:".
>>
>>61060300
I feel the same way about dynamic programming as I did when learning about mathematical induction.

Induction is a concept that is easy to grasp if explained to you in a clear way. I'm finding it pretty hard to get hold of a resource that explains dynamic programming to me like I'm a moron. I've been following along with MIT lectures and I get the gist of about 40% of it.
>>
>>61060342
So you think Karl Marx is a great philosopher, but you don't know what Das Kapital is? So why do you praise Karl Marx?
>>
>>61060383
Oh you lost your attention again. No biggie. I'll ask again then:
Will a book on rust force me to vote for certain political party?
>>
>>61060407
Answer my question first. I already gave answer to your question.
>>
>>61059010
I have those vans ^.^

Working on an app today in kivy just to give it a shot and possibly an Alexa Skill.
>>
File: images (1).jpg (7KB, 272x152px) Image search: [Google]
images (1).jpg
7KB, 272x152px
>when a programmer says "girl (male)"
>>
>>61060407
>>61013982
>>
>>61060447
>Answer my question first.
Okay
>you think Karl Marx is a great philosopher
Who said this?
>you don't know what Das Kapital is
No. Neither am I interested.
>So why do you praise Karl Marx?
> you praise Karl Marx
Source?

> I already gave answer to your question.
You never did. So I will ask you again:
Will a book on rust force me to vote for certain political party?
>>
>>61060470
How does that answer my question?
>>
>>61060481
It answers your post, not the question you put in your post.
>>
>>61060472
>Who said this?
>le funay whomst arst thee quothing maymay
>>
>>61060494
>It answers your post
It doesn't. Can you explain how it does? More importantly can you answer >>61060472?
>>
>>61060507
I am genuinely curious. Who says I praise this "Carl Marx" guy?
>>
>>61060512
I am not interested in the conversations you've had with someone else.
I am telling you why it is bad and should be confronted, not allowed to fester.
>>
>>61060534
>I am telling you why it is bad and should be confronted
Too bad I don't really see anything to confront.
>>
File: 515.gif (1001KB, 640x480px) Image search: [Google]
515.gif
1001KB, 640x480px
>>61060526
>Who says
>o he use de maymay
>o he use it again
>o hot mama
>>
>>61060552
ha ha ha xdee
>>
>>61060552
>>61060507
You wanna know how I know you're a narcissist?
>>
>>61060540
Yes, you don't need to learn anything from history because you're above it, aren't you, Mr Marx?
>>
>>61060589
>you don't need to learn anything from history
I am not really interested in history, I am more interested in programming. Hence why I am in this board in this thread.
>>
Fucking rustfags ruining yet another /dpt/. Can't you faggots go hackernews or reddit?
>>
>>61060472
You should go see a doctor. You keep forgetting things.
>>
>>61060619
>You keep forgetting things.
Come on now, it's the seventh time you dodged my question.
Will a book on rust force me to vote for certain political party?
>>
>>61060614
/pol/*
>>
File: 1445705986467.jpg (31KB, 853x480px) Image search: [Google]
1445705986467.jpg
31KB, 853x480px
How do get to Gmail from my Grub?
How do inherit from a class in SQL?
How do load an old file off my CPU?
How do delet from server?
How do 3D print tasty food?
>>
>>61060665
Use Go
>>
>>61060587
>You wanna know how I know you're a narcissist?
anus
>>
>>61060665
import solution
>>
File: 1491933562001.jpg (64KB, 632x504px) Image search: [Google]
1491933562001.jpg
64KB, 632x504px
>>61060614
Nice try, /pol/.
>>
>>61059802
Bump
>>
>>61060614
>>61060687
You're truly an embarrassment to liberalism.
Sincerely a liberal.
>inb4 "duuurrrr as if X isn't an embarrassment to liberalism too"
I am a liberal who does not support X.
>>
>>61060633
Books have a way of manipulating people, yes. I already told you that. Now tell me, why didn't they choose generic names for the dining philosophers.
>>
>>61060731
Because they like their leftist philosophers.
Would you react with the same kind of autism if they used their waifus?
>>
>>61060731
>Books have a way of manipulating people
Huh? "Manipulating"? This is a programming book, not a bible. Rust book does not say anywhere to "Vote party X" etc
>why didn't they choose generic names for the dining philosophers.
Ask them, do you think I care what name they put?
>>
>>61060731
>Books have a way of manipulating people
Books are not vodoo magic, anon. This is not the 15th century
>>
>>61060781
>This is not the 15th century
am not convince
>>
>>61060731
>Books have a way of manipulating people, yes.
You're a moron. Ideology does that, not its vector.
Now if you're trying to argue that Programming books carry ideology then you're about as retarded as Foucault himself.
>>
>>61059059
Emacs
>>
>See the name of some one.
Oh boy I guess I have to vote some lefty party now. I am bound by some black magic now wtf

The power of /g/
>>
>>61060771
Apparently you did care, otherwise we wouldn't have this conversation.
>>
File: mitsuki_disgust.jpg (93KB, 1920x1080px) Image search: [Google]
mitsuki_disgust.jpg
93KB, 1920x1080px
>200 replies
>20 people
Just nuke the servers. We had a good run.
>>
>>61060818
>Programming books carry ideology
Only the Rust one.
Specifically due to its choice of philosopher names and by no other means.
>>
Has anyone here tried embedding Scheme in Rust?
>>
>>61060843
>Apparently you did care How fucking ironic, isn't it. Seems like the whole point of your derailing this thread is (>>61059021)
>>
File: gellar.jpg (327KB, 800x1215px) Image search: [Google]
gellar.jpg
327KB, 800x1215px
>>61060844
but to imply is to die, anon
>>
>>61060843
>Apparently you did care, otherwise we wouldn't have this conversation.
Is that self awareness I sense?
>>
>>61060849
>he's triggered by the mere mentions of brainlet philosophers
Grow thicker skin anon.
>>
File: download (2).jpg (6KB, 262x192px) Image search: [Google]
download (2).jpg
6KB, 262x192px
>>61060872
nice text
>>
>>61060849
So you got #TRIGGERED by a name in the book?
You would actually make a good SJW
>>
File: i-am-leg_o_562783.jpg (68KB, 460x722px) Image search: [Google]
i-am-leg_o_562783.jpg
68KB, 460x722px
>>61060893
But they were evil.
>>
I like qsort vs std::sort thread more, t b h.
>>
File: legendofzelda.jpg (49KB, 400x304px) Image search: [Google]
legendofzelda.jpg
49KB, 400x304px
>>61060904
But anon, SJWs are bad. Especially at C.
>>
>>61060904
Right wingers are the new SJWs. They are "Politically incorrectly correct"
>>
File: 2ac.png (237KB, 600x679px) Image search: [Google]
2ac.png
237KB, 600x679px
>>61060913
Who cares?
>>
>>61060922
So you would make the perfect SJW then
>>
>>61060931
SJWs
>>
>>61060904
>>61060926
These
>>
File: Screenshot_20170624-101208.jpg (110KB, 461x1237px) Image search: [Google]
Screenshot_20170624-101208.jpg
110KB, 461x1237px
>>61060918
But sorting algorithms a shit though
>>
>>61060922
>>61060926
>>61060942
>>61060933
>>>/b/
>>>/pol/
>>>/reddit/
>>
itt defending goymunism
>>
File: 1495519989322.jpg (219KB, 1242x1171px) Image search: [Google]
1495519989322.jpg
219KB, 1242x1171px
>>61060957
OY VEY
>>
File: 4359202410790094.jpg (197KB, 1220x858px) Image search: [Google]
4359202410790094.jpg
197KB, 1220x858px
>>61060931
>>61060933
But SJWs are bad at C though
(please don't keep replying, I'm running out of head-on-leg pictures and it's absolutely crucial that I keep posting them or not post at all)
>>
>>61060976
>But SJWs are bad at C though
So you are the perfect SJW
>>
>>61060926
This actually makes sense. Remember that the /pol/fag got triggered by a fucking string
>>
>>61060982
C-retins BTFO
>>
File: icon.gif (59KB, 384x384px) Image search: [Google]
icon.gif
59KB, 384x384px
>>61060982
but aaanooooon
>>
Can I embed Scheme in Rust?
>>
>>61061029
Only diversity
>>
>>61060874
>>61060899
>>61060913
>>61060922
>>61060949
>>61060976
>>61061005
dumb legposter
>>
>>61059060
Verbose but whatever
fn f<A, B, B_, C, C_, G, H>(g: G, h: H, (b, c): (B, C), a: A) -> (B_, C_)
where
A: Clone,
G: FnOnce(B, A) -> B_,
H: FnOnce(C, A) -> C_,
{
(g(b, a.clone()), h(c, a))
}
>>
>>61060994
Remember that /g/fag who got triggered by a malloc()... oh wait
>>
File: Screenshot_20170624-102203.png (545KB, 1440x2560px) Image search: [Google]
Screenshot_20170624-102203.png
545KB, 1440x2560px
>>61061029
Only if you haskell
>>
File: kotlin.png (14KB, 800x320px) Image search: [Google]
kotlin.png
14KB, 800x320px
>Try to improve Java
>Make it infinitely worse
How does this happen?
>>
File: type gibberish.png (17KB, 810x219px) Image search: [Google]
type gibberish.png
17KB, 810x219px
>>61059060
is that this one or is that a different one
>>
>>61061088
What language is that?
>>
>>61061086
It's a hit and miss. I've been doing Kotlin for the last two weeks. Overall it's a smooth ride, but it has some quirks. Stuff like checked exceptions, defining custom operators and bitwise operators are all missing.
>>
>>61061086
Scala is better
>>
>>61061088
Am i seeing this correctly that a2 is never used?
>>
>>61060994
>Remember that the /pol/fag got triggered by a fucking string
/pol/ is literally the only perfect board you fucking liberal
>>
Just started working on a simple puzzle game using pygame. Not even sure if the concept/core mechanic works well and is fun, but I'll find out soon enough.
>>
>>61061178
/pol/ is literally the only cancerous board you fucking republicuck
>>
>>61061195
at least /pol/ knows C though
proof: pic related
>>
>>61061136
Care to elaborate?
>>
>>61061116
custom one
>>61061146
yeah i think that might be an error, i guess that can be removed in your example you only use
α β β' γ γ'
>>
>>61061206
More featureful type system

One example: Kotlin's question mark type operator is very limited, whereas you can nest Scala's Option indefinitely
>>
>>61061205
>at least /pol/ knows C
C is a brainlet language that every 12 year olds know
>>
>>61061205
Isn't C a beginner language? That's not really an impressive thing
>>
WHY DOES EVERY THREAD HAVE TO HAVE /POL/ IN IT?
this is the programming thread on the technology board
fuck off already
reeeeeeee
>>
File: crap_news.png (397KB, 528x1284px) Image search: [Google]
crap_news.png
397KB, 528x1284px
>>61059566
>fappening
I've still got a screenshot of some really shitty news from back when.
>>
>>61061243
4chan is now mainstream
>>
Have any of you guys actually ever accomplished anything that you can show?
>>
File: 1487662581228.jpg (25KB, 390x478px) Image search: [Google]
1487662581228.jpg
25KB, 390x478px
Generics are LEWD!
fn is_symmetric<I>(it: I) -> bool
where
I: IntoIterator,
<I as IntoIterator>::Item: PartialEq,
<I as IntoIterator>::IntoIter: DoubleEndedIterator,
{
let mut it = it.into_iter();
while let (Some(l), Some(r)) = (it.next(), it.next_back()) {
if l != r {
return false;
}
}
true
}
>>
>>61061258
Even std::c++ looks better than that.
>>
>>61061258

why is rust so fugly lads
>>
>>61061268
D doesn't have this problem :^)
>>
>>61061258
Kill yourself weeb, you will never amount to anything in life
>>
>>61061279
anime website
>>
>>61061258
This is actually a well-written Rust code.
>>
>>61061278
at least Rust is somewhat useful.
>>
>>61061285
you can use the same rope
>>
>>61061264
>>61061268
>>61061279
>>61061289
Thanks for the (you)s
>>
>>61061278
I really hope D makes a break through.
>>
>>61060918
std::sort outperforms qsort by a fair amount for any lambda comparator
>>
>>61061289
No, it's cryptic, showy, and ultimately useless.
>>
>>61061223
>>61061229
yeah but at least /pom/ knows C# though
>>61061243
anyone of any race i don't like is a monkey
>>
File: 10_lei._Romania,_2008_a.jpg (140KB, 800x428px) Image search: [Google]
10_lei._Romania,_2008_a.jpg
140KB, 800x428px
>>61061278
>>61061308
Good posts, keep going!
>>
Thing with D is, it's already quite mature. Rust is still going to get some syntax cleanup for a while
>>
>>61061321
Please do the needful
>>
Does rust still have lifetimes? Or did they realize how retarded that was?
>>
>>61061278
>>61061308
D "doesn't have this problem" because D templates are weakly typed compared to Rust templates.
>>
>>61061343
Swiift just adopted Rust's lifetime.
>>
>>61061321
D is a good language and has a strong community.
>>
>>61061348
>Strongly typed templates
Are you a masochist?
>>
>>61061316
It's not cryptic at all if you know the language and it's actually the idiomatic way to write it.
>>
>>61061362
That's literally what Rust's type traits are
>>
>>61061348
Weakly typed isn't always bad. It makes sense to make the template system weakly typed.
>>
>>61061316
Not cryptic, it's just too much writing

t. D fag
>>
>>61061374
WHat? They are a shittier version of OCaml functors?
>>
File: 5_lei._Romania,_2005_a.jpg (134KB, 800x414px) Image search: [Google]
5_lei._Romania,_2005_a.jpg
134KB, 800x414px
>>61061360
Nice one, but lacks a character.
>>
>>61061381
>shittier
faster
>>
I'm making a video game that uses python as the scripting engine.

Right now, I have a shitload of boolean variables for states like "GunMode" "Walking" and "Jumping" just to name a few. Just for game logic scripts like "if Jumping == True, do such and such." It's just very easy for me to write game logic this way.

Eventually, down the line, I would like to cull many of these and streamline it so that instead of having three booleans for 'Standing" "Walking" and "Running" I could just have a single integer variable called "CharacterStandingState" and 0 could be for standing, 1 for walking, 2 for running.

I don't know if it's even worth going through all of that effort though, do you think a script runs any faster with one variable instead of three?
>>
new thread when? :3
>>
>>61061389
100 bucks say you are that trigged /pol/ tard
If so you literally do not add anything of value ITT
>>
>>61061407
He's not. I do like D though.
>>
>>61061362
>>61061376

I prefer generics to templates, but obviously you shouldn't be using weakly typed bullshit.

Weak typing with templates has mostly the same problems as normal weak typing, except because they're templates and not generics they still fail to compile.
You end up with cryptic error messages, bad type inference and awkward situations.

Even C++ is adding concepts.
>>
>>61061415
>Even C++ is adding concepts.
C++ is the niggers of languages, it steals shit from everywhere
>>
>>61061396
>if Jumping == True:
if Jumping: will do the same thing.

Also don't worry about speed when it comes to tiny things like that,.
>>
>>61061258
i don't know rust and i had no trouble reading that. are people really this triggered by concepts and iterators?
>>
>>61061415
>Even C++ is adding concepts.
Concepts, exceptions.

>tfw you understand that OCaml invented everything that modern languages copy.
>>
>>61061433
OCaml's FFI is a disaster
>>
File: 500_lei._Romania,_2005_a.jpg (154KB, 800x422px) Image search: [Google]
500_lei._Romania,_2005_a.jpg
154KB, 800x422px
>>61061414
>anti-Rust MUH MARX /pol/tard shitposter is actually a D-fag
>>
>>61061428
Just see the responses. It's really easy to trigger /dpt/, just post some Rust code.
>>
>>61061423
>using other's ideas to improve your own is a bad thing
found the retard who writes his own sort functions
>>
>>61061433
>>tfw you understand that OCaml invented everything that modern languages copy.
Excuse me?
>>
>>61061438
>IQ
>Same level as /pol/tards
>>
>>61061423
kek
>>
>>61061407
Maybe but neither do you.
>>
File: 2017-06-24-184831_800x600_scrot.png (19KB, 800x600px) Image search: [Google]
2017-06-24-184831_800x600_scrot.png
19KB, 800x600px
Over the past two days I made a simple falling pieces puzzle game
>>
File: 1475724230226.jpg (76KB, 607x504px) Image search: [Google]
1475724230226.jpg
76KB, 607x504px
>>61061439
Let me have a try
import std.stdio;

void main()
{
writeln("Curl max did nothing wrong, Hitler was a scam");
}
>>
>>61061482
Neat. What language?
>>
>>61061490
>guaranteed replies
>>
>>61060222
>is it possible for a person to comprehend the full 4D structure?
yes, but not as a visual metaphor since it will necessarily be a low-dimensional projection. that's not even a 3d projection of a tesseract, it's a 2d projection

i find it easier to think in terms of triangles than squares. at each step of the process you add a point that's unit distance from all previous points. in order to achieve this, you always have to add another dimension
>a point is 0d. to add a second point that's 1u away, you need to add a 1st dimension
>a line is 1d. to add a third point that's 1u from both ends, you need to add a 2nd dimension
>a triangle is 2d. to add a fourth point that's 1u from all 3 corners, you need to add a 3rd dimension.
>a tetrahedron is 3d. to add a fifth point that's 1u from all 4 vertices, you need to add a 4th dimension
i think of the final point as being "inside" the tetrahedron (i.e. equidistant from the other points), but it's also *in the future*. the 4th dimension is time. the edges to the final point take "longer" to traverse because they go forwards in time, so they're 1u long even though they don't look that way in 3d
>>
>>61061494
BBC BASIC
>>
New thread:
>>61061490
>>61061490
>>61061490
>>
>>61061523
what do you mean?
>>
>>61061509
to visualize the 5th dimension and higher use hue axes, like a red-green gradient
>>
>>61061534
He just gave me 3 (you)s in one post
>>
The actual new thread:
>>61061513
>>61061513
>>61061513
>>
>>61061448
Traits and exceptions were invented by OCaml.
>>
>>61059055
/thread
>>
>>61061602
This is bait right?
>>
>>61061611
No, this is facts.
>>
>>61061623
Where I come from, facts are true.
Is this not the case for you?
>>
>>61061650
You ignore programming language history. OCaml is very old and invent a lot of things.
>>
>>61061664
Sorry, Caml not just OCaml.
>>
>>61061664
>>61061678
But not exceptions or Rust-style traits.
The former have been in use since forever (any early exit) and the latter were invented by someone who ended up on the Haskell committee (which pioneered them, type classes)
>>
>>61061692
Or the precursor to Haskell did, or something like that.
>>
>>61061692
>since forever
Please find in history the first occurence of those things.
>>
>>61061721
https://en.wikipedia.org/wiki/Exception_handling#History
>>
>>61061740
Exception are not just breaking the flow, they are constructors that you can match. ANd Caml is the firt to do that.
Traits are nothing more than Caml module system.
>>
>>61061752
You have no idea what you're talking about
>OCaml invented exceptions and traits!

>OCaml invented OCaml exceptions and OCaml traits
>>
>>61061774
Breaking flow control is far more older than "exception" in lisp (as in your link), LISP invented nothing, and no sane developers call them exceptions, because no sane developers say exception instead of goto.

But or-pattern on flaw control breaking (what sane developers call exceptions) is invented by Caml, and
Thread posts: 330
Thread images: 42


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.