[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: 326
Thread images: 72

What are you working on, /dpt/?

Previous thread: >>60898229
>>
nth for reimplementing pascal in WASM
>>
Second for Go
>>
>>60905260
Linking my post from the dead thread.

>>60905243
>>
Fuck yourself
>>
I'm learning Scala and I'm trying to find a more funcional way to program these if statements,where I store auxiliar vars to make a final division, is there a better way?
     var sum: Double = matrix(col)(row)
var div: Double = 1
if (matrix.isDefinedAt(col-1)) {
sum = sum + matrix(col-1)(row)
div = div + 1
}
if (matrix(col).isDefinedAt(row-1)) {
sum = sum + data(col)(row-1)
div = div + 1
}
round(sum/div)
}
>>
Rust has the potential to be a C++ killer in many domains where C++ is currently king, but whether it will achieve this is not yet certain
>>
>>60905314
C++ will die anyways, it's too bloated
>>
>>60905314
>>60905363
you're going to have to bait harder than that
>>
>>60905314
>Rust has the potential to be a C++ killer
not in its current state.
It needs a syntax re-write.
>>
>>60905387
Syntax is fine once you actually get used to it
>>
>>60905395
>Syntax is fine
let ch = text.chars().nth(0).unwrap();
>>
in rust if you pass a reference to an assignable object through a pipe to another thread and then try to use this reference yourself the program won't compile. how do rustfags defend this?
>>
>>60905260

Sleep well, snek.

I'm playing with SDR#, seeing if I can read my electric meter remotely. Still in the feasibility stage. But then it'd be Arduino n' shit.
>>
>>60905414
Yes, and?

>>60905424
The compiler is saving you from making terrible mistakes
>>
>>60905414
Afraid of declarative programming?
>>
>>60905433
why doesn't it tell me that instead of just not compiling?
>>
>>60905433
>>60905440
im sure glad i dropped c++ to go to c++ with a gimmick
>>
Why does Rust still not have a description of its memory model
>>
>>60905475
Declarative programming is not a gimmick. It's an Art.
>>
Just started learning Python (3 months in) at uni, doing science & data analysis stuff.

Wanna do a more fun project over the mid-year break as practice. Is something like a simple inventory manager for our tabletop RPG too ambitious?
>>
>>60905493
>thinking rust's problem is declarative programming
>>
>>60905495
you're a dumb physics major probably
>>
>>60905504
Close, biology major actually. So even more dumb
>>
>>60905495
how simple are you thinking?
what would it do that an excel sheet wouldnt do by itself
>>
File: 1455893340353.jpg (40KB, 400x402px) Image search: [Google]
1455893340353.jpg
40KB, 400x402px
>>60905495
are you implying science and data aren't fun
>>
>>60905504
CS faggots are mostly physics rejects
>>
File: 1405294841029.jpg (196KB, 1024x768px) Image search: [Google]
1405294841029.jpg
196KB, 1024x768px
>python
Nope. Fuck this thread. I'll wait for the next one.
>>
>>60905577
>waiting for a python thread to not be a python thread
? ? ?
>>
>>60905489
A Rust program's memory consists of a static set of items and a heap. Immutable portions of the heap may be safely shared between threads, mutable portions may not be safely shared, but several mechanisms for effectively-safe sharing of mutable values, built on unsafe code but enforcing a safe locking discipline, exist in the standard library.

Allocations in the stack consist of variables, and allocations in the heap consist of boxes.
The items of a program are those functions, modules and types that have their value calculated at compile-time and stored uniquely in the memory image of the rust process. Items are neither dynamically allocated nor freed.

The heap is a general term that describes boxes. The lifetime of an allocation in the heap depends on the lifetime of the box values pointing to it. Since box values may themselves be passed in and out of frames, or stored in the heap, heap allocations may outlive the frame they are allocated within. An allocation in the heap is guaranteed to reside at a single location in the heap for the whole lifetime of the allocation - it will never be relocated as a result of moving a box value.When a stack frame is exited, its local allocations are all released, and its references to boxes are dropped.A variable is a component of a stack frame, either a named function parameter, an anonymous temporary, or a named local variable.

A local variable (or stack-local allocation) holds a value directly, allocated within the stack's memory. The value is a part of the stack frame.
>>
>>60905550
>>60905562
The aim is to get better at python outside of pandas/numpy/matplotlib, which I use a lot in school. Which, for what it's worth, is pretty interesting.
>>
>>60905654
decide on exactly how much functionality you want your program to have before you try making anything first
>>
>>60905573
>CS faggots are mostly physics rejects
[citation needed]

LOL at EEs and physicists who carp about my job title, Senior Software Engineer.

"You're not an engineer!"

No, and you're not a [good] programmer. But guess what? I earn just as much as you, and using the degree I actually studied to get.
>>
>>60905698
god damn you got triggered over something really small
>>
>>60905698
In my uni, EE and Physics require the most grade point average. CS are literally mediocre students that are just a little bit better than IT.

EE and ME People laugh at CS
>>
>>60905698
TRIGGERED
>>
>>60905698
>Software """engineer"""
>>
>>60905698
you're not going to win this argument. cs students are lowly regarded everywhere
>>
>code artisans REEing over actual engineers calling them out
wwwwwwwwwwwwwwww
>>
>>60905653
>Actually replying to baits
>>
Explain why equivalent algebraic expressions may lead to different answers. Can you devise an interval-arithmetic package that does not have this shortcoming, or is this impossible?
>>
>>60905698
Found the CS faggot.
Even CE folks laugh at you.
>>
ITT: Programs in your language which can't be shorter in other languages.
>>
>>60905260
I want to fuck her.
>>
>>60905787
Shorter doesn't mean better. Readability counts as well
>>
File: 9e6.gif (561KB, 500x366px) Image search: [Google]
9e6.gif
561KB, 500x366px
>>60905808
she wants to fuck you
>>
>>60905787
If you want to post your haskell code just do it.
>>
>>60905504
>>60905573
Physics niggers are maths rejects.
>>
>>60905785
CE is essentially EE with some software shit thrown in, so I'd assume so
>>
>>60905706
>god damn you got triggered over something really small
>>60905721
>TRIGGERED
Not triggered, I'vejust never heard that as GPA approaches 2.0, a physics major switches to CS. I *have* heard that applied to EEs and hotel and restaurant management.

