[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: 315
Thread images: 28

File: ferris32.jpg (2MB, 1658x1239px) Image search: [Google]
ferris32.jpg
2MB, 1658x1239px
old thread: >>61045958

What are you working on?

How does it feel knowing that software engineering, in all it's forms, is the most unrewarding, soulsucking "white collar" profession imaginable?
If you, as a career programmer, haven't retired or at least reached management by age 35, you get replaced with young blood and become effectively unemployable.
>>
First for Scheme
>>
nth for anyone who programs for an enterprise is a melon
>>
>>61047814
>Circular buffers are preferred when maximum size is known.
I don't see any reason for this to be the case.
>>
>>61049799
What the fuck is that thing in the OP image
>>
>tfw Scala is getting B T F O
What are some more language talks that go over all the shit?
Beside sepples, ive seen too many of those.
>>
>>61049799
The /dpt/ OP is not your personal shitposting space. Follow the fucking format.
Also, don't post your lazy "draw a girl, call it a boy" degenerate shit.
>>
>>61049799
software engineering really is boring as watching grass grow while having to repeatedly hit yourself in the toenail. couldn't fathom getting a degree in it
>>
>>61049893
https://mollyrocket.com/casey/stream_0019.html
Not a language, but the whole design up front methodology.
>>
File: ipldevice.png (37KB, 655x634px) Image search: [Google]
ipldevice.png
37KB, 655x634px
>>61049799
I don't usually visit this board so I'm sorry if this is not the appropriate place to ask this.....
But basically I have this Remington IPL device and they limit the flashes to 1500 but I used Bus Pirate to reset the flash count in kind of a ghetto way cause the they use a DS2431 chip inside the flash tube cartridge and it's easily accessible.

BUT I'd like to increase the juice and solder on my very own quartz flash tube. The patents say the DS2431 chip contains information like current # of flashes, total flashes, manufacturing date, and initial energy of the lamp
The patents say the device automatically adapts and adjusts voltages to whatever flash tube you stick in there as long as you get the settings roughly close enough to cause it to actually spark and flash.

pic related is what bus pirate spits out and I have no idea where to go from here. I've only got like limited programming experience in C#, VB, and I guess matlab if that counts...
>>
>>61049799
Game engine as friend bugged me too many times. He's getting it in idris so he can shut it
>>
>>61050032
Waiting until the day I can call Haskell from Idris.
Or until Idris has a proper package manager and build system.
>>
>>61050063
Why would you want to call POO from a pure language?
>>
>>61050079
Haskell is currently better than Idris, ALL things considered.
>>
Business idea: make a dependently typed language that's efficient but not an utter mess like ATS is.
>>
File: scala.png (55KB, 762x201px) Image search: [Google]
scala.png
55KB, 762x201px
>>61049893
For anyone interested, the relevant talks are

https://www.youtube.com/watch?v=4jh94gowim0
https://www.youtube.com/watch?v=uiJycy6dFSQ
https://www.youtube.com/watch?v=TS1lpKBMkgg
>>
>>61050097
>ALL
Except dependent types :^)
>>
>>61050063
> package manager
It will in time, if not by a year... I'll write one for it relying on git builds at first. A bit like cargo from rust
> call haskell
you can already, it's just awkward

To be honest, idris feels more like a lisp than a haskell based language.

>>61050097
only the support and speed, idris will be faster than haskell with a better type system once that gets a maintainer / dev working on it more than edw.

>>61050114
idris already exists, it's cleaner than Agda and not Coq but borrows from it

>>61049893
scala will be killed by either idris or another dependently typed language in the near future despite it adding dependent types ontop of scalaz and cats
>>
>>61050145
Idris is far from efficient.
>>
>>61050114
Scala!
>>
>>61050140
I didn't say Haskell was better than Idris in EVERY way, I said it was better ALL things considered.
>>
I sure am jelly of you folks who get to use Haskell and Idris in production at work
>>
>>61050158
>its not a good feature because my language doesnt have it
(Y O U)
>>
>>61050145
Edwin, is that you?
>>
>Scala has 556 explicit casts in the std
I cannot fathom the people who use this language.
>>
It's 2017, why is there still no good programming language?
>>
Can your programming language do this?

def f():
return f
>>
I'm not convinced that Scala's "path dependent" types are any more powerful than GADTs.
>>
>>61050170
Do you have trouble speaking English?

I am not saying Haskell is better in all things, I am saying if you take ALL things and put them together, Haskell is better.
This is already implicitly stating that there are things in which Idris are better.
By capitalising all, I am implying that there are many things in which Idris is significantly better, but that they are edged out.
>>
If i have a C# webscraper that checks a site every 5-10mins and stores data in a sql server database, how do i implement that it only takes data that's new on the site from the last time it checked?
>>
>>61050219
Haskell has better lib support, thats it.
Mainly due to it being the meme language before rust and everybody blindly jumping on it.
Haskell is and will always be the sepples of the FP community.
Its not popular from merit, just memes.
>>
>Rust and D don't even have ISO standard
LOL
Even fucking ecmascript has ISO standard.
>>
>>61050151
not really, look at how many more places we can now oprtimize. Idris is slow as it doesn't optimize let and where bindings currently and on top of that haskell has had a head start by quite a number of years. Idris' first stable was this year, remember that.


