[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 Programming 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: 313
Thread images: 49

File: Simulation.png (537KB, 426x680px) Image search: [Google]
Simulation.png
537KB, 426x680px
What are you working on, /g/?

Old thread: >>58693968
>>
>>58697071
echo $MEMES
>>
>>58697071
Anyone know anything about HLSL? I have an array, say {0, 1, 2, 3, ...}. If I access the array directly with array[0], the value returned is as expected, 0. However, if I use an integer whose value prints to 0, say array[index], I get a nonsensical value. What gives? I've been tearing my hair out for weeks trying to figure this out.
>>
File: languages2.png (16KB, 522x384px) Image search: [Google]
languages2.png
16KB, 522x384px
Reminder
>>
>>58697122
I choose all 3. I choose Rust.
>>
>>58697071
anyone here ever worked with Nest Works, the API Nest Labs publishes with all their bot net devices? working on something with it and I have an odd question someone who knows the API better might be able to answer
>>
File: lmao.png (229KB, 375x376px) Image search: [Google]
lmao.png
229KB, 375x376px
>>58697122
>functional
>fast development
>>
>>58697137
>Rust
>the promise of good performance but not in reality
>the promise of fast development but not in reality
Makes sense.
>>
>>58697071
I'm making a tiny console for BasicTV (telnet, SSH is planned), enough for uploading and basic TV controls. Any suggestions on how to make it better?
>>
>>58697141
>t. Rob Pike who never got over losing in the 70s
>>
>>58697166
>Any suggestions on how to make it better?
add some anime features
>>
What the fuck is going on with Haskell that the toolset is like 350mb?
Does it need to be that big? Other modern languages seem to fit their shit into about 50mb. Yeah I know it's FP but why would that need a drastically larger toolset?
>>
>>58697122
java is best fuck off goyim
>>
>>58697169
Limbo is actually a bretty based programming language, famalam.
>>
File: MMD_newGUI.png (301KB, 1600x900px) Image search: [Google]
MMD_newGUI.png
301KB, 1600x900px
>>58697122
Reminder that no matter what you choose, you will never program anything as good as the 5MB wonder that is MikuMikuDance.

https://www.youtube.com/watch?v=JFmMe6V0uo4
>>
File: power.png (171KB, 1843x947px) Image search: [Google]
power.png
171KB, 1843x947px
I think this is as good as can be expected
>>
>>58697186
>Yeah I know it's FP
how is that relevant here?
>>
>>58697186
ghc compiles the code to a quantum state in which all outcomes are predetermined with infinitely fast runtime
>>
File: 1472626364001.jpg (705KB, 1080x1080px) Image search: [Google]
1472626364001.jpg
705KB, 1080x1080px
>>58697020
Still wondering where you got the idea that that was a single line of code...
>>
>>58697122
Java for safety
>>
File: languages2.png (15KB, 522x384px) Image search: [Google]
languages2.png
15KB, 522x384px
>>58697122
>>
>>58697211
this is true. i actually implemented that myself.
>>
>>58697181
You'd have to stream that the old fashioned way
>>
>>58697219
>garbage collected
>good performance
Pick one

>no generics
>fast development
Pick one
>>
>>58697200
Well it isn't but I knew some cunt would come and chime in how that made a difference
>>
Any rule of thumb that can be a guide to know whether a problem is better solved recursively than iteratively? I know fibonacci and file system scanning is better coded recursively than iteratively.
Assume infinite stack.
>>
how do i git gud with python? i failed python algorithms due to having no experience and being a robot. i'm retaking it now and still have no idea how
>>
>>58697246
>Well it isn't
why did you fucking it posting it then?
>>
>>58697196
to be fair it's windows only
>>
>>58697219
Good, except for you accidentally swapped the languages under the "Fast Development" and "Neither" categories.

Fucking FP hipster sodomite.
>>
How can you write some actual useful programs in C?
>>
>>58697273
ofc
>>
>>58697268
good, it keeps out the linplebs
>>
>>58697257
iterative is faster in 99% of cases
recursion is useful for solving problems but most of the time recursive solutions can be implemented iteratively with a big improvement in runtime and memory usage.
>>
>>58697263
I just told you you fucking retarded pajeet
>>
File: pickthree.png (11KB, 522x384px) Image search: [Google]
pickthree.png
11KB, 522x384px
>>58697122
Fixed.
>>
>>58697186
quality isn't free anon
>>
>>58697270
>he thinks shitlangs like python are faster for development
>>
>>58697273
>2017
>using c

top keks
>>
>>58697257
They're equivalent. You can always transform an iterative algorithm into a recursive algorithm, and vice versa.
>>
>>58697287
>>58697211
>>58697200
>3 FP retards are deflecting because their language is shit

Really makes you think...
>>
>>58697281
well yeah but iterative solutions can be reimplemented recursively for mad FP cred
>>
>>58697268
What else would you program for? Mac?
>>
>>58697299
>3 FP retards are deflecting because their paradigm is shit
FTFY
>>
how do i get good at solving programming problems?
is the solution just experience+books on algorithms?
>>
>>58697298
That's retarded, though.
>>
>>58697316
>he thinks math is retarded
I think you may be the retarded one, friend.
>>
how do i compete with all the chinks as a brainlet in CS?
>>
>>58697298
The recursive version will always be slower though.
>>
>>58697315
>experience
Yes, and read a lot of stackoverflow questions and answers.
>>
>>58697304
>mad FP cred
what does that entail? getting called out for having a 3rd chromosome on a tibetan knitting forum?
>>
>>58697326
Wrong.
>>
>>58697313
It isn't, map and filter are actually useful you pajeet cunt
Haskell is shit though
>>
>>58697322
The fuck are you talking about?
Loop through an array list recursively and try not to look retarded.
>>58697340
>wrong
>doesn't say why it's wrong
10/10 post m80
>>
>>58697340
You are ignorant.
>>
Java 8 is a gift from the gods
>>
>>58697344
And those aren't functional programming concepts. Those are distributed programming concepts.
>>
File: pickthree.png (20KB, 522x384px) Image search: [Google]
pickthree.png
20KB, 522x384px
>>58697285
>>
>>58697373
>map and filter is inherently distributed
>>
File: 1485576526665.jpg (3MB, 2953x2889px) Image search: [Google]
1485576526665.jpg
3MB, 2953x2889px
>>58697071
>mfw my faggot poo boss is banned from America thanks to Trump

How has Trump improved your life /g/?
>>
Any ideas about what the fuck should I create? I have some electronic parts and a few toys that I could make use of to build something, but I don't know what.
Preferrably, I'd like to do some random gadget for my room that's not necessary, but might be useful.
I feel like there are lots of things I can do, by I am held back by being able to waste my time on other pointelss shit.
>>
should i not be falling for the CS meme if I actually have no interest in it?
>>
>>58697344
>>58697373
Aha. Aha- hahaha. AhaHAhaHAHAHAHAHAHAHAHAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>>
>>58697373
>map, filter, reduce
>distributed programming concepts.
what?
>>
>>58697373
Fukken saved.
>>
>>58697387
DIY time rotor
>>
>>58697373
they're pure, higher order functions
>>
>>58697352
>>58697361
>The recursive version will always be slower though.
If the compiler can perform tail call optimization on a recursive function then it will transform it function into an iterative one. This will necessarily have the same performance as the function written iteratively. Therefore the above claim is false.
>>
>>58697430
That's a lame argument since in this case it's the compiler changing it to an iterative version then running the iterative version, not the recursive version. In this case it's still the iterative version that's faster.
>>
>>58697383
I don't know, I don't live in a third world shithole called USA.
>>
>>58697447
>That's a lame argument
It's correct, though.
>>
>>58697465
I don't live in America either. How could my boss be banned if he lived in America?
>>
>>58697491
Where do you live then?
>>
>>58697509
Canada
>>
Hi guys, I am making shitty Windows Phone application and I need to ask how to add a shadow to my current text, I am using

 <TextBlock HorizontalAlignment="Center">
<Run Text="Feels Like: " FontSize="23"/>
<Run Text="{Binding CurrentTemperatureFeel}" FontSize="23"/>
<Run Text="°C" FontSize="23"/>



And I need a simple shade because of the images I am using otherwise it looks like shit.
>>
>>58697340
>use retarded, unreadable and incomprehensible recursive algorithms
>compiler tries to help your mental illness by converting to iterative before you shoot yourself in the foot
>"look guise, recursive isn't so slow after all xD"

I hope you don't contribute to open source libraries.
>>
>>58697521
Don't you mean USA's progressive backyard full of chinks?
>>
I'm starting to get super interested in the blockchain technology underpinning Bitcoin.

From a programming standpoint, what key concepts should I know if I wanted to make my own blockchain-related software?
>>
Can someone please give me some code review?

https://gitlab.com/linted/linted/blob/7cd64941f902f08095c1a9326d83004afbe2971b/src/ada-core/src/linted-io_pool.adb
>>
>>58697393
>>58697410
>2 pajeets believed him
>>
>>58697569
strength of hashing algorithms is pretty much it, as well as a general understanding of programming
>>
>>58697540
>unreadable and incomprehensible recursive algorithms
Your inferior education is showing.
>>
File: 1435886454196.png (17KB, 500x300px) Image search: [Google]
1435886454196.png
17KB, 500x300px
>>58697306
>>58697312
thanks anons! I hope you and your waifus enjoy happiness for eternity
>>
>>58697596
>B-but it gets compiled as iterative anyway

What is the point of abstractions that result in precisely zero gains?

IF recursion actually results in better readability (rare but I guess it must happen eventually) then fine.
Still haven't seen many examples where it is actually worth using though, so why even bother learning it as a concept?
>>
File: 1467623015348.gif (550KB, 728x720px) Image search: [Google]
1467623015348.gif
550KB, 728x720px
>>58697623
what a nice post
>>
>>58697199
What is to be expected?
>>
>>58697585
Actually, my hysterical laughter indicated that I didn't believe his hilarious ideas.
>>
>>58697166
Controlling TV's through IR, HDMI-CEC, and serial ports.
>>
>>58697668
>IF recursion actually results in better readability (rare but I guess it must happen eventually) then fine.
That is exactly what it does.

>Still haven't seen many examples
Then you're obviously not looking in the right places.
>>
File: CNRLWl6UcAAHblR.jpg (62KB, 1024x576px) Image search: [Google]
CNRLWl6UcAAHblR.jpg
62KB, 1024x576px
How does one stay ahead of the curve? Is it just corporatespeak that doesn't really mean anything?
>>
File: 1472349296687.jpg (216KB, 700x700px) Image search: [Google]
1472349296687.jpg
216KB, 700x700px
>>58697670
what a cute post!
>>
>>58697712
Yes.
>>
>>58697712
by shitposting on /g/
>>
>>58697712
that just means stay current with technologies that constantly come out. mostly applies to web programming and its infinite amount of bullshit frameworks and libraries
>>
>>58697683
>controlling TVs through IR
planning on that, but I'm not there yet
>HDMI-CEC
>serial port
BasicTV is a decentralized internet TV system (github.com/Dako300/BasicTV), it isn't low level like that.
>>
>>58697574
In you Unsafe (body) what's the point of copying over the contents of W into constant variables? Seems...pointless.
>>
>>58697696
For/while loops unwind elegantly, callstacks don't.

Jesus christ, even debugging recursive functions is a pain in the ass.
Different strokes for different folks I guess, but please just don't spread your illness any further.
>>
>>58697739
Wouldn't that be staying on the curve
>>
>>58697765
>illness
Didn't realize writing correct code was an illness these days, the lunatics really have taken over the asylum.
>>
>>58697774
It's a reference to the normal distribution curve. 'Ahead of' means 'further along the X axis'.
>>
>>58697673
Downloads song's from youtube, except this actually find the proper versions and not the dumb music videos with 30+ seconds of fluff.
>>
How do I convert a C double to/from network byte order?
>>
File: 1485603428619.jpg (122KB, 720x720px) Image search: [Google]
1485603428619.jpg
122KB, 720x720px
anyone got good online resources/tutorials on lexical analysis/creating a DSL?
>>
>>58697122

You need to swap around the languages in the fast development and neither categories.
>>
>>58697824
reverse the bytes
>>
>>58697838
what kind of DSL?
>>
>>58697824
If you have 16, 32, or 64 bits and are on GCC, you can use __builtin_bswap and macros to detect endian on the current machine

Here's what I use
#ifdef IS_LITTLE_ENDIAN

#ifdef __GNUC__

#define NBO_64 __builtin_bswap64
#define NBO_32 __builtin_bswap32
#define NBO_16 __builtin_bswap16

#define NBO_TO_NATIVE_16 __builtin_bswap16
#define NBO_TO_NATIVE_32 __builtin_bswap32
#define NBO_TO_NATIVE_64 __builtin_bswap64
#else

#error "no converting functions for NBO"

#endif

#endif

#ifdef IS_BIG_ENDIAN

#define NBO_64(a) (a)
#define NBO_32(a) (a)
#define NBO_16(a) (a)

#define NBO_TO_NATIVE_16(a) (a)
#define NBO_TO_NATIVE_32(a) (a)
#define NBO_TO_NATIVE_64(a) (a)
#endif


IS_LITTLE_ENDIAN and IS_BIG_ENDIAN have to be defined by you.
>>
>>58697838
http://letoverlambda.com/index.cl/guest/chap4.html
>>
>>58697824

Using a union, type pun it to a uint64_t, then use a byteswap function if you're on a little endian system.
>>
>>58697916
>>58697899
Cheers
>>
>>58697838
http://racket-lang.org/
>>
>>58697916
>>58697899
If you're going to go as unportable as using builtins, you may as well just use the GNU <byteswap.h> header.
>>
>>58697946
At least this can be expanded through macros to account for other compilers, and worst case scenario is referencing a function I made to handle it. I just copied over the relevant parts.
>>
>>58697071
i need help with this
 1#include <stdio.h>
2#include <string.h>
3#include <stdlib.h>
4
5void reverse(char* s){
6 int n = strlen(s),i;
7 char *temp;
8
9 temp = (char *)malloc((sizeof(char)+1)*n+1);
10 i = n-1;
11 while(i >= 0){
12 *temp++ = *(s+i);
13 --i;
14 }
15 strcpy(s,temp);
16 free(temp);
17}
18
19int main(){
20 int c;
21 char *s;
22 s = (char *) malloc((sizeof(char)+1)* 128);
23 while((c = getchar())!= EOF){
24 *s++ = c;
25 }
26 reverse(s);
27 printf("%s\n disregard that i suck cocks",s);
28 free(s);
29
30 return 0;
31}
32

i get error
*** Error in `./a.out': free(): invalid pointer: 0x0000000000fe602f ***
disregard that i suck cocksAborted
wat do?
>>
>>58697946

You don't actually have to use a builtin. There are some byteswap patterns that GCC and Clang can recognize and turn into a bswap instruction, or equivalent on other platforms.

http://stackoverflow.com/questions/36497605/how-to-make-gcc-generate-bswap-instruction-for-big-endian-store-without-builtins
>>
>>58697991
You update s such that it no longer points to the address returned by malloc.
>>
>>58697991
You're moving the s pointer so when you free() you're freeing at the end of the buffer. the argument to free() needs to be the exact same pointer that you got from malloc()
>>
>>58697991
>*s++
You need to free the exact pointer that malloc gives back, i.e. to the start of the block.
>>
>>58698037
>http://stackoverflow.com/questions/36497605/how-to-make-gcc-generate-bswap-instruction-for-big-endian-store-without-builtins
that's hot
>>
>>58697196
I hear the new version is capable of translating moon runes into a human readable language.

https://youtu.be/Ra6_6gOGK6E?t=25s
>>
>>58698054

I tested in Godbolt. These patterns work on GCC, Clang, and ICC, but Microsoft's CL compiler, regardless of optimization flags, will not produce a bswap instruction. But that's okay, MSVC is shit anyways.
>>
killMeNow(true);
#kill me pls
>>
>>58698124
Why did I put a ; there??
>>
>>58697382
>>58697382
>>58697393
>>58697394
>>58697410
>>58697420

MPI has that and it's not functional, you retards.

Gosh, /g/ is full of stuck up kids who think they know a lot.
>>
>>58698118
>but Microsoft's CL compiler, regardless of optimization flags, will not produce a bswap instruction. But that's okay, MSVC is shit anyways.
being a windows programmer is suffering

>>58698124
>camelCase
>>
>>58698158
the fuck is MPI
>>>/out/
>>
>>58697480
So let me get this straight: your defence is "no, it's not always slower, sometimes it's the same speed"?

LMAO
>>
File: 12415125.jpg (134KB, 800x800px) Image search: [Google]
12415125.jpg
134KB, 800x800px
>>58698158
>higher order functions
>not functional
>>
>>58698201
/ isn't functional just because it's "a pure function" (not even true since division by zero will cause an exception), dipshit
>>
>>58698192
>I don't know stuff
No surprise there.

>>58698201
I was using those concepts in parallel computing using purely imperative languages when you were still wearing diapers, kid!
>>
File: 192847928375.png (660KB, 877x721px) Image search: [Google]
192847928375.png
660KB, 877x721px
>>58698233
>i was using these functional concepts in purely imperative languages

i bet you think C is a purely imperative language
>>
File: 1462722527275.png (9KB, 250x261px) Image search: [Google]
1462722527275.png
9KB, 250x261px
I'd like to learn how to write GUI applications with Python and finally make a useful opensource app. I've googled a bunch of resources and it seems that the best way to do is is to learn GTK+.

Does anyone here actually make GUI Linux applications with Python? What do you use? How did you learn GTK+?

I'm wondering if there's any good resources to actually learn how to use GTK+ with Python... since I've come across a ton of man pages and API reference pages but none of them were beginner friendly.

Thanks!
>>
>>58698201

So you're trying to appropriate concepts (the only two useful concepts functional languages implement, mind you) that weren't invented by you just because you invented a name for it?

Nice, functional programmers confirmed for leeches and functional paradigm confirmed for having contributed nothing to the field but funny names and esoteric languages.
>>
>>58698247

Thus far I haven't seen you post a single argument, only pictures of vietnamese cartoons with snide remarks and logical fallacies - usually strawmen.

You are a troll and you're getting ignored from now on.
>>
>>58698256
>The lambda calculus was introduced by mathematician Alonzo Church in the 1930s

What did history mean by this?
>>
>>58698252
>Python
>GTK
fucking why anon
>>
>>58698252
>Not using based Qt
Why
>>
>>58697569
>From a programming standpoint, what key concepts should I know if I wanted to make my own blockchain-related software?

You could try building some ethereum shit. You can write code that runs on their blockchain. It'll run very very slowly but still, the code runs in/on the fucking blockchain.
>>
>>58698287
>lambda calculus
>not an academic meme with no real-world use
>>
>>58698307
The turing machine didn't have functions
>>
>>58698192

https://en.wikipedia.org/wiki/Message_Passing_Interface

Seriously, if you don't know MPI and OpenMP, you're a programming toddler.
>>
Anyone know how I can get MIDI notes that were played *as* they're playing in Java? I've tried using a sequencer with listeners, but I'm not getting the results I want.
Followed something similar to this
http://stackoverflow.com/questions/27987400/how-to-get-note-on-off-messages-from-a-midi-sequence
>inb4 stack overflow copying pajeet
Well fuck nigga, I don't know shit about MIDI and I ain't gonna read some outdated book on how Java processes MIDI.
>>
File: clint.gif (858KB, 240x228px) Image search: [Google]
clint.gif
858KB, 240x228px
>>58698302
>sepples
>>
>>58698158
>>58698331
lisp is older than C
>>
>>58698247

But it is, anon.
>>
>>58698307
That would be a terrible fucking point, if it weren't for the fact that it has nothing whatsoever to do with what you replied to, and wasn't just a complete diversion from your obvious failure to admit that you're using functional concepts. It's just nil.
>>
>>58698359
Don't feed the troll!
>>
>>58698353
The original LISP wasn't a functional programming language, kiddo. It was much closer to C or other imperative languages than to """"lisps"""" of today
>>
>>58698353
Yes, and that is relevant because...?
>>
>>58698389
>closer to C
You mean C was closer to it
>>
>>58698290
>>58698302
GTK seems to be the most popular and few python programs that I use daily use it. I'd like to learn it so I can eventually contribute to software I use daily.

I don't want to discuss my choice of a GUI toolkit.

I want to learn GTK+.
>>
>>58698396
>>58698392
Whatever, I just mean that the distance between C and the original LISP is smaller than between LISP and modern lisp-likes

This means that map, reduce, filter, etc. all originated in an imperative language.
>>
>>58698371
Map, reduce and filter aren't functional programming concepts. They're distributed programming concepts. Functional fags borrowed from us and formalized the theoretical background, but that's it. You just made up names for things we were already doing. You're just showing everyone how ignorant you are.
>>
>>58698184

Given that I have to use Visual Studio to do driver development for my research, I whole heartedly agree.
>>
>>58698442

DELTE THIS
>>
>>58698442
I could continue arguing with you but how's this

https://www.cs.cmu.edu/~crary/819-f09/Backus78.pdf
>>
>>58698399
then google it, retard. I found exactly what you're looking for by doing a three keyword google search
>>
>>58697741
>it isn't low level like that

You can use HDMI-CEC to turn the volume of your TV/monitor/aux device up and down, power stuff on and off etc. It could be handy if you decide to use a phone for remote control.
>>
>>58698535
I'll look into it. I assumed HDMI-CEC was abstracted away enough and was handled by the drivers directly, but that sounds pretty cool and useful.
>>
>>58698442
>t. distributed shitsems pajeet dumbfuck
>>
>>58698442
>>58698460
in fact i will continue arguing

all three have long histories in mathematics, never mindt he obvious intution filter has in day to day life, and are absolutely not 'distributed programming' concepts, an utterly absurd and ridiculous proposition

in programming specifically, all 3 are higher order functions, which is a functional concept, like it or not, going back to the lambda calculus, the original and definitive functional programming language

as it happens, you can fold a list using a non-associative operator, like (/)

foldl (/) 1 [1..10] = 2.7557e-7 = (((1 / 2) / 3) / 4) ... / 10

You can't parallelise this operation.
It can't be calculated distributively.

(a / b) / c
does not equal
a / (b / c)

so it turns out, that one of these functions, reduce, unless you are using an associative operation, is completely useless for distributed programming

what an incredible distributive concept!

mappings and subsets have obviously existed for hundreds of years


but sure, those practical engineers deep in electronics actually invented everything! they wuz inventors n shit, and the nasty mean academics stole everything!

>dennis ritchie (C) wrote a phd thesis
>>
>>58698626
>which is a functional concept
in programming, that is

obviously mathematics has higher order functions too, like differentiation, and FP gets everything from mathematics (in a sense it is a part of mathematics)
>>
>>58698302
Because everything Qt is a bloated buggy mess.
>>
>>58698626
Not sure why you're boþering, he's obviously got a stick up his ass about functional programming
>>
Functional programming isn't real
>>
>>58698399
>I want to learn GTK+.
GTK is written in C.

https://www.amazon.com/Foundations-Development-Experts-Voice-Source/dp/1590597931/ref=pd_sbs_14_img_0/155-5449496-3898461?_encoding=UTF8&psc=1&refRID=AHG9N4BP6CVCM0EFQHE6
>>
>>58698691
Real numbers aren't real
>>
File: glade-main-page.png (196KB, 1183x770px) Image search: [Google]
glade-main-page.png
196KB, 1183x770px
>>58698252
Try fucking around with glade. Looks like a nice interface for building GTK based GUI's.
>>
>>58697991
For starters, quit python spacing.
>>
>>58698681
a lot of people do
>>
>>58698704
how can anything be real if our eyes aren't
>>
File: 1465894934780.png (156KB, 549x349px) Image search: [Google]
1465894934780.png
156KB, 549x349px
>>58698704
>>
>>58698733
Most of þem are doomed, þere are more important þings for you to spend your time on.
>>
>>58698702
Thanks! I'll download that book but the age and bad reviews are discouraging :(

>>58698710
Thanks Already installed it However, before I start using it a lot, I want to learn how to do things without it.
>>
>>58698704
>>58698749
absolute WILDman! love that guy. great teacher too.
>>
>>58698799
you're hopeless
>>
>>58698844
explain
>>
>>58697574
>>58697199
Mmmm, Ada
>>
Is VS a Botnet?
Serious question.
>>
>>58698862
if your OS supports VS, then you're already using a botnet
>>
>>58698862
I don't use it, but I do use the build tools and vs code. In those you can disable the telemetry in the settings and/or using your firewall. However, if you're worried about it being a botnet then, you shouldn't be using windows at all.
>>
File: 1396449172148.gif (1024KB, 500x354px) Image search: [Google]
1396449172148.gif
1024KB, 500x354px
>>58698753
Oh shit, I have not seen thorns in a long long time. I thought modern type writers did away with them for good. We had to use a fucking y for our thorns, fucking typewriters didn't have thorns. Eventually had to stop using the y's and just used th.

Guess that's what we get for using equipment manufactured in another region.

Not that I'm immortal or anything...
>>
>>58698850
i'm shitposting. don't worry about it
>>
File: 1481100507497.jpg (131KB, 591x800px) Image search: [Google]
1481100507497.jpg
131KB, 591x800px
>>58698888
nice digits lain
>>
File: IMG_0027.jpg (938KB, 3387x4000px) Image search: [Google]
IMG_0027.jpg
938KB, 3387x4000px
Do you take notes by hand? Why not?

>implying I could just google that shit.
Yes, but sometimes it is satisfying to work out something yourself, you know?
>>
>>58698888
>>58698900
have any of you sexualized the lain?
>>58698904
I use a dry-erase board for everything. I've got one in every room but my bathroom
>>
>>58698799
>bad reviews are discouraging :(
There will always be bad opinions, it's what makes us humans.

I don't know a better book than that, if you do please suggest
>>
>>58698888
>Not that I'm immortal or anything...
N-nor am I...
>>
File: 1471871812556.jpg (993KB, 1182x1581px) Image search: [Google]
1471871812556.jpg
993KB, 1182x1581px
>>58698862
Yes. They tried to slip it in but got caught thanks to autists.

I don't use that alpha botnet garbage any longer.
>>
File: 1463597681875.gif (344KB, 500x380px) Image search: [Google]
1463597681875.gif
344KB, 500x380px
>>58698917
>have any of you sexualized the lain?
Who the fuck would do that?
>>
>>58698904
where are you from, mohammed?
>>
>>58698904
>Do you take notes by hand? Why not?
Of course, I'm used to it
>>
>>58698945
there's some sick fucks out there anon, like ShindoL drawing lewd Yotsuba
>>
>wildbergposting on /g/
as if you brainlet CS majors truly understand him
>>
>>58698981
i don't even have a CS major
>>
>>58698981
I am a physics major
>>
>>58698933
I'll take the NSA's entire girth before I touch debian ever again
>>
Goddamnit. How the fuck do Abstract_State clauses work in Ada SPARK 2014?
>>
>>58699010
Try Fedora
>>
>>58698399
So you want to use Python or C?
>>
>>58699025
the shit one for some reason
>>
File: cache.php.jpg (34KB, 800x533px) Image search: [Google]
cache.php.jpg
34KB, 800x533px
Am I cute, /g/?
>>
>>58699027
I tried GTK with C. It was terrible. Then, I tried it with Python. It was great. You'd have to be a masochist or something.
>>
File: 1457235326771.jpg (20KB, 389x429px) Image search: [Google]
1457235326771.jpg
20KB, 389x429px
>>58699049
sexy too
>>
>>58699049
stand still while i tread on you
>>
File: nice.png (62KB, 732x438px) Image search: [Google]
nice.png
62KB, 732x438px
>>58699049
Yes.
We had it yesterday.
Pic related shit is very comfy with python
>>
File: uhoh.gif (479KB, 499x386px) Image search: [Google]
uhoh.gif
479KB, 499x386px
>>58698922
I actually thought really hard about not making that comment. It's actually really stupid but I stopped and considered not saying it. I'm not immortal but I had to stop and try to find evidence that I'm not. I think I'm losing my mind a little bit.
>>
>>58699103
Is there any proof of your birth? And I don't mean a birth certificate, I mean something like a video recording.
>>
>>58699062
that's gnome developers are retarded
>>
File: BasicTV_console.webm (2MB, 1920x1080px) Image search: [Google]
BasicTV_console.webm
2MB, 1920x1080px
Got the console to work
>>
>>58699206
>He doesn't compile a warning free code
>>
File: 1451082264778.png (115KB, 424x420px) Image search: [Google]
1451082264778.png
115KB, 424x420px
>>58699206
cool
>>
>>58699012
The guys in the Google group will probably know.
>>
>>58698252
I made an internet radio player with GTK and Python. Just make sure to use Python 3 and PyGObject.
>>
>>58699234
that's a cute yotsuba
>>
Anyone else think Java is really cute?
>>
>>58699277
you should try C#
>>
>>58699277
no
>>
>>58699260
yotsuba is always super cute!
>>58699277
java is an indian hamplanet whore, so no. try D
>>
File: blank.jpg (10KB, 480x360px) Image search: [Google]
blank.jpg
10KB, 480x360px
>>58699124
No. But a few years ago I did find a picture of me that was taken 30 before I was born. Same face, same hair, same shirt, standing in the same spot of the same building.

It wasn't actually a picture of me, just a picture of the person I replaced apparently. Taken when they were around the same age that I was when I found the picture. Who was closely related to me and shared basically all my DNA.

Was a bit of a mind fuck. People couldn't tell it wasn't me until they look at the background with all the old stuff in it.
>>
>>58699206
So is basicTV like mythTV... or is it like Plex... what the fuck it is exactly?
>>
>>58699234
There needs to be more Yotsuba posting on every board.
>>
File: netsurf.png (41KB, 959x998px) Image search: [Google]
netsurf.png
41KB, 959x998px
I implemented Document::cookie's setter in netsurf.
>>
>>58699206
>>58699379
BasicTV is a decentralized, anonymous, Internet television system. Like if BitTorrent, Tor, Bitcoin, and the good parts of cable TV all had a baby. You can check out the GitHub at github.com/Dako300/BasicTV
>>
>>58699395
diggity dank
>>
>>58699206
>That compile time
Sasuga, C++.
>>
>>58699458
In fairness, the Makefile is terrible
>>
>>58699473
Yes, I was criticising it a few threads ago.
>>
>>58699489
haven't gotten around to properly learning GNU Make yet...
>>
>>58699410
Oh I checked it out. But where does it get channels from? Does it scrape the internet for streams? Is a working P2P system implemented and working?
>>
>>58699473
>>58699491
link it man, I want to be horrified
>>
>>58699498
>But where does it get channels from
BasicTV nodes "broadcast" information out to the network themselves. The actual data is stored on your computer until somebody downloads it. People who download the data can forward that to other people (cryptographically secure), similar to torrenting.

>Is a working P2P system implemented and working?
Not yet. I need to implement TCP hole punching, facilitating requests for data, and some bulk data collection for statistics before I can roll that out. I'd give it at least a week.
>>
>>58699499
https://github.com/Dako300/BasicTV/blob/master/Makefile
>>
>>58699536
it's horrible
>>
>>58699536
It's perfect
>>
File: Devil.png (149KB, 614x474px) Image search: [Google]
Devil.png
149KB, 614x474px
>>58699530
So nowhere...

Can it at least playback local shit in its current state?
>>
>>58699557
>>58699579
just werks

>>58699581
yeah, it can playback audio, but you need to uncomment a function. I'm working on the console right now, so tomorrow there should be a not stupid way of loading stuff.

It doesn't have video yet just because I haven't configured VP9 compression, and uncompressed audio won't completely kill my computer. However it does work (>>58699410 is an image it generated, the XOR of the X and Y coordinates clipped to 8-bits)
>>
>>58699096
>has to use a library
LMAO
>>
File: 1477237201695.png (1MB, 1006x963px) Image search: [Google]
1477237201695.png
1MB, 1006x963px
>>58699242
>Python 3 and PyGObject
thanks anon!
>>
I got memed into learning Python as my first language. I like it so far and I have just made a calculator (yeah some really professional shit here). It works and considering that I've started learning 6 hours ago I'm pretty proud of myself.


I have one problem though:

If the user inputs letters instead of numbers the program crashes (duh) so I used
variable.isdigit()

to display an error message and restart the program if the user inputs anything else than numbers. Basically, if it's False for one of the user inputs,
the error is gonna show up. The problem is, that it will also come out False if the user inputs a Float because of the .
How do I counter that?
>>
File: kal.jpg (207KB, 600x697px) Image search: [Google]
kal.jpg
207KB, 600x697px
>>58699606
>VP9 compression

Don't use VP9. Use something with tons of hardware decoding support, like h264.

You can add VP9 and other codecs later.
>>
>>58699661
>I got memed into learning Python as my first language
stop
learn a proper language first
python will teach you wrong and you'll be wrong for life
>>
>>58699661
How'd you get memed into Python? I never hear any praise for it around here.
>>
>>58699661
don't listen to
>>58699669
Python is perfectly valid as your fist language. Once you know your way around the basic terminology of programming you can go ahead and learn C or something without any problem. It's gonna be a little different of course but if you're not an idiot you're gonna be fine.
>>
File: crypts-folders.webm (607KB, 960x482px) Image search: [Google]
crypts-folders.webm
607KB, 960x482px
Working on this crypt shit
>>
>>58699536
>>58699491
>>58699473
>>58699606
I tried making a new Makefile for your program, and got it to down to about 3 seconds from 10 (using -j8), but your whole "*_unified.cpp" things really slows things down.
Deleting those files and trying to compile it "properly" causes all sorts of errors, with shit like std::string not being declared.
Your program really is structured like a house of cards.

Also, why the hell are all of your system headers using #include "whatever" instead of #include <whatever>?
>>
>>58699698
>Python is perfectly valid as your fist language. Once you know your way around the basic terminology of programming you can go ahead and learn C or something without any problem. It's gonna be a little different of course but if you're not an idiot you're gonna be fine.
No it isn't.

Perhaps the most damning thing you can say about this is that people who start with Python often end up thinking Python is a good language for the rest of their lives.

And it isn't a good language, and everyone knows that.
>>
>>58699703
How'd you pick the name?
>>
>>58699711
It's not about Python being a good language or not. It's got a simple syntax and allows beginners to focus on the basic concepts of programming. These never change. It's all about logic after all.
>>
>>58699739
No, they end up thinking it's a good langauge FOREVER, and that's the basis of their programming.
>>
>>58699739
>>58699747
so they'll end up saying other stuff doesn't make a big difference because it's not in Python
or it's not good because it's not in Python
or it's not necessary because it's not in Python
>>
>>58699704
>structured like a house of cards
A lot of needed header files are included in different files, and I didn't care to fix it until something broke. Can you post the Makefile?

>Also, why the hell are all of your system headers using #include "whatever" instead of #include <whatever>?
I didn't think it would make a difference, and out of habit.
>>
>>58699762
>other stuff doesn't make a big difference because it's not in Python
who ever said that? who ever said any of these? that's idiot's talk right there. no sane programmer, even if he/she started out on python, would ever say that. you've clearly only talked to imbeciles in that matter
>>
>>58699793
>no sane programmer, who started out with Python
the empty set
>>
I'm learning mean stack. Any suggestions?

> inb4: JS is a meme
>>
File: crypts-ccl.webm (1MB, 960x482px) Image search: [Google]
crypts-ccl.webm
1MB, 960x482px
>>58699722
It was just picked, don't know what to tell you.
>>
>>58699793
nice no true scotsman
>>
File: 7445.jpg (130KB, 600x697px) Image search: [Google]
7445.jpg
130KB, 600x697px
>>58699703
That looks amazing. I have no idea what it is or what it does, but it looks amazing.
>>
>>58699826
not him but thanks
>>
>>58699820
What's it written in?
>>
File: crypts-1.webm (555KB, 960x482px) Image search: [Google]
crypts-1.webm
555KB, 960x482px
>>58699826
It's a lightweight operating system based on peach resort.

>>58699829
C/C++
>>
>>58699767
CXXFLAGS += -Wall -Wextra -std=c++11 -Wno-unused-function
LDLIBS = -lcurl -lSDL2_net -lSDL2_mixer -lSDL2 -lz -lcrypto -lopus
CPPFLAGS = -DDEBUG

SRC = $(wildcard *.cpp) $(wildcard */*.cpp)

all: basictv

basictv: $(SRC:.cpp=.o)
$(CXX) $^ -o $@ $(LDLIBS)

clean:
$(RM) $(SRC:.cpp=.o) basictv

If you want it to work with your whole "unified" things, change $(wildcard */*.cpp) to $(wildcard */*_unified.cpp).
It's currently relying on one of GNU make's inbuilt rules (.o from .cpp), although you could explicitly write it out if you want to.

I'm trying to get the nicer and more "proper" makefile to work, but I'm going to have to modify some of your source files.

>I didn't think it would make a difference, and out of habit.
You really shouldn't do that, even if it appears to work. It conveys to other programmers that it's a system header you're dealing with, and prevents any silly collisions if you name a local file the same as a system header.
>>
>>58699853
I got it from here. Would changes in header files work with this?
>>
File: shameful usa.png (427KB, 589x617px) Image search: [Google]
shameful usa.png
427KB, 589x617px
>>
>>58699870
No, changes in the header files won't cause a recompilation as it is.
I'll set up something which will fix that later.
I'll send a pull request on github when I'm done.
>>
>>58699940
okay, thanks
>>
File: metaru.jpg (500KB, 1080x1080px) Image search: [Google]
metaru.jpg
500KB, 1080x1080px
>>58699828
not him but you're welcome
>>
D E A D T H R E A D
>>
>>58700164
hey so about those programs who's a programmer here? i love programming programs right guys
>>
lets bully rust

the :: operator is bad
>>
File: bully akarin.webm (1MB, 900x506px) Image search: [Google]
bully akarin.webm
1MB, 900x506px
>>58700240
>rust
more like bust!
>>
File: 1484440738442.gif (443KB, 400x480px) Image search: [Google]
1484440738442.gif
443KB, 400x480px
>>58700217
Oh yeah, I got a programming book sitting here next to me with a picture of a mouse on the front of it. Judging by the title of the book that mouse is in for a rough time.
>>
>>58700245
Too far
>>
>>58700240
>dude just
@unsafe
lmao
>>
>>58700164
It was in the news. That some guy had managed to invent a bed that was so comfy, that when you went to sleep on it, you wouldn't wake up unless you got woke up.

So until your alarm goes off, you could be out the count for days... week... months...

But you'll never see that bed in stores
>>
>>58699912
Trump was more than 60 years too late.
>>
File: 845c26795e1755fa63fd07f54f990d0e.jpg (178KB, 850x1202px) Image search: [Google]
845c26795e1755fa63fd07f54f990d0e.jpg
178KB, 850x1202px
>>58700372
Anon I don't think that's true
>>
>>58700240
Define "bad".
>>
>>58700412
Rust
>>
>>58700389
You know why you'll never see that bed in stores. The guy that invented it. Doesn't have an alarm.
>>
>>58700424
That's kinda scary
>>
>>58700424
F
>>
>>58700372
>>58700424

>comfypasta
>>
>>58700439
Poor bastard doesn't even remember he invented it. He's probably stuck in a dream about some Nipponese basket weaving forum.

https://youtu.be/iaHr444rzf4
>>
i'm learning python right now

how do i import two txt files, and then make it into a list with remove newline?
>>
>>58700575
Good question
>>
Could someone explain this regex segment to me? What is the first ? doing?

(?:.*/)?


It's part of this larger regex for pulling Imgur IDs out of a URL

^(?:.*/)?([A-Za-z0-9]{5})(?:[/?#].*)?$
>>
>>58700699
(?: )
is an anonymous capture group
>>
File: 1440724151538.jpg (32KB, 500x500px) Image search: [Google]
1440724151538.jpg
32KB, 500x500px
>>58700389
pls be a girl

>>58700424
pic related

>>58700575
I think you have to install solus, anon
>>
newfag here,

How do i post code here without it looking fucked up.
>>
>>58700699
disables capture for that subexpression
>>
>>58700719

Oh ok thanks
>>
>>58700743
Start a line with four spaces
>>
hey everyone

great news!

GTP is quitting programming

starting today he will no longer be posting in /dpt/
>>
>>58697071
Alright guys I have been working on this all fucking day... now I just feel stupid and pissed off...

I am trying to approximate a square root, given an initial number (a) and a starting guess (g).
The guess is stored and the process of g+1 = g + (g + a/g) / 2 is repeated until the difference of the previous guess and new guess are less than .00005

Is there anyone out there that can help me think this through? I will provide clarification and code I have been messing around with if needed.

Thanks
>>
>>58699291
Trying to port my C# application over to java on Android and it's a fucking nightmare.
>>
>>58700786
function approx_sqrt (guess, remaining_approx) {
if (remaining_approx == 0) {
return guess;
}
else {
var next_guess = ... ;
return approx_sqrt(next_guess, remaining_approx - 1);
}
}
>>
>>58700786
>I am trying to approximate a square root
> a starting guess

Why don't you just calculate the square root? What's up with the guessing game?
>>
>>58700845
I want to see how many iterations it takes, in a certain threshold.
>>
>>58700786
This is Newton's method from early on in SICP, read that if you want a walkthrough.

#lang racket

(define (square x) (* x x))

(define (improve guess x)
(average guess (/ x guess)))

(define (average x y)
(/ (+ x y) 2))

(define (sqrt-iter guess x)
(if (good-enough? guess x)
guess
(sqrt-iter (improve guess x) x)))

(define (good-enough? guess x)
(< (abs (- (improve guess x) guess))
(* guess .001)))
>>
Trying to generate three colors for a textbox background, is there a better method for obtaining a new random seed each time in Java?

Random rand1 = new Random(System.currentTimeMillis());
Random rand2 = new Random(System.nanoTime());
Random rand3 = new Random();
>>
>>58700915
>not using NIST random numbers
Fucking CIA nigger.
>>
>>58700942

ALL RANDOM NUMBERS ARE COMPROMISED
>>
>>58700915
You usually don't want to re-seed that often. Usually a single seed and Random instance is enough.

Also, by that method, you risk having duplicate seeds for your multiple instances which is bad.
>>
>>58700915

You need to require users to generate their own random numbers using diceware

Anything else is insecure
>>
What are some decent C++ IDEs, I use VS but it is apparently trash. Thanks in advance!
>>
>>58700951
Your favorite text editor and make.
>>
>>58700951
unregistered sublime text 2
>>
>>58700950
>Anything else is insecure

Grab your self a CCD sensor out of a cheap webcam, crack open a smoke detector and grab the radioactive bit. Tap to two pieces together. Plug in the CCD sensor. BOOM random data in the form of randomly lighting up pixels.
>>
New thread:
>>58700979
>>58700979
>>58700979
>>
File: the man from nowhere.webm (3MB, 1728x720px) Image search: [Google]
the man from nowhere.webm
3MB, 1728x720px
>>58700985
Thank you for using a non-anime image
>>
>>58700985
You should be ashamed for not using an anime image`
>>
>>58699947
Response in new thread: >>58701108
Thread posts: 313
Thread images: 49


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