>>60905743
>you're not going to win this argument. cs students are lowly regarded everywhere
I'm not arguing anything. I've just never heard of physic majors going into CS. I would imagine EE would be their easy degree.
>>
>>60905698
>SE = CS
no
>>
>>60905838
That means CS niggers are math reject rejects
>>
im a month into learning it and I am so fucking bored. I really want to just code something that will actually be productive instead of just studying classes and data types. I bet the real projects hardly use simple shit like that.
>>
>>60905732
>Electrical Engineer

Show us your license.
>>
File: Practical_Language_Comparison.png (4MB, 2100x1400px) Image search: [Google]
Practical_Language_Comparison.png
4MB, 2100x1400px
>>60905826
>>
>>60905785
>Even CE folks laugh at you.
And I care because...?
>>
>>60905878
>And I care because...?
I have no idea dude you tell us
You're the one getting triggered as fuck rushing to defend yourself over nothing
>>
>>60905856
>>SE = CS
>no
Software Engineer = job title
Computer Science = degree
job title != degree
>>
>>60905870
Java master race
>>
>>60905878
It's not healthy to get triggered like this, anon
>>
>>60905842
Yeah this. CE reporting. We are WE until second semester junior. They take semiconductor and power electronics classes. We take communication theory and FPGA programming classes.
>>
>>60905870
this is actually the worst language comparison meme i've seen yet
>>
https://www.reddit.com/r/funny/comments/1beuyw/for_april_fools_day_i_decided_to_replace_hand/
>top voted comment
>THIS is why office shootings happen...
ahahaha reddit being based for once. fucking april fools pranksters
>>
>>60905842
CE is much more limited than EE
>>
>>60905904
>defend yourself over nothing
I have never heard of physic majors going into CS, that's all.

Post an insightful reply, and it dies. Post a personal observation and the crowd looses their collective shit. This is fun!
>>
>>60905925
makes sense, it came from the installgentoo wiki
>>
you have 30 seconds to explain why ruby is not the ideal language for 2d game development where the performance requirements are minimal and on the contrary the difficulty of the task is mainly about the art, area design, gameplay design, and story

GO
>>
>>60905906
CS != SE
If you don't know that you either got a degree from a shitty uni or you got the wrong job.
>>
>>60905924
same. ours is like a mix of cs and ee until 3rd year
>>
>>60905927
>He uses 3rd party handwash
>>
>>60905919
You're not being mommy's good boy.
No chicken tendies!
>>
>>60905924
WE?

>FPGA programming classes
Sounds cool, wish we did the same in CS.
>>
>>60905933
>it's the first image at the top of the page for the programming languages page
christ
>>
>>60905927
He is right. It should be legal to kill people like that.


>>60905946
This, he was asking for it.
>>
>>60905924
>We are WE until
>until
>implying you are not always YOU
>>
Ruby is being shilled too much lately.
Post some example code to highlight how great it is.
>>
>>60905941
>CS != SE
>If you don't know that you either got a degree from a shitty uni or you got the wrong job.
Are you disagreeing with the statement that CS!=SE? Can't tell from your shitty response.
>>
>>60905935
>the performance requirements are minimal
t. never gone beyond a prototype
>>
>>60905974
No
>>
{SE}⊆{CS}
>>
Political correctness is almost always wrong. You have your right to say anything so long as it does not promote violence.
>>
>>60906005
Are you being retarded on purpose?
>>
Why are people trying to play the "King of the castle" when ignoring the only real computer degree, CE?
>>
>>60906046
CS ∪ (CS ∩ SE) ≈ CS
>>
>>60906081
Why do people think you need a degree at all to program, /dpt/?

Today fucking captchas are pissing me off. Every square contains the object to be identified.
>>
>>60906132
Beats me, tbqh
>>
>>60905951
EE, dumb phoneposter here.

FPGA programming is honestly the hardest shit I've ever encountered.
>>
>>60906132
Post-purchase rationalization
>>
>>60906119
Kek
>>
>>60906119
Yeah, okay, you are being retarded. Carry on.
>>
>>60906132
>Every square contains the object to be identified.
Bruh scroll up and enable legacy captcha in the settings
captcha: serrans lease
>>
File: dlang_chan.jpg (70KB, 349x368px) Image search: [Google]
dlang_chan.jpg
70KB, 349x368px
Threadly reminder that dlang-chan has RAII; she's quite fast in execution and compilation; she's becoming fully memory-safe; and she's super duper cute! Say something nice about her, /dpt/!

>Tour
http://tour.dlang.org/
>Books
https://wiki.dlang.org/Books
>GC
https://dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
https://wiki.dlang.org/Libraries_and_Frameworks#Alternative_standard_libraries_.2F_runtimes
>>
>>60906178
The only thing that stops me from having fun with fpgas is this https://wiki.debian.org/FPGA/
>>
File: 1408566969296.jpg (23KB, 640x449px) Image search: [Google]
1408566969296.jpg
23KB, 640x449px
>>60906132
>>60906186
>tfw getting payed to go to school
>>
>>60906199
>enable legacy captcha
I do worse with those. T_T
>>
Don't reply to it
>>
File: 1466692782212.jpg (142KB, 730x1095px) Image search: [Google]
1466692782212.jpg
142KB, 730x1095px
>>60906205
I opened the picture hopping that she was lain. I am disappointed.
>>
>>60906217
paid