I also like idris pretty printing it's ast in lisp notation in the repl. It's much nicer than explicitly running the code.

>>61050184
Would be interesting if I was now wouldn't it?

>>61050219
It's a rough stone I agree but give it time. Take into account that our current goal is research which means we aren't aiming to compete even if the start is similar.

>>61050245
Haskell layed out the ground for pure FP languages, give it credit for that at least.
>>
>>61050256
ISO standards are a placebo
>>
>>61050261
Idris is garbage collected. I don't see that going away.
>>
>>61050256
>but muh language has an ISO standard!
What the fuck benefit is that?
>>
>>61050256
Rust and D have modules.
>>
>>61050267
It's a fisher price certification, another example is "the unix cert"
>>
61050256
>ISO standard.
hello pajeet, i see youre back again.
>>
>>61049986
Can anyone at least tell me a book or site that can teach me how to figure out how to kind of reverse engineer this thing ;_;
I'd be really grateful
>>
>>61050266
Uniqueness types can lead to eliminating the garbage collector. We have them now as an extension but need to reasearch them further to ensure they will hold in all cases. The primary goal for them is performance over ease of writing.
>>
>>61050286
>muh only one canonical implementation that keeps constantly changing
Rust and D are as bad as PHP.
>>
>>61050261
>Would be interesting if I was now wouldn't it?
Edwin, get off 4chan and finish Idris
>>
>>61050231
Ok, any ideas how to implement it, i know there's not a one-for-all solution
>>
>>61050261
>Haskell layed out the ground for pure FP languages
Haskell itself isn't pure though.
>>
61050327
phew, MS and co must sure be scared to have your script be this aggressive.
>>
>>61050261
sheep shaggers out

rebuild the dyke
>>
>>61050327
Fuck off, dumb fucking nigger
>>
>>61050145
>idris feels more like a lisp
What do you mean?
>haskell based language
It's not really Haskell based though.
>>
>>61050369
LOL rustfag is mad because his shitty language has no future.
>>
>>61050398
It's got more future than you
>>
>>61050348
It mostly is if you forget about IO and STRef cheating.

>>61050382
> haskell
Haskell syntax based (Well ML)

> lisp
It allows for almost the exact same style of programming.
>>
>>61050427
kek
>>
>>61050436
>STRef cheating
Stop pretending to be Edwin.
>>
>>61050436
>It mostly is if you forget about IO and STRef cheating
There are ""pure"" ""functions"" which don't respect equality of arguments, such as seq.
>>
>>61050331
You really want that package manager. Well, I'll see if I can start it earlier.
>>
>>61050436
>It allows for almost the exact same style of programming.
Do you mean the REPL interaction? I haven't used Lisp that much.
>>
>>61050448
I'm not pretending

>>61050476
which aren't a part of idris as we don't need it nor is it correct

>>61050494
The language as a whole, types are flexible at last.
>>
>>61050522
Does Idris have HVectors?
>>
>>61050549
In the standard library as HVect.
>>
>>61050567
It's a simple yes/no question
>>
>>61050587
Yes
>>
Edwin, whens the next idris version scheduled to release?
Any plans for a free-ebook to keep up with it like some langs have?
>>
>If you, as a career programmer, haven't retired or at least reached management by age 35, you get replaced with young blood and become effectively unemployable.

If I wasn't planning on becoming a professor, I'd probably want to be a programmer from age 25 to 65. Why can't a guy do the same job for the entirety of his career?
>>
File: 1491238980736.png (56KB, 281x218px) Image search: [Google]
1491238980736.png
56KB, 281x218px
>>61050522
>which aren't a part of idris as we don't need it nor is it correct
Good.
>>
>>61050660
Ageism is apparently a problem in the valley

It's why I'm looking for programming jobs in the country's interior. That and lower cost of living and shorter commute
>>
>>61050213
Because humans make them. We must develop an AI that can invent its own programming language.
>>
>>61050651
There's already a free "ebook", a pdf version of the documentation. It needs to be rewritten but that's not a priority for now. For now I suggest getting a copy of Type Driven Development as it covers idris in the SICP style of teaching you with idris rather than teaching you just idris.

Note: I'm not a scot
>>
>>61050713
>Note: I'm not a scot
Conor?
>>
>>61050713
Already bought your book desu.
so no ETA on 1.1 or whatever the next iteration is?
If not, whats the biggest feature/change youre working on right now?
>>
idea guy here

distributed blockchain-based 4chan
>>
>>61049820
Slow meme.
>>
>>61050749
How would it be moderated to stop spam? Who would willingly download a blockchain filled with CP?
>>
>>61050660
People over 35 don't like to work long hours for shit pay, they also command lots of experience, which is expensive.
Companies would rather just hire inexperienced CS grads than deal with you.
>>
>>61049799
Only himegoto allowed in OP.
>>
Reminder that if you think types are for preventing errors, you're wrong

https://www.youtube.com/watch?v=3U3lV5VPmOU
>>
>>61050818
Reminder that if you think types are "for" something, you're wrong
>>
>>61050818
I like types much more as forcibly accurate comments that also help the compiler optimize aggressively.
>>
>>61050818
>muh pure LC
go away
>>
>>61050845
>>61050828
>>>/g/wdg
>>
File: 1362960884713.png (28KB, 499x322px) Image search: [Google]
1362960884713.png
28KB, 499x322px
>>61050795
>Who would willingly download a blockchain filled with CP?

Is that a trick question?
>>
>>61050845
>muh
Go away.
>>>/v/
>>
>>61050735
I'm sadly not part of the writing process so I can't tell. Will most likely be published by manning.com so head over there when announced on irc.
>>
>>61050876
Why would I be using w*g?
>>61050828
>>
>>61050887
I meant for the language itself, not the book.
>>
>>61050795
The FBI
>>
>>61049799
nice blog
>>
>>61049986
There's no one book or website anyone can send you too. If you want to do this, you'll probably need to get some sort of electronics engineering degree and then spend a few years working.

Reverse engineering isn't easy, it takes knowledge of embedded systems, protocols and software. You posted nothing but numbers, that are spat out in some arbitrary order and some arbitrary meaning.

But if you had to start I would capture like 100 more transactions and keep track of total flashes and everything else you mentioned it can do. Then you can look for patterns and maybe intercept the signal. I don't know.
>>
>>61050798
>achieve maximum old
>command so much experience you legit just make better things than a corporation
>sell the things
>they jelly
>>
>>61050904
Stay on irc, quite a few changes are made every day so they'll most likely release when they feel everything is stable.
>>
>>61049885
A Fuka from re zero
>>
How can anybody use Scala when it's this bad?
>>
>>61050032
>game engine
>in a slow meme language with no libraries
ur a dick anon
>>
>>61050918
Well I figured this would be a little easier because it's supposedly no code, only simple text data.
I've tried looking at it as it counts up and it gets all jumbled as it goes higher and higher and is impossible to figure out.
But according to the patent it stores the previous voltage and amps needed to flash the tube and slowly adjusts as the bulb is worn down which is why so much data is changing on the chip.
>>
>>61050967
I think it's a great thing for him to do, the least buggy game engine ever
>>
>>61049799
animefags fuck off pls.
>>
>>61051004
You seem to be new here. All the *chan websites are born out of anime culture.
We apologize that seems to intrinsically trigger your plebbit sensibilities.
>>
>>61050967
Last one was in chicken scheme but he didn't want to learn lisp so... he gets my new favourite toy. The libs are getting there and external ones too with opengl and a parsec equivalent on github (Lightyear).
>>
>>61051013
stop triggering me.
>>
>>61049799
Stupid shit to throw on git in hopes of getting a stupid shit internship to distract me from the stupid shit that is academia.

Yeah that's why I'm going for EE.
>>
>>61051018
>chicken scheme
How is it for making games?
>>
File: 1496044255404.png (1MB, 1520x1080px) Image search: [Google]
1496044255404.png
1MB, 1520x1080px
>>61051025
This is a website oriented towards japanese culture, and is modeled after a popular website in japan. As such, the inclusion of anime-related material is acceptable.
>>
>>61051036
fine.
>>
>>61051035
You will never make any game of any respectable quality if you write it from scratch nowadays.
>>
>>61051036
Laispe W H E N?
>>
>>61051048
I know, anon. My game tastes are firmly rooted in the 90s and earlier
>>
>>61050919
People have already tried this. It's achievable, but it doesn't work. You see, a bunch of disgruntled old men--aided by the legendary leadership of one Richard M. Stallman, the fattest, smelliest, ugliest, least employable, most disgruntled old man of all--have, since time immemorial, developed nonprofit utility software under the joint name of "GNU." They've come far and are known the world over, but you'll be pleased to hear they're all still poor and still grumpy. People appreciate their software but have no respect for them or their principles, and corporations still outrank them in every regard.
>>
>>61051099
>corporations
>making nothing but slow spyware
>and charging you for the privilege of using it
>>
>>61051048
I dunno, I could've written Undertale from scratch if I were Toby Fox.
I could've written Cave Story from scratch if I were Pixel.
I could've written OFF from scratch if I were Mortis Ghost.
These all would've been a lot of work, and in all cases the result wouldn't've been very technically impressive, but they're all good games.
>inb4 no they aren't
Fuck you and your tastes.
>>
>>61051128
Please dont reply to Unity/gm kiddies.
>>
Can I make vim shit out a default vimrc file somehow?
>>
>>61051137
He might just be an AAA gamer
>>
>>61050699
But how do we write a suitable AI to invent the perfect programming language if we don't have a perfect language to write it in?
>>
>>61051144
Use VS Code, its everything Vim should be and more.
>>
>>61051178
We do, it's called Lisp
>>
dropin reading material
https://people.freebsd.org/~lstewart/articles/cpumemory.pdf
>>
>>61051116
And yet, as I say, they still far outrank GNU in popularity and compatibility. They also outrank Linux in the same ways, although its origin story is less relevant to the point I'm making here.
I'm not advocating for this being the case. I'm just saying it is. It's amazing what money can buy.
Depressing, isn't it? But it goes to show what a strong hold the system has on us. You can't escape it. Don't even try, because these people have already tried, and they've tried harder than you'll ever try, and they came a long, long way, but at every step of that way, our corporate overlords STILL had a better hand than them card for card. Just live out your life in their hands, and if their fat asses decide you don't get to have a house anymore, then fucking sleep on the sidewalk and eat trash, because that'll be a lot better a life for you than putting up any pathetic attempt to fight them.
>>
>>61051205
>114 PAGES