>>60906226
Don't talk to yourself.
>>
>>60905402
It's not that format strings are a bad optional feature it's that they mix code and data in an unfortunate way.
Solves trivial problems usually.
All that's required for them to be good is for there to be a string unpack method (hopefully at compile time where possible) which extracts the different arguments to their correct place.
But that's a messy system in realistic situations frankly.

I don't like features that help the easy problems. Clutters the languages a lot. Addressing the hard problems in a language is much more important. It could be done in string processing but I haven't come up with a good solution. Because hard problems are hard. Things like adjusting for internationalization is usually done through full string replacement. Which sets additional requirements on your font rendering and size adjustments. It works. But I wouldn't describe it as ideal.
>>
>>60906230
Please don't post 3DPD cosplaying as Lain. It's a disservice to the queen of /g/.
>>
File: 78348-tap-67027.jpg (11KB, 305x225px) Image search: [Google]
78348-tap-67027.jpg
11KB, 305x225px
>>60906217
>>
>>60906217
Where? Here we get very cheap loans and a portion of it is simply paid. But I couldn't call it getting paid to go to school
>>
>>60906225
I don't see how that's possible
>>
>>60906215
Have fun with xilinx, the shitest program I could ask for.
>>
>>60906279
Probably means ROTC?
>>
>>60906285
Dyslexia?
>>
>>60905935
>2d game development where the performance requirements are minimal
???
>>
>>60906347
Dyslexic here, I prefer legacy captchas.
>>
>>60906347
Oh, that'll do it
>>
>>60906347
>>60906361
how are you supposed to program with dyslexia
>>
File: VCNRKf7.jpg (20KB, 306x306px) Image search: [Google]
VCNRKf7.jpg
20KB, 306x306px
>hashtag pragma once
>>
File: 1497214889403.jpg (47KB, 475x530px) Image search: [Google]
1497214889403.jpg
47KB, 475x530px
>>60906205
Report and hide the spammer.
Do not listen to the spammer.
Tell the spammer to piss off.
>>
>>60906381
I didn't say I *had* dyslexia, it's just a plausible excuse.

Maybe it's the fact that all my passwords are in 1337 speak and I can't type correctly anymore.
>>
>>60906381
By opening Emacs and start writing normally?
>>
>>60906397
>TRIGGERED
>>
File: tomoko.jpg (417KB, 741x821px) Image search: [Google]
tomoko.jpg
417KB, 741x821px
>>60906395
#include "conio.h"
>>
>>60906395
dumb frogposter
>>
>>60906397
Please make sure to post something on-topic, shitposter-kun.
>>
>>60906442
And is viral marketing supposed to be "on-topic", also-shitposter-kun?
>>
File: 1412897381211.jpg (7KB, 186x178px) Image search: [Google]
1412897381211.jpg
7KB, 186x178px
>>60906427
>dumb frogposter

Every time I see that reply I'm going to post one, until I see no more Chinese cartoons in /dpt/.
>>
File: 1452471092796.png (372KB, 1280x720px) Image search: [Google]
1452471092796.png
372KB, 1280x720px
>>60906454
When will this fucking reddit infestation end?
>>
>>60906331
Makes sense.
>>
>>60906452
No, but what does that have to do with my post, shitposter-kun~?
>>
>>60906489
>When will this fucking reddit infestation end?
[citation needed]
Isn't Pepe a product of 4chan?
Also: fite me irl; the only reddit I visit is programming.
>>
>>60906563
And once again, we've shown that all frogposters are retarded cancerous redditors.
Please kill yourself.
>>
>>60906563
>newfags
>>
>>60905983
>t. never gone beyond a prototype
t. has never played eversion or any rpg maker game
t. uncultured swine
>>
>>60906489
Dumb fuck.
>>
File: 1497426518784.jpg (64KB, 772x501px) Image search: [Google]
1497426518784.jpg
64KB, 772x501px
>>
File: 1484738966464.jpg (64KB, 637x637px) Image search: [Google]
1484738966464.jpg
64KB, 637x637px
>>60906591
Rude.
Why is /dpt/ so full of rudeposters?
>>
>>60906454
>>60906600
dumb frogposter
>>
>>60906579
>>60906582
That's for enlightening me. Not.

Also:

>newfags

I've been here longer than you've been out of short pants. If Pepe came from reddit I wouldn't know it, because r/programming isn't an image board. Literally, the only reddit I've seen more than once.
>>
>>60906611
This girl is only 13
>>
>>60906656
You've been here since last summer, right? :^)
Such an "oldfag".
>>
File: tumblr_inline_niiamgxftd1rnnsez.png (117KB, 372x351px) Image search: [Google]
tumblr_inline_niiamgxftd1rnnsez.png
117KB, 372x351px
>>60906395
>he doesn't use #pragma once
>the far inferior #ifndef is more to his tastes
>he is literally this much of a dumb frogposter
>>
>>60906627
Enjoy. But I really must go work out now.
>>
>>60906670
Try 2006, friendo.
>>
File: 1487410983830.jpg (70KB, 848x941px) Image search: [Google]
1487410983830.jpg
70KB, 848x941px
>>60906661
This picture is illegal in the UK. If you are in the uk right now, you can be legally arrested and get buttraped for the next 10 years.
>>
File: 1482246366518.png (213KB, 438x633px) Image search: [Google]
1482246366518.png
213KB, 438x633px
>>60906673
>tumblr
Go back there
>>
>>60906656
>reddit spacing
>>
>>60906694
>UK
More like UCucks
>>
>>60906691
the question was how long you've been here, not what year you were born
>>
>>60906694
Why are you posting a picture of a rapist, anon?
>>
>>60906691
>Went on /b/ once when you were 7
>Got too scared and fucked off to reddit
>Come back over a decade later
>"I've been here since 2006! I'm such a le oldfag XDDD! Post le funnay memes"
>>
>>60906676
dumb frogposter
>>
>>60906419
Conio is usually a system header though.
>>
>>60906709
>reddit spacing
You say that like it's supposed to be an insult, but really, I can only take your word for it. r/programing may be full of pricks, but I only follow the article links. I rarely bother with what the denizens of the board have to say.
>>
>>60906737
>reddit existed in 2006
I honestly had no idea.
>>
File: 798.png (306KB, 593x540px) Image search: [Google]
798.png
306KB, 593x540px
>>60906707
>he doesn't even have a better comeback
>because deep down he knows he's wrong, #pragma once really is more elegant
>yet he still mad
>y he mad tho
>he is this much of a dumb animeposter
>>
File: Barf.jpg (13KB, 396x300px) Image search: [Google]
Barf.jpg
13KB, 396x300px
>>60906723
Funny!
>>
>>60906746
Yes
These are the same people who write
#include "stdio.h"
#include "iostream.h"
>>
>>60906761
Oh god, I can see the jpeg artefacts.
>>
>>60906753
Why are you so insecure?
>>
>>60906737
>>60906759
>>60906745
Sure. Yep. You said it. Boy, you sure told me.
>>
File: images (3).jpg (3KB, 225x225px) Image search: [Google]
images (3).jpg
3KB, 225x225px
>>60906783
>he thinks he seen some shit
>he ain't seen nothin yet
>mfw
>>
>>60906792
>Why are you so insecure?
Eliza: why do you ask?
>>
>>60906759
>>60906799
According to wikipedia, it was 2005.
>>
Ben Bitdiddle has invented a test to determine whether the interpreter he is faced with is using applicative-order evaluation or normal-order evaluation. He defines the following two procedures:
(define (p) (p))
(define (test x y)
(if (= x 0)
0
y))

Then he evaluates the expression
(test 0 (p))

What behavior will Ben observe with an interpreter that uses applicative-order evaluation?
What behavior will he observe with an interpreter that uses normal-order evaluation?
>>
File: 1405798826325.gif (2MB, 512x384px) Image search: [Google]
1405798826325.gif
2MB, 512x384px
/dpt/ friends, please be kind to each other :c
>>
>>60906799
dumb frogposter
>>
>>60906809
https://www.youtube.com/watch?v=QEzhxP-pdos
>>
>>60906829
I want to do some really bad things to this loli.
>>
>>60906824
>functions with no arguments
Only shitty languages allow this.
>>
>>60906759
if you were an oldfag you would have known about digg, reddit etc
>>
File: large.jpg (51KB, 500x347px) Image search: [Google]
large.jpg
51KB, 500x347px
>>60906842

Be me.
Attempt to engage fellow /g/entlemen in Socratic discussion.
Receive only childish insults.

Redditor: 1 Me: 0
>>
>>60906852
Dude, she is like 7 or so, wtf. This shit is not legal.
>>
File: 1493255507347.jpg (110KB, 640x640px) Image search: [Google]
1493255507347.jpg
110KB, 640x640px
>>60906852
>>
>>60906861
t. has never even heard of functional programming
>>
>>60906867
You forgot Slashdot.org, junior.
>>
>>60906867
First heard of reddit around 2010, it was irrelevant before that.
>>
>>60906871
And? I'm a toddlercon after all.
>>
File: 1493257691502.jpg (75KB, 346x326px) Image search: [Google]
1493257691502.jpg
75KB, 346x326px
>>60906871
>>
>>60906884
Proper functional programming languages do not allow functions with no arguments. This is some impure state-changing bullshit.
>>
File: 1492103852787.jpg (95KB, 900x641px) Image search: [Google]
1492103852787.jpg
95KB, 900x641px
I did a thing in Haskell
https://ghostbin.com/paste/o8oqz
>>
>>60906891
This post is illegal in the UK. If you are in the uk right now, you can be legally arrested and get buttraped for the next 10 years.
>>
>>60906888
I mostly use HN for tech news these days, but it's really same circlejerk crowd as reddit. One of these days I've write my own news aggregator.
>>
>>60906861
It isn't a function
>>
>>60906920
Usenet/nntp is still the best place to talk about tech.
>>
File: 14932523478922.jpg (19KB, 266x272px) Image search: [Google]
14932523478922.jpg
19KB, 266x272px
>>60906891
>>
File: danbooru-1894182.jpg (154KB, 637x900px) Image search: [Google]
danbooru-1894182.jpg
154KB, 637x900px
>>60906913
Thank god I don't live in the UK then.
>>
File: 149325298781247.jpg (24KB, 254x266px) Image search: [Google]
149325298781247.jpg
24KB, 254x266px
>>60906943
>>
>>60906861
>dodging the question
lol

>>60906824
In applicative order, this stalls because the arguments (including the loop (p)) are evaluated before applying the function. In normal order, the expressions are only evaluated when they need to be immediately reduced, which never happens to (p) because of the branch.
>>
File: 1471304516573.jpg (54KB, 1024x768px) Image search: [Google]
1471304516573.jpg
54KB, 1024x768px
>>60906901
I will buy you your own Navi lain, now shut up, someone is wrong on the wired.
>>
File: 01.png (595KB, 1036x1500px) Image search: [Google]
01.png
595KB, 1036x1500px
Thank god indeed.
>>
>>60906953
>>dodging the question
What question?
>>
>>60906963
>What behavior will Ben observe with an interpreter that uses applicative-order evaluation?
>What behavior will he observe with an interpreter that uses normal-order evaluation?
>>
File: 02.png (515KB, 1049x1500px) Image search: [Google]
02.png
515KB, 1049x1500px
>>
>>60906898
How is that changing state? Mathematically, there is no difference between a constant and a constant function - and any constant function can be expressed as a function of zero arguments.
>>
File: 03.png (496KB, 1042x1500px) Image search: [Google]
03.png
496KB, 1042x1500px
>>
>>60906932
Implying the Perl community on Usenet wasn't the cancer that drove me away (and ruined the language)...
>>
File: 04.png (516KB, 1045x1500px) Image search: [Google]
04.png
516KB, 1045x1500px
>>
>>60906898
what are you even talking about
>>
>>60906979
The point is that in a proper programming language both (define (p) ...) and (define p ....) should be the same thing.
>>
>>60906954
Thanks papa.