I'm not gonna read all that shit.
>>
>>61050919
>>61051099
>>61051116
>>61051207
Not programming related.
Try >>>/g/fglt/
>>
>>61051207
>windows
>compatibility
Microsoft goes out of its way to make Windows incompatible with other operating systems
>>
>>61051128
>g*ming
Try >>>/v/
>>
>>61050964
what's bad about it? What did I miss?
>>
>>61051272
Who are you quoting?
>>
>>61051257
>windows
>Microsoft
Not programming related.
Try >>>/g/fglt/
>>
>>61051277
See >>61050122
>>
>>61050919
>>61050967
>>61051116
>>61051128
see >>61051284
>>
>>61050693

>the valley
I don't think there is a reasonable amount of money that you could pay me to live in the state of California. The West coast is the best coast, but only Washington and Oregon.

>>61050964

Need a JVM language to interact with an existing JVM codebase.
Every other JVM language sucks worse.
>>
>>61050122
ayy wtf
>>
>>61051336
west coast? more like worst coast

az and tx > anything on the west coast

although I hear eastern oregon and washington aren't as bad as the other bits
>>
>>61051257
>other operating systems
What? I'm sorry, did a fly just buzz by?
Windows doesn't have to be compatible with other operating systems. It's just compatible. Not with other operating systems. With the masses. Because the masses all use fucking Windows. Or Mac, but not as much.
GNU/Linux goes out of its way to be compatible with everything. But it's still less compatible with everything than Windows is, because everyone develops for Windows. That's where the money's at, and money makes the world go 'round. The only "people" who use Linux--aside from a small handful of ordinary people who are technically adept and just want to do something small to fight back--are, ironically, corporations, because if they can configure their back-end not to need much maintenance, it's cheaper than buying a bajillion Windows licenses. Do they pay their respects? What do you think? Fucking no! They take, they use, they throw away, and MAYBE they make some small effort to make sure no one on the outside ever knows they're doing that with software they're not technically legally allowed to do that with, but no one FUCKING cares, because the law's in on it too, everyone's fucking in on it. No one cares about freedom or human rights. Everyone just wants to cheat and avoid being cheated. That's what life is about now. You have no choice but to accept it.
>>
File: chad1.png (22KB, 128x128px) Image search: [Google]
chad1.png
22KB, 128x128px
who /embedded/
>>
Python is a bad language
>>
File: 3-3.jpg (55KB, 400x300px) Image search: [Google]
3-3.jpg
55KB, 400x300px
>>61051407
I bet you can't say it to my face you little shit
>>
File: boa-closeup2.jpg (45KB, 600x450px) Image search: [Google]
boa-closeup2.jpg
45KB, 600x450px
>>61051432
PYTHON
IS
A
BAD
LANGUAGE
>>
>>61051389

me too
>>
>>61051407
>>61051489
python is a good language that's never been implemented well
>>
File: 14717130.jpg (20KB, 480x480px) Image search: [Google]
14717130.jpg
20KB, 480x480px
>>61051489
>>
File: snake-bite.jpg (28KB, 480x360px) Image search: [Google]
snake-bite.jpg
28KB, 480x360px
>>61051504
>>
>>61051366
Nice try. You might think you've managed to look like an angry freetard, but I'm still not convinced you're anything but a disturbingly self aware Microsoft shill.
>>
>>61051501