>>60906979
That's true in a pure language, but in an impure language (guess what -- impure languages matter!!) you can think of every function as carrying an implicit argument and returning an implicit result, that being the global state which can change after every invocation.

Also even in Haskell, a loop like
p :: a
p = p

will stall the interpreter, even though "it's a function with no arguments, and therefore a constant value"
>>
File: 05.png (552KB, 1033x1500px) Image search: [Google]
05.png
552KB, 1033x1500px
>>
>>60906846
https://www.youtube.com/watch?v=1iamvSZfZ9E
>>
>>60906824
>Ben Bitdiddle
>>
>>60906961
>>60906974
>>60906987
>>60906997
>>60907015
delet
>>
>>60907020
The boy is cuter and girlier than her.
>>
File: 07.png (583KB, 1044x1500px) Image search: [Google]
07.png
583KB, 1044x1500px
>>
File: 1487929902959.gif (1MB, 195x229px) Image search: [Google]
1487929902959.gif
1MB, 195x229px
>>60906961
>>60906974
>>60906987
>>60906997
>>60907015
>>60907028
>>60907043
>>
File: 08.png (624KB, 1047x1500px) Image search: [Google]
08.png
624KB, 1047x1500px
>ywn never get a pitjob from a loli
>>
File: 09.png (503KB, 1040x1500px) Image search: [Google]
09.png
503KB, 1040x1500px
>>
File: 10.png (501KB, 1046x1500px) Image search: [Google]
10.png
501KB, 1046x1500px
>>
>>60907042
that's the joke
>>
File: 11.png (485KB, 1044x1500px) Image search: [Google]
11.png
485KB, 1044x1500px
I know you all are fapping.
>>
File: 12.png (531KB, 1045x1500px) Image search: [Google]
12.png
531KB, 1045x1500px
>>
File: 14.png (615KB, 1047x1500px) Image search: [Google]
14.png
615KB, 1047x1500px
>>
File: 15.png (601KB, 1044x1500px) Image search: [Google]
15.png
601KB, 1044x1500px
>>60907124
>>
File: 16.png (495KB, 1044x1500px) Image search: [Google]
16.png
495KB, 1044x1500px
>>60907134
>>
File: 18.png (598KB, 1047x1500px) Image search: [Google]
18.png
598KB, 1047x1500px
>>60907156
>>
File: 19.png (647KB, 1044x1500px) Image search: [Google]
19.png
647KB, 1044x1500px
>>60907167
>>
File: 20.png (469KB, 1043x1500px) Image search: [Google]
20.png
469KB, 1043x1500px
>>60907178
Fin.
>>
you're fucked up
>>
New to programming

Just downloaded python 2.7 and now going through python the hard way.

new to learning technology in general. didnt even know what powershell was now learning that first ._.
>>
>>60907212
>normalfags
>>
>>60907237
no, I am not a normalfag, I'm just not as fucked up as you are
>>
File: 001.png (2MB, 1697x2503px) Image search: [Google]
001.png
2MB, 1697x2503px
>>60907249
If lolis are fucked up to you, you're a normalfag, bucko.
>>
Anyone using kivy/kivent? I'm trying to into it now, but the documentation, especially for kivent, is somewhat lacking.
>>
pythonfags fuck off
>>
File: 1393139469297.jpg (7KB, 250x250px) Image search: [Google]
1393139469297.jpg
7KB, 250x250px
>>60907269
>if you're not a pedo, you're a normalfag
get help
>>
>>60907231
>python the hard way
That book is garbage, and Zed Shaw is a hack.
>>
>>60907231
Maybe you should learn Python3 instead?
>>
File: 1493891792611.gif (1MB, 284x342px) Image search: [Google]
1493891792611.gif
1MB, 284x342px
>>60907322
>lolicon isn't pedo
>reee normalfag, why dont you want to fuck anime toddlers, reeeeeeee
>>
>>60907269
Traps > Girls
>>
haha I'm a fag
https://www.hastebin.com/raw/xucohigoxo
>>
>>60907395
not haskell
>>
File: 5BYQRZx.jpg (212KB, 1280x904px) Image search: [Google]
5BYQRZx.jpg
212KB, 1280x904px
aye

I've been working on finishing my >java studies

as I finished, I'm trying to switch to Intellij Idea as my main IDE, but I'm having trouble adapting to the way it's GUI system works

it's rather similar on some aspects, but somehow I still can't get it to perform actions (they're called Listeners on it I believe) and to launch the GUI on screen when running the program

I did a quick attempt at letting it create an object with some information, as shown here:

public class La {

private JButton button1;
private JTextField txtAccName;
private JTextField txtName;
private JTextField txtLName;
private JTextField txtPhone;

public La() {
button1.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent mouseEvent) {
super.mouseClicked(mouseEvent);
Account c1 = new Account(Integer.parseInt(txtAccName.getText()), txtName.getText(), txtLName.getText(),Integer.parseInt(txtPhone.getText()));
JOptionPane.showMessageDialog(null, "Created successfully");
}
});
}
}


this differs greatly from what Netbeans shows and does, so I'm not sure if I'm doing something wrong or what the fuck's going on here

I'd really appreciate a hand
>>
File: 003.png (2MB, 1691x2500px) Image search: [Google]
003.png
2MB, 1691x2500px
>>60907370
>reeeeeeee
I see you are indeed a normalfag.

>>60907389
Only if you're gay.
>>
File: 1480186874030.jpg (520KB, 1280x720px) Image search: [Google]
1480186874030.jpg
520KB, 1280x720px
>>60907412
Only normalfags dislike traps. Fuck off normalfag.
>>
>>60907409

shit, accidentally deleted the part where it said I've been working on Netbeans up 'till now

sleep deprivation does a number on one's ability to write
>>
>>60907409
Nice pic

Java is shit, learn Haskell.
>>
File: tN14vQJ.jpg (7KB, 225x224px) Image search: [Google]
tN14vQJ.jpg
7KB, 225x224px
>>60907412
>still insists that anyone who isn't into pedo/loli must be a normalfag
nah kiddo, its a spectrum, kind of like your autism

also
>not liking traps
psh, normalfag confirmed
>>
File: tumblr_olhwb6bjZ11s3ci0uo1_1280.png (1MB, 1020x1665px) Image search: [Google]
tumblr_olhwb6bjZ11s3ci0uo1_1280.png
1MB, 1020x1665px
>>60907442
I just picked it because it's the easiest language to get a job with, I'll expand my boundaries after doing so

have another pic fampai
>>
File: 004.png (2MB, 1699x2500px) Image search: [Google]
004.png
2MB, 1699x2500px
>>60907420
>>60907453
But anons, I never said I didn't like traps. I just said that you're gay if you like them more than lolis.

>nah kiddo, its a spectrum
Ah, so you're admitting that you're a normalfag.
Also, we all have autism. Why else would we spend our precious time in this shithole?
>>
File: 1478114118135.jpg (440KB, 1280x720px) Image search: [Google]
1478114118135.jpg
440KB, 1280x720px
>>60907487
Only a normalfag would not admit that traps are the best.
>>
File: 1438982991127.jpg (27KB, 447x444px) Image search: [Google]
1438982991127.jpg
27KB, 447x444px
>>60907487
>anyone who doesn't want to fuck anime toddlers instead of traps is a normalfag
>>
Guys I'm really confused. What does any of this have to do with programming?
>>
>>60907538
Nothing. There's one faggot forcing gay shit on /dpt/ and /g/ is generally the easiest board to troll so retards will have shitposting fest.
>>
File: 1487162354738.png (255KB, 600x561px) Image search: [Google]
1487162354738.png
255KB, 600x561px
>>60907538
Traps are programming.
>>
>>60907569
>traps are gay
>traps are programming
s-so... programming... is... gay?
>>
File: 85505816.png (268KB, 489x399px) Image search: [Google]
85505816.png
268KB, 489x399px
>>60907538
Nothing. Dick shitters go back to
>>>/lgbt/
>>
File: 34602056.jpg (59KB, 480x480px) Image search: [Google]
34602056.jpg
59KB, 480x480px
What python module should I use to do something when I press a shortcut key combo?

Everything I've programmed starts from the top and works its way to the bottom? Can it do more than one thing at a time?
>>
http://lua-users.org/wiki/PatternsTutorial
>Limitations of Lua patterns
>Especially if you're used to other languages with regular expressions, you might expect to be able to do stuff like this:
>'(foo)+' -- match the string "foo" repeated one or more times
>'(foo|bar)' -- match either the string "foo" or the string "bar"
>Unfortunately Lua patterns do not support this, only single characters can be repeated or chosen between, not sub-patterns or strings.
>only single characters can be chosen between.

But I don't see how. I'm looking to sanitize some input where ! and / are forbidden at the start of the string (but I aim to just strip them, not throw away the string).
So I could do that by matching "/-!-%a" in lua (- meaning zero or more if possible, %a meaning letter). But that doesn't catch alternating ! and / like (\!|\/)+\w would in regex.
I've looked at various documentation but I can't find a trace of it. Does anyone have any ideas about why this is?
The hacky solution would be to just do repeated /-!-/-!-/-!-/-!-/-!- for a while so I catch some number of them, that'd work but it's very ugly.
Performance isn't really a concern luckily.
>>
>>60907585
traps aren't gay


python is
>>
>>60907585
No.
Think of the hierarchy of all possible logical propositions as like the shittiest road system ever: namely, a network of one way streets. A one way street from P to Q exists if and only if P implies Q in all possible worlds.
Traps are gay, so there's a one way street from traps to gay.
Traps are programming, so there's a one way street from traps to programming.
The logic error you're making here is that you're seeing a path between programming and gay, and thinking to yourself, oh, that looks like a path I can mentally traverse. The reason this is erroneous is because one of the streets in that path is facing the wrong way. You're trying to get from programming to traps and then from traps to gay, but you can't get from programming to traps, because it's a one way street and it goes the other way: from traps to programming.
>>
html is a superior turing complete programming language to c. c is too bloated what with its classes and such, html is a pure functional language with no state :^)
>>
C++ really is about to die, says increasingly nervous looking man
>>
>>60907585
Traps ⊂ Gay
Traps ⊂ Programming
∴ Traps ⊂ Gay ∩ Programming
>>
>>60908066
c++ is garbage the way it treats whitespace as syntax
use html, it's much faster and cleaner and can do all the same things
>>
>tfw you find the coolest papers
http://www.cs.unc.edu/~isenburg/papers/ils-lcpfpg-05.pdf
Great stuff.
>>
>>60908080
∴ either there are no traps or some of programming is gay
>>
>>60907926
Traps != programming.
Your logic is flawed
>>
>>60908122
>Traps != programming.
That's what she said.
Learn to read.
>>
>>60908129
Fair enough. I usually gloss over anything past the first line of anyone talking about traps and tell them to kill themselves.
>>
Alright friends, pretty much 'learnt how to program' through Python recently. Understand all the data types, control structures, object orientation; majority of the basics.