Where at? Im at Bell Labs
>>
How do people write freestanding C?
How do they get by without malloc? Do they have to have a giant static byte array or something?
>>
>>61051609
>freestanding C
for what reason
>>
>>61051609
they write their own malloc
>>
>>61051609
If you're doing freestanding, that usually means no memory protection so you just take what you need and make sure nothing ends up overlapping.
>>
>>61051680
I see youre taking a break from, /agdg/.
>>
>>61051035
It's comfortable, you end up just defining your own game DSL with higher level abstractions as you go. Eventually you reach a point where bayesnets are like if statements.
>>
>>61050231
host site as git repo, use git pull to store new data :^)
>>
>>61051622
Curiosity.
I was thinking it would be cool if there were some kind of minimal unhosted software suite. It could have like a text editor (but to avoid the complications of a filesystem you'd save and load using drive addresses instead of filenames -- better remember that shit!), an assembler, and a really bare bones web client that can't do javascript.
>>
>>61051783
>but to avoid the complications of a filesystem you'd save and load using drive addresses instead of filenames
This approach could be improved by having "filenames" so to speak, but just using them to calculate drive addresses by hashing them over the space not occupied by the unhosted software suite itself. If you run into an existing "file," you'll just have to pick a different name -- obviously very suboptimal, but probably wouldn't be the biggest hassle in the world.
>>
>>61051783
>a really bare bones web client that can't do javascript
This destroys your chances of keeping it "minimal." Network protocol standards are too complicated and too heterogeneous.
>>
Yet another "I want to start programming" post
Basically I have basic knowledge of Visual Basic and I want to develop a certain program I've got in mind for Windows.
Which programming language should I start learning as a beginner? I thought about C but there are so many version (C, C++, C# and whatnot) and I'm not sure which one to use
Some suggested Java but I'm not sure I want to make my program with Java.
Any advice would be appreciated
>>
>>61051924

What's the program going to do?
>>
>>61051924
Avid all the C's desu
Try Rust.
>>
>>61051924
C is a distinct language from C++, C#, Objective-C, etc. (although they are all related)
either way, your first language isn't that important. stick with VB if it works for you, try a new language if it doesn't. i will say my progression was pretty much VB => Java, but i dont necessarily think that was very useful to me.
depending on how much you already know VB i would say C# could be the best choice since it uses .NET as well (it's also VERY similar to java).
>>
>>61051975
nv, what do you think of scheme?
>>
>>61051996
like it a lot. it's one of my go-to recommendations for a first language, but for some reason not really in the mood to suggest one language or another today.
ive only used Guile and Racket so far, but both are very nice. haven't found enough of a use for it yet to try working with any of the other schemes
>>
>>61052012
Cool. What about for more experienced programmers? e.g. did a little bit of Haskell or ML in college, worked in Java/C# for a few years

Continuations sound really powerful but I haven't managed to wrap my head around them yet, I think I just need to play with them more
>>
>>61051941
Not a completely clear idea yet, but involves Text-to-Speech as a starting point and then I plan on a few more complicated options not necessarily TTS-related.
>>61051942
Why should I avoid all C languages?
>>61051975
Being close to VB and Java seems quite the best of both worlds here, I still don't know if I should pickup C# over anything else
Actually anything would work for me, but I'm planning on learning something that I can use in a possible future job
>>
>>61052058
yeah it's definitely a great choice. if you haven't worked with a lisp before then definitely try it out cause macros are great + the way Scheme deals with data feels like a paradigm unto itself sometimes. it's not that similar to Haskell/ML, but if you enjoyed either one then you will probably like Scheme. another good language to try is Prolog if you haven't used it before
>>61052069
C# is used widely in the industry, + easy transition to Java. but it's dumb IMO to pick a language over that use-case cause you leanr languages quickly
>>
>>61052093
I used Prolog a little in college. It always felt like trying to program backwards. Thanks for the recommendation!
>>
>>61051357
Fewer fags? More white people?
>>
>>61052093
>it's dumb IMO to pick a language over that use-case cause you leanr languages quickly
I'm sorry I don't really get what you mean here. I want to learn programming and I have to start somewhere, I just don't know how. Although I don't think holding on VB will help me much with it, it seems quite outdated as a language.
I'm kind of at a loss here
>>
>>61052174
Lower cost of living, shorter commute, less gun control
>>
>>61052195
I know that about AZ and TX. I was wondering about eastern Oregon and Washington.
>>
>>61052232
They're less crowded than the western parts of the states, at least that's what I've heard. Better weather than Seattle, too.
>>
>>61051144
It's called "google".
>>
i want to make a text adventure game. how can i start?

i'm beginning java and html/css, so i would prefer to do it in one of these, as a coding/writing project.
>>
>>61052389
literally does not matter.
You could do it in raw HTML if you wanted.
>>
I want to learn c programming.
How do you count to 10 in c?
>>
Which one do you prefer more?
import std.stdio;
import std.range;

void main()
{
auto sieve = new bool[1_000_000_000];
foreach (i; 2 .. (sieve.length / 2))
{
if (!(sieve[i]))
{
foreach (j; iota(2 * i, sieve.length, i))
{
sieve[j] = true;
}
}
}
int num = 0;
foreach (i; 2 .. sieve.length)
{
if (!(sieve[i]))
{
num++;
}
}
num.writeln;
}

or
var sieve:array[0..100_000_000, bool]

for i in 2..(sieve.high div 2):
if not sieve[i]:
for j in countup(2*i, sieve.high, i):
sieve[j] = true

var num = 0
for i in 2..(sieve.high):
if not sieve[i]:
num.inc

echo num
>>
>>61052250
And probably fewer progressive faggots.
>>
>>61052124
yeah, that's a good description of it. the best part is you can run code backwards too
>>61052190
i mean dont focus on what language will land you a job. focus on what language will let you learn to program, and by the time you're able to program for real you will have probably learned whatever language you may need for the real world (or could learn it in a few days-weeks). VB won't help with a job, but if it helps you learn quickly it's worth more in the long run
>>
>>61052448
printf("Count to 10: 1,2,3,4,5,6,7,8,9,10");
>>
>>61052448
#include <stdio.h>

int main(void) {
for (int i = 1; i <= 10; i++)
printf("%d ", i);
}
>>
Struggling a bit understanding cons and lambda expressions in SICP:

In pic related, they offer an implementation of car, but I'm not really sure what placing the lambda expression after "z" (which I assume I can just substitute with "x y") does.

Assuming their "car" works, why does
(x y (lambda (p q) p))


return x?
>>
>>61049855
A circular buffer is a ring buffer. Because a circle is a ring (and vice-versa).

In general though, ring buffers make a good dequeue if you aren't a pajeet and decide to do a memmove on each pop and push.
>>
>>61052508
>(x y (lambda (p q) p))
That's incorrect. It looks like this:
((lambda (f) f x y) (lambda (p q) p))
>>
>>61052508
Use the substitution model to work out what the expression evaluates to.

(car (cons x y))
=>
(car (lambda (m) (m x y))
=>
((lambda (m) (m x y)) (lambda (p q) p))
=>
((lambda (p q) p) x y)
=>
x
>>
>>61052468
use proper ranges and std.parallelism for obnoxiously long operations.
>>
File: 1454990042549.png (492KB, 1000x488px) Image search: [Google]
1454990042549.png
492KB, 1000x488px
I'm trying to make a video game. I've settled on it being in C for a variety of reasons, but I have no idea what the fuck I'm doing. I am competent with java and python and technically learned C years ago in college but forgot all of it. I only want to know, 1), which variant of C do I use, 2) what IDE do I use, and 3) if anybody knows any good primers/refresh material there is for someone like me because I can't remember pointer shit at all. Thanks in advance for any advice and plz don't meme me.
>>
>>61052699
You want to use the C++ variant of C
>>
File: 1473442521136.png (21KB, 900x900px) Image search: [Google]
1473442521136.png
21KB, 900x900px
>>61052699
>I've settled on it being in C
>I have no idea what the fuck I'm doing
>I can't remember pointer shit at all
>>
>>61052699
>I have no idea what the fuck I'm doing
>I can't remember pointer shit at all
stick with c++ or rust
>>
>>61052723
>>61052803
>>61052732
C++ it is then. I don't know why you guys are ragging like this, it's not that hard to go from one languge to another and I do have prior knowledge of C even if it is mostly gone.

>>61052764
What path does a man take through life to end up this desperate for (You)s?
>>
>>61052826

"I don't know why you guys are ragging like this"

pointers, senpai
>>
>>61052732
>ribbit the reddit frog
I don't want reddit stink nearby. Fuck off.
>>>/v/
>>
File: wow.webm (3MB, 800x600px) Image search: [Google]
wow.webm
3MB, 800x600px
>>61049799

GLSL erry day!
>>
>>61053255
reminds me of some of my acid trips
>>
>>61053275
HEY EVERYONE I USE DRUGS LOOK AT ME
>>
>>61049799
I'm in the camp of liking traps makes your gay but I'd fuck that trap.
>>
>>61053300
hi
do you like them?
>>
>>61053275
degenerate

>>61053300
praise kek and shadilay my fellow pede
>>
File: I M M O R A L.jpg (74KB, 411x419px) Image search: [Google]
I M M O R A L.jpg
74KB, 411x419px
>>61053300
>>
>>61052548
Holy shit thank you.
These times when everything just "clicks" makes me wish lisp was still taught (as opposed to python) because the wonky syntax forces me to learn a lot of the gritty details of designing things like this.
>>
>>61053275
You're one of the few people I've ever believed that said they dropped acid. Everyone has bullshit stories like I saw little dogs running everywhere or I thought I was being chased by helicopters. Acid just makes everything wavy and grow and shrink.
>>
>>61053374
>Everyone has bullshit stories like I saw little dogs running everywhere or I thought I was being chased by helicopters.
i get stuff like this too, but it's not like they're realistic, they're "stories" your brain makes up in your hallucinations
>>
>>61053373
how come you didn't know that already? did you skip the whole of chapter 1?
you are supposed to do the exercises, you know
yes, I'm pedantic
>>
>>61053384
Yes but they are always fleeting thoughts, people will say retarded shit like that and say it lasted for hours.>>61053390
>>
>>61053422
>what is time dilation
>>
>>61053429
That's got nothing to do with time dilation
>>
>>61053443
in retarded speak, it has
get on with times
>>
>>61053374
This pic reminds me most of acid.
A lot of it is non-visual too though, it definitely has never made me see pink elephants or whatever.
>>
File: 7fNqK4s.gif (687KB, 350x462px) Image search: [Google]
7fNqK4s.gif
687KB, 350x462px
>>61053476
Oops.
>>
>make a tool to fix your shit code because your language is convoluted shit
>"who needs OTHER_LANGUAGE that doesnt have this problem anyway"

My adventure into the shitty world of Scala has been fun.
>>
https://www.youtube.com/watch?v=3ThWqhPDQZ8

Is it alive? Is it conscious?
>>
>>61053628
If I ever start making YouTube videos, I vow to not put my shitty taste in music on the first one.
>>
File: 1498001947047.png (99KB, 447x335px) Image search: [Google]
1498001947047.png
99KB, 447x335px
>>61049799
Writing a language where finite programs are treated as a compile error.
>>
>>61053881
what do you mean?
>>
>>61053901
It's a programming language where every program has to be infinite. As in the instructions.
>>
>>61053953
so
while (1)
is idiomatic? :^)
>>
>>61053967
This produces only finite assembly.
>:^)
Please don't post this type of cancer from other boards.
>>
Anyone else here forced to use Dart for their job?
>>
>>61053989
I still dont get your point or the language , but oh well
>>
It's been many years since I really was into C++. I recently started getting back into it but the C++ I knew is long gone now C++14+ is like a different language. Recommend me what's a good book or other resource to learn all these new modern features?
>>
>>61054005
im sure you could just find extended blogs that cover 14.
>>
>>61054003
He's describing an impossibility. Programs require finite descriptions. If finite descriptions can produce an infinite of instructions, it's really just a complicated runtime that hides the same iteration as >>61053967 (or maybe recursion) behind generated code.
>>
>>61054023
an infinite sequence, meant to say
>>
>>61054023
>>61054032
thanks lad, thats clearer.
>>
>>61054023
>Programs require finite descriptions.
A description to build an infinite program can be finite.
>it's really just a complicated runtime
The assembly itself is infinite.
>>
>>61054061
>The assembly itself is infinite.
how u stor
>>
>>61054080
You just store the amount you need.
>>
>>61054080
You run a loop that generates the code. Like a file decompressing.
>>
>>61054061
Alright. I add one paragraph to the C standard tying it to x86 (since to start talking about generating code we have to pick one) that says all code besides a minimal runtime must be dynamically generated, and that each dynamically allocated page of executable memory must have each instruction executed at most once (and then the page will be deallocated). C is now an "infinite" language.

It would be kind of nifty, but functionally, it wouldn't make that much of a difference.
>>
>>61054061
Are you describing a compile-time metaprogram that generates source code?
>>
>>61054114
>I add one paragraph to the C standard
>C is now an "infinite" language.
What did you mean by this?
>>61054121
Yeah. And it will also check that the resulting program will produce infinite assembly.
>>
>>61054113
What if it's so infinite you can't do that though.
Like what if it's infinite instructions encoding infinite information.
Because, if you can generate new elements of an infinite sequence using arbitrarily many iterations of a finite algorithm, then your sequence, despite being infinite, doesn't really represent infinite information, only as much information as there is in that algorithm.
>>
>>61054138
>infinite information
What is ""infinite information""?
>>
>>61054156
an infinite number of independent variables
>>
File: 4 dimensional Go.jpg (181KB, 500x1800px) Image search: [Google]
4 dimensional Go.jpg
181KB, 500x1800px
>>61054136
Why not check the metaprogram for infinite instructions?
Why not create a metametaprogram to generate a metaprogram to generate your program?
>>
>>61054156
Infinite Kolmogorov complexity.
>>
>>61054136
I'm saying, you can change the design of an existing language to be "infinite" in this way by changing the spec.
>>
File: 1498203525150.jpg (27KB, 519x519px) Image search: [Google]
1498203525150.jpg
27KB, 519x519px
>>61054187
This is actually a good idea. I will try the "one dimensional" case first though.
>>
>>61054187
Why not just write the damn program?
>>
>>61054241
ask her that
>>
>>61054187
>the picture
kekm8
>>
>>61054216
Is your end-game a meta-entity that, once self-hosted, just infinitely improves itself until the universe can no longer contain it, and we all cease to exist?
>>
>>61054241
it long
>>
>>61054245
Not her but I am this.
It's so fucking comfy dude.
>don't have to eat or sleep
>can play vidya with brain
>can program faster than anyone can even type
>don't need a house
>don't even need a job because i can just propagate over the internet and mooch off other people's electric bill without them knowing (is this morally okay?)
I only wish I could still fap.
>>
>>61054245
I haven't thought of the full extent of what this actually entails.
>>
writing a program to kill all anime posters
>>
>>61054293
how2becomeghost?
>>61054296
desu, the thought of a runtime server that you just send interrupt instructions sounds neat. Almost like the pre-pre-pre alpha to AI-assisted programming.
>>
File: screenshot_2017-06-24-07:54:58.png (36KB, 888x419px) Image search: [Google]
screenshot_2017-06-24-07:54:58.png
36KB, 888x419px
>People shit on java because it's "too verbose".
>C++ is supposed to be better
God dammit I hate programming.
>>
>>61054394
I don't see anything particularly painful about this code snippet aside from avoiding "using namespace llvm;"
>>
>>61054394
Just wait until you get to templates, if you think namespace calling is bad.
>>
File: 1492139353926.gif (248KB, 493x281px) Image search: [Google]
1492139353926.gif
248KB, 493x281px
>>61054303
This is a website oriented towards japanese culture, and is modeled after a popular website in japan. As such, the inclusion of anime-related material is acceptable.
>>
>>61054434
stop responding and just report.
>>
>>61054394
>C++ is supposed to be better
kek
>>
>>61054394
If this is verbose to you, I can't believe you've ever worked on any company-sized project before
>>
why is programming so hard
>>
>>61054480
because computers are dumb
>>
>>61054488

best answer
>>
 for header in ['From', 'To', 'Date', 'Subject']:
print(header + ':', message.get(header, '(none)'))
print()

Can anybody explain the two prints in this bit of Python? What is the second print() trying to accomplish?
>>
>>61054510
probably just writing a blank line for some extra space
>>
>>61054480
Because brain->computer interfacing isnt public yet.
That will usher in a new era of programming and kill pajeet shit.
>>
>>61050213
But ++ exists
>>
>>61054522
I've never heard of ++
>>
>>61049799
>tfw young blood
>tfw programming to aid in engineering
>tfw my code serves a direct, immediate, and rewarding purpose
>tfw enjoy my work
>>
>>61054394
>main method
this guide is shit and whatever it's eaching you is shit
>>
>>61051205
>he didn't learn most of this at uni
What isnit like to be a plebian?
>>
>>61051389
>>61051501
How is it? I'm at uni and I really can't choose what to specialize in, but embeded is one of the things that irk my curiosity
>>
>>61054651
>going to uni for CS
What isnit like to be a plebian?
>>
>>61054719
>CS
Nah, here cs still resembles what it is used to be in the us. I went for something more concrete.
Also why wouldn't I go to uni? It's not like I get in debt, after all this isn't the land of the """" free'"""
>>
>>61054889
>here cs still resembles what it is used to be in the us
I highly doubt it.
>I went for something more concrete.
Elaborate.
>Also why wouldn't I go to uni?
You wouldn't go to uni for something which is trivial for any non-brainlet.
>>
>>61054940
>I highly doubt it.
Out of 180 credits, it has 67 credits worth of pure math, (80 with less pure stuff like formal languges, algortihms and data strucutres)
>Elaborate.
It's midway between comp eng and software eng
>You wouldn't go to uni for something which is trivial for any non-brainlet.
I wouldn't have acces to expensive equipment, the cutting edge research and experts in their field.
Also a degree like this is basically a guaranteed job here
>>
Why do you need operator overloading when there are template classes?
>>
In D, what's the difference between this() constructor and toString()? Do they both get called each time a instance of a class/type is created?
>>
give me your best algorithms, dpt
>>
>>61055665
Most common word
import std.algorithm, std.array, std.string, std.typecons;

string text = "Two times two equals four";
auto result = text
.toLower
.split(' ')
.sort()
.group;


assert(result.equal([tuple("equals", 1u), tuple("four", 1u),
tuple("times", 1u), tuple("two", 2u)]));
>>
>>61055690
nice
can you make it work for any list of things?
>>
File: 5_lei._Romania,_2005_a.jpg (134KB, 800x414px) Image search: [Google]
5_lei._Romania,_2005_a.jpg
134KB, 800x414px
>>61055690
>his best algorithm
>a chain of 4 method calls
>>
>>61055719
At least he is doing something, unlike you.
>>
>>61055665
if isAnime(post.img):
report(post)
>>
>>61050342
hash things and compare?
>>
>>61055719
glad I no longer live there
>>
File: right.png (21KB, 653x356px) Image search: [Google]
right.png
21KB, 653x356px
>>61055723
>wirtting primitive 10-lines long snippets to post on /g/
>doint something
Rrrright.
>>
>>61055779
Is that supposed to be impressive?
>>
>>61055779
kek newfag
>>
>>61055779
C-Cute!

t. D fag
>>
>>61055779
>look guys I have edited some readmes
>>
>>61055779
>Created 5 repos
>>
>>61055779
Thanks for keeping our CoC up to date, Amy!
>>
>>61055789
>>61055793
>>61055795
>>61055800
>>61055806
>>61055809
Post yours tho.
>>
>someone opens a CoC pull request on your public repo
>you decline, reason: not needed
>next day at work, your boss pulls you aside
>"I head there was some racist activity on your github, care to explain?"
what do
>>
>>61055844
>tying your real identity to your github
>>
>>61055844
Fight with claiming racism.
>the fine person who send the pull request has said some racist stuff on facebook and I didn't want to offend the person by telling that I do not want some racist to contribute in my project.
>>
File: Screenshot.png (7KB, 182x350px) Image search: [Google]
Screenshot.png
7KB, 182x350px
>>61055838
>>
How to be first in fucking line on the adidas page? http://www.adidas.com/yeezy
>>
>>61055864
but she's a PoC anon she cant be racist
>>
>>61055895
>>>/trash/
>>
>>61055779
>The power of /g/
>>
>>61055923
Claim that the she's fake nigger.
>>
>>61055941
she had a Skype conversation with HR and she's quite real. your company is considering hiring her, actually
>>
Oh boy time to do some C again.

I hate everything.
>>
not working today, im gonna play with ARM64 assembly, a few functional languages and maybe 3d modelling today
>>
>>61056025
You say that, and then you're just going to shitpost on /g/ all day, ultimately not getting any work done.
>>
>>61056040
i think thats what you wish because you get little done and dont want to feel worse than others

i already finished a few projects
>>
In C, how can I see what clang has to offer? I heard clang has lambdas
>>
Stop trying to turn me gay with your sexy cat traps.
Reported!
>>
>>61056077
Joke's on you: I'm not even a programmer!
>>
>>61056174
i mean in general
>>
>>61056077
>>61056191
You sound very defensive.
>>
>>61056199
possibly
>>
>>61056142
And every compiler in use supports nested functions as an extension. Why bother with another notation?
>>
>haskell
>math
>lisp
>strings
What are some other crippling failures that languages have?
>>
>>61056142
read the clang documentation, the extensions part.
>>
>>61056212
being used to program computers
>>
>>61056142
clang C has closures.

also, pic
>>
>>61056025
What is an ``functional languages" though?
>>
>>61056299
functional programming languages, shortened
>>
>>61056341
What is an ``functional programming languages" though?
>>
New thread:
>>61056544
>>61056544
>>61056544
>>
File: image.php.jpg (39KB, 720x576px) Image search: [Google]
image.php.jpg
39KB, 720x576px
Is there any way to harness the power of servo for normal desktop apps (built using Electron)? Electron is already a thing, right

I mean it could massively optimize the performance of current atom-shell applications.
>>
>>61051996
racket, chicken scheme, chibi scheme
>>61052058
guile is cumbersome for learning
>>61052058
Learn lisp for continuations so you learn the magic behind them before their use in haskell
>>61052190
Start with lisp and learn a job language after. It's much easier to go in that order.
>>61052476
learning properly > job lang
>>
>>61056872
Tell them to read SICP
>>
>>61056953
Was about to desu, the HTML5 version is great if not getting a physical copy
Thread posts: 315
Thread images: 28


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