What I'm most interested in is predictive learning and all that shit. For a little fun I sort of want to analyse penny stocks (on the ASX because I'm in Australia). Is there any places that you guys know of for accessing this data for free, or for little cost at least; even if it's like 20 mins delayed or something. I guess even archived, but recent, data would even work for what I'm planning on doing.

Surely some companies might just have some realtime code that you can import in and just call for a certain amount of data you want? Or am I thinking that this is all a lot more open than it actually is? That'd have to be the way 'real time' data works right, seeing as you can't just read in a .csv file if it's constantly being updated?

tl;dr

Any easy way to access penny stock data (ASX specifically), for free (or for not too much)? And any useful ways for dealing with this constant flow of information within Python?
>>
File: 1450744086047.jpg (80KB, 600x582px) Image search: [Google]
1450744086047.jpg
80KB, 600x582px
JAVA MOST STONG LANGUAGE ALL WILL SEE! DEATH TO THOSE WHO DISAGREE!
>>
>>60908167
Check if there is an available API that you can access the data for.
>>
>>60908167
Search for it:
https://stackoverflow.com/questions/1553314/how-to-fetch-stock-price-from-australia-stock-exchange
>>
>>60908177
>pic
Exactly what kind of abuse do these go through?
>>
File: ##squad.jpg (41KB, 599x548px) Image search: [Google]
##squad.jpg
41KB, 599x548px
>>60908194
instead of saving images they want to share, there was a period of time where people just took a picture of their screen and then cropped it. A sufficiently popular picture would go through this process hundreds if not thousands of times. Seems like people finally learned, now, or maybe facebook/instagram/snapchat/whateverthefuck made their UI easier for people, idk.
>>
>>60907585
yes, faggot.
>>
>>60908236
No, just traps are.
>>
>>60908180
>>60908182
Thanks friends
>>
>>60908182
here?
https://au.advfn.com/stock-market/ASX
>>
>>60907538
>>60907554
>>60907569
>>60907585
>>60907853
>>60908080
>>60908129

def is_gay(x):
return 'traps'==x

>is_gay('programming')
False
>is_gay('traps')
True


Pretty cut and dry to me, fellas
>>
>>60907325
Nice m3me.
>>
>>60908414
(defun gayp (x)
(eq x 'you))

(gayp 'you) => t
>>
whats up with all the weeb porn in this thread? there are different boards and shit for that.
>>
>>60908612
/g/ doesn't have mods.
>>
File: 1466969439649.png (455KB, 653x568px) Image search: [Google]
1466969439649.png
455KB, 653x568px
>>60908612
>>60908619
says right here "anime imageboard"
>>
>>60905870
> implying java ever gets you an end result
> implying java doesn't become an unmaintainable mess
>>
>>60907409
>I'm trying to switch to Intellij Idea
lol fuck off with that shit i'm not even a freetard but there is nothing wrong with eclipse
>>
>>60908612
anime watching losers are also the type to have nothing better to do than post anime all fucking day, what a surprise.
>>
>tfw rewrite your Python code in C++ using Boost. It's fucking slower.
>>
>>60908710
>boost
ye no shit
C++ users avoid Boost because it's so much slower than the standard library.
>>
>>60908722
I'm dealing with custom datetime requirements and I thought boost's datetime would fit. What's a good C++ date time library?
>>
>>60908710
>>60908729
C++ is garbage. Use C instead.
>>
where are the fucking mods? nsfw loli ITT and crap like this: >>60892947
>>
>>60908896
/g/ never had mods.
>>
>>60908896
this board doesn't have mods, although hopefully some benevolent force is keeping track of the sickos who post shit like that.
>>
cat
import std.stdio, std.range, std.algorithm;

void main(string[] args)
{
if (args.length is 1)
{
stdin
.byLine
.each!writeln;
}
else
{
args
.drop(1)
.map!(f => f.File("r").byLine)
.each!(each!writeln);
}
}


head
import std.stdio, std.conv, std.range, std.algorithm;

void main(string[] args)
{
stdin
.byLine
.take(args[1].to!int)
.each!writeln;
}


tail
import std.stdio;

void main(string[] args)
{
import std.algorithm, std.range, std.conv;

stdin
.byLine
.drop(args[1].to!ulong)
.each!writeln;
}
>>
>>60908958
WHY ARE YOU YELLING?
>>
>>60908729
joda-time
>>
New Python user here. What is the most common way to run Python when sharing scripts/programs? Are those not its intentions? Like with JS you can embed your game/code in a web page and send someone the link, in java you can send someone an executable jar file. Does Python not have this? I love Python for just opening up and starting work right away unlike most other languages though.
>>
>>60908958
d looks interesting.
does the module/import system work well?
how long are the compile times?
how annoying is the gc/the libraries that use it?
>>
>>60909044
I haven't used python in a professional setting but I just use https://anthony-tuininga.github.io/cx_Freeze/
>you can just send someone a jar file
Not really. That relies on the JVM being installed. You can create java executables that contain the JVM and run an instance of that for your program. That's the common way you'd ship java without requiring too much of the environment. cx_freeze is similar i believe (haven't looked into details).
>>
>>60909044
For simple scripts, you would most commonly require that the someone you are sharing the script with has a compatible version of python installed.

This is not that different from jar binaries--those require that the JRE is installed.

There are ways to compile python programs to binaries (such as .exe) though. Usually the compilation will output multiple files, and so for larger projects you might consider using an installer.
>>
File: 1493597267589.jpg (35KB, 480x439px) Image search: [Google]
1493597267589.jpg
35KB, 480x439px
>>60909044
>>60909088
Actually, my mistake. JAR probably is not a binary.
>>
>>60909065
>GC
>annoying
Anon GC isn't annoying unless you're a very specialized individual. And if you are that kind of individual then it's pretty awful right now. You can't use very large parts of the standard stuff. But you cna still catch all of that easily by marking @nogc (or i believe there's a compiler flag) so it's not really annoying besides what you're lacking.
Most of the GC utilizing features are harmless to programs though. It's if you rely on the GC for your allocations that you'd really begin to care.
>modules
Feels great
>compile times
Way better than C++ but I find compile times for virtually every language underwhelming. It's objectively good though.
>>
>>60907845
>still haven't found a solution
string.rep("/-!-", 30)..

That's not too bad though.
>>
>>60909065
Why of course. Although it doesn't have a state-of-the art build system like Rust's cargo and module system

use std{stdio, algorithm, range}; would be really nice. But it's better than writing header files
>>
>>60909066
>>60909088
>>60909108

On linux though you can run Python without being installed or am I being dense? You still have to have the library? I recall a kid at my uni being able to call and run his programs from the command line in a really nice way to do a lot of tedious stuff or if he just needed a random number or some sort of lists sorted.
>>
>>60909145
Most distros already have python installed
>>
>>60909145
>On linux though you can run Python without being installed
It's installed by default on a lot of distributions. Just like gcc
>being able to run his programs from the command line
Probably this:
https://en.wikipedia.org/wiki/Shebang_(Unix)
But there's also other ways to do it.
You just put
#!/usr/bin/env python

at the top of your script.

I haven't thought about it much but maybe you can set up file extensions associations for terminals so they run without you needing the shebang.
>>
Explain a brainlet the "Function recurrence" part please
https://dlang.org/library/std/range/recurrence.html
>>
>>60909196
you describe an element in terms of other elements
>(a[n] =) "a[n-1] + a[n-2]"
and give it some initial state
>>
>>60909196
Basically a way to write these simply:
http://mathworld.wolfram.com/RecursiveSequence.html
>>
What are some projects to start that is worthy to put on my resume? I'm always coding something but its always filthy shit like malware or something related to organizing my porn stash.
>>
>He claims to program in C++
>He actually just programs in C-with-classes
>He can't even into template metaprogramming, the true style if C++ programming.
>>
File: 83421.png (14KB, 203x248px) Image search: [Google]
83421.png
14KB, 203x248px
>>60909318
>she (male) thinks template metaprogramming is special, noteworthy or a good feature
>>
>>60909318
>template metaprogramming
nicely meme'd

there's plenty of things you can do without using templates let alone doing metaprogramming with them
>>
>>60909337
Enjoy doing unnecessary computations at runtime.
>>
What are some efficient sorting functions that don't guarantee perfect sorting? The goal is to achieve an ordering that's coarsely correct and improves over time. Ideally I'd have a max delta. I don't want the order completely wrong at any point. But if maybe 50 elements or so are scambled but they're sorted with regards to external elements that'd be great. I'm only on multi-core machines so no need to constrain to non-parallel bigO.

Also how do people find algorithms based on their requirements?
>>
>>60909350
enjoy doing unnecessary computations at compile time.
>>
>>60909350
If I didn't want to do unnecessary computations at runtime, I would simply evaluate the expression at compile time, not use an awful fucking system where you've got compile time expressions and run-time expressions
>>
>>60909350
>Enjoy doing unnecessary computations at runtime.
Are you serious man? Have you even used templates? Templates are one of the biggest compile time hogs in existance. You could run an entire metaprogramming preprocessor on the language (which many do actually) and still save time compared to C++ templates. They're extremely bad at that.
>>
>>60909352
>don't guarantee perfect sorting
It's not a sorting function if that's not true.
Maybe you just want to do the first few iterations of shellsort or something?
>>
>>60909374
>He can't even read
>>
New thread:
>>60909385
>>60909385
>>60909385
>>
>>60909350
>what is constexpr
>>
>>60909387
>runtime
Oh, so basically you don't have a chance in hell of being right even.
>>
>>60909382
>What is an approximation algorithm
>>
>>60909303
What kind of malware do you write? It's something i've always been interested in, but not interested in enough to go out of my way and do it.
>>
>>60909406
>Approximating a sorting algorithm
The fuck?
>>
>>60909415
That's literally what he asked for. Are you simple, dude?
>>
>>60909352
>Also how do people find algorithms based on their requirements?
by not being clueless spoonfed babies

just do insertion sort and kill yourself
>>
>>60909467
So you know the answer to my question then.
Because if you didn't that'd imply you're a clueless spoonfed baby.
Great anon.
>>
>>60909475
maybe i do, maybe i don't
>>
>>60909481
I don't particularly care because you've established you're not particularly friendly. And I think that implies a lack of correctness, had it affirmed many times.
>>
>>60909500
kill yourself ungrateful retard who couldn't even bother to google it
>>
>>60909534
>ungrateful retard
You've given me nothing so i have nothing to be grateful for.
You're probably wrong about lots of things.
>>
>>60909551
you're a fucking joke dude go have fun with your approximately sorted shit
>>
>>60906824
(p) is defined as a recursive procedure with no arguments/.when evaluated, it will fall in an infinite self-evaluating loop.(test) procedure is defined as a procedure with two arguments.because the interpreter uses applicative order evaluation, when test is called, first it 'looks at'(evaluates) the two arguments ( x y) and when y (p) is evaluated, (p) is called and the program falls in an infinite loop.given an interpreter using applicative order of evaluation, the body of the (test) procedure will never get the chance to be executed.with a normal order evaluation interpreter, the interpreter doesn't look at the arguments, unless it is needed, so the test should be executed and (test) should return 0. (if) conditional is a special form, because it also evaluates an expression only if needed.(if #f (p) 13) returns 13.
>>
What should I code. I can never think of anything useful to code and improve
>>
>>60909414
Its was just one actually, and it was my biggest project to date.
When executed it copies itself to the system folders and set it to launch on startup.
Then I can connect to it whenever I want and perform a set of commands like file/folder manipulation, download/upload files, take screenshot, etc
Its been ages that I don't mess with it though
Thread posts: 326
Thread images: 72


[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.