[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: 318
Thread images: 53

File: Ross.jpg (36KB, 314x499px) Image search: [Google]
Ross.jpg
36KB, 314x499px
What are you working on, /g/?

Previous thread: >>61599590
>>
File: karen haskell.png (818KB, 1280x719px) Image search: [Google]
karen haskell.png
818KB, 1280x719px
https://en.wikibooks.org/wiki/Haskell

Learn Haskell today!
>>
Reposting because I want criticism for my sepples.
https://pastebin.com/ZMVbtjyr
>>
>>61608793
explain
>>
>>61609217
https://www.youtube.com/watch?v=w-I6XTVZXww

ramanujan was a madman
>>
>>61609217
It's a misconception. There's some retarded characteristic of that series which is -1/12 but it is not the limit of that series.

Commonly called a sum of that sequence but it is not due to some clickbait british youtubers.
>>
File: 1493440380100.jpg (76KB, 750x516px) Image search: [Google]
1493440380100.jpg
76KB, 750x516px
>>61609199
>>
File: x86.png (3KB, 225x225px) Image search: [Google]
x86.png
3KB, 225x225px
thoughts?

> sandsifter: find undocumented instructions and bugs on x86 CPU
> the x86 processor fuzzer

https://github.com/xoreaxeaxeax/sandsifter
>>
>>61609170
Don't.

Haskell is literally the feminine penis of /g/.
>>
Free monads Ain’t free.
The AST of haskell gotta be litterd with the blood of Functors.
Simon PEYTON jewns aka “S. P. j” is not my contribter.
he is Go enthusiast and probbaly useful as well :DD.
LOO and poo not loo and OOP ok.
praise idris.
>>
>>61609335
>MMXVII
>still using a x86 CPU
I shiggy diggy
>>
>>61609355
this, haskell is LITERALLY (((useful))) and (((well supported))) with (((many functional libraries)))
if you want a REAL useless language with no support or libraries than use idris
>>
>>61609381
>idris
i'll use idris when more than 100 people use it.
>>
>>61606838
figured out my own problem (I think), I was just misunderstanding the syntax of `update-hmac`

this lets me do a rolling hmac with a key over a list of strings

(defun hmac-sig (key lst &key (encoding :utf-8))
(let* ((key (babel:string-to-octets key :encoding encoding))
(hmac (ironclad:make-hmac key 'ironclad:sha256)))
(dolist (x lst)
(let ((x (babel:string-to-octets x :encoding encoding)))
(ironclad:update-hmac hmac x)))
(ironclad:byte-array-to-hex-string (ironclad:hmac-digest hmac))))

or at least it seems to generate a valid hmac
* (hmac-sig "muhkey" '("this" "is" "my" "list"))

"14773136b937862e5609e800fdc1396ab813f741b9301b62c6809c717ff62a80"
>>
File: Java.png (26KB, 300x550px) Image search: [Google]
Java.png
26KB, 300x550px
thoughts?

>ba-dua is an intra-procedural data-flow testing tool for Java programs.
>Bitwise Algorithm - powered Definition-Use Association coverage

https://github.com/saeg/ba-dua
>>
File: s.png (33KB, 1680x1050px) Image search: [Google]
s.png
33KB, 1680x1050px
>>61609155
>What are you working on, /g/?

Exploring the deepest, darkest corners of Racket. ( ̄ー ̄ )

Made a complete solution for advent of code day 15 that gives the solution for both parts in less than a second (racket vm warmup included).

the program generates a closure for each discs.

#lang racket

(define tonum (compose string->number (curryr string-trim ".")))

(define (make-proc i modulus)
(lambda (x) (= 0 (remainder (+ x i) modulus))))

(define dprocs (for/list ([line (port->lines)]
[i (in-naturals 1)])
(let ([sp (string-split line)])
(make-proc (+ i (tonum (list-ref sp 11)))
(tonum (list-ref sp 3))))))

(for/or ([i (in-naturals)]
#:when (for/and ([p dprocs]) (p i)))
i)

(define part2procs (cons (make-proc (add1 (length dprocs)) 11) dprocs))

(for/or ([i (in-naturals)]
#:when (for/and ([p part2procs]) (p i)))
i)


i could make it faster by reusing the solution of the first part as the starting index for the loop of the second part.
>>
>>61609458
What esoteric programming language is that?
>>
>>61609479
meng what is your reading comprehension level at? He says Racket twice and it even has racket in the header of the code
>>
File: racket.png (67KB, 744x1052px) Image search: [Google]
racket.png
67KB, 744x1052px
>>61609479
Racket, a programming language from the past for the programming techniques of the future.
>>
>>61609479
>lang racket
first line
>>
>>61609199
>return {(int)((f) * (float)(1<<(decimal_bits)))
too many parens on some lines
something like return static_cast<int>(f * (1 << decimal_bits)) is better.
Also, it lets you put any integer as decimal_bits. What if someone used 100 or -5.
>>
>>61609155
just finished a bot that works with conv neuralnet to classify good or bad memes
http://t.me/r8mymemebot
>>
making a system to create a bunch of docker images in my CI

using python but only because it's a trivial program and it's easy af to install python on pretty much any OS
>>
>>61609497
>>61609544
It's obvious for you esoterism aficionados, but as far as I'm concerned, "racket" could be a framework or whatever.

>>61609519
Thanks.
>>
>>61609553
I've revised the template parameters a bit.
template <typename T = int, int decimal_bits = CHAR_BIT * sizeof(T) / 2>

Is there any way I can enforce a constraint on the decimal_bits parameter to ensure it falls in the range CHAR_BIT * sizeof(T) >= decimal_bits >= 0?
>>
>>61609572
maybe not immediately obvious (though thats arguable) but almost instantly inferred. effort ^_^
>>
>>61609601
My templates are kinda rusty but what about something like this:
template <typename T = int, int decimal_bits>
struct ValidSize
{
constexpr static bool value = CHAR_BIT * sizeof(T) / 2; // or whatever your constrait is
};

template <int decimal_bits, std::enable_if<ValidSize<decimal_bits>::value>::type *>
struct Fixed final
{
};
>>
>>61609400
I was joking, anon.
Don't use Idris
>>
Is there any good superset of C?
Gnu C is decent but it limits you to gcc and the extensions are really ugly and usually start with prefix __.
There is unified parallel C and some others but they are basically just C with openMP.
Vala is kind of limited by gtk.
ec seems really nice but it's just C with classes.
>>
>>61609712
Haskell with FFI
>>
>>61609726
Superset of C, not GC ridden functional mastubatory factory.
>>
File: 1465745950049.png (602KB, 963x720px) Image search: [Google]
1465745950049.png
602KB, 963x720px
>>61609740
>superset of C
>but not extra stuff
>>
>>61609758
haskell compiler cannot compile C, dumb fuck.
>>
>>61609770
it can link C code with Haskell code
>>
File: 2017-07-26-114742_1679x943_scrot.png (806KB, 1679x943px) Image search: [Google]
2017-07-26-114742_1679x943_scrot.png
806KB, 1679x943px
>>61609712
>2017
>he still uses C

c is a horrible programming language that has now ignored + 60 years of PLT

https://github.com/tomhrr/dale

https://github.com/carp-lang/Carp
>>
>>61609787
Almost any language can do that, dumb haskell faggot.
>>
>>61609806
you mean compiler
>>
>>61609802
>https://github.com/tomhrr/dale
You might have had point but thinking that
(@: c x)

Is acceptable syntax just makes you retard.
>>
>>61609802
but I am a modern day luddite anon
progress is evil
>>
>>61609356
>wealthy enough to be reasonably considered culpable for what CPU you use
>still on /g/
something doesn't add up here
>>
>>61609835
this is a good post but c is bad
>>61609802
lisp is bad
>>
>>61609682
>Don't use Idris
but Idris is good though :(
>>
>>61609838
Do you really think all of 4chan is terribly poor?
>>61609335
Cool stuff. I have a x64 CPU though.
>>
>>61609802
>60 years of PLT
It has produced nothing good, though.
>>
>>61609827
why?
https://github.com/tomhrr/dale/blob/master/doc/1-11-form-reference.md
>>
>>61609864
but nobody uses it except one guy from wales
>>
>>61609268
it's statistics, not adding numbers
>>
>>61609868
because @: is something so ugly that only Bjarne or functional retards could come up with.
>>
>>61609865
>Do you really think all of 4chan is terribly poor?
no but I think being on 4chan is inherently a vice and if you're NOT terribly poor then you really have no excuse
>>
>>61609655
I'll see if I can work something out, this is pretty confusing.
>>
>>61609802
>PLT
Having read some of this stuff.
It's mainly not concerned with actual issues you face when writing software.
>>
>>61609802
I agree, C was a bad idea. We should have stuck with B, types are stupid.
>>
>>61609894
Wealthy people can have problems too. Not wealthy people should probably not waste their time on 4chan.
>>
>>61609908
we should have stuck with CPL which was a much better PL than C

CPL > BCPL > B > C
>>
>>61609922
We shouldn't use languages desu.
>>
>>61609934
dumb haskell weenie
>>
>>61609802
>https://github.com/carp-lang/Carp

This looked neat until I scrolled down to the s-expression garbage.
>>
File: 1479208724334.jpg (266KB, 750x738px) Image search: [Google]
1479208724334.jpg
266KB, 750x738px
>>61609891
it's only ugly to you because your brain has been corrupted by the ugly C syntax.

Having * as the dereference operator is worst.
n = *x * *y *++*z // ay lmao
>>
>>61610006
This, ^ is a much better dereference operator
>>
>>61610006
>
n = *x * *y *++*z // ay lmao

That's not valid C, dumb fuck.
>>
>>61610020
Isn't it?
>>
>>61609802
>says he's in favor of PLT
>Presents languages which don't even elaborate on their ideas and reasons for being what they are on their github page despite having radical features like deterministic and automatic memory management.
Because to me that (carp) sounds like someone is just having you manage your memory implicitly. Stuff like automatic reference counting (practically GC) or other smart pointer constructs.

I'd be interested if it wasn't but to me it just looks like another terrible idea.
>>
>>61610020
that a lot of people can't tell should really make you think
>>
File: TiKI6J2.jpg (109KB, 750x690px) Image search: [Google]
TiKI6J2.jpg
109KB, 750x690px
>>61610020
(*x) * (*y) * (++(*z))
>>
>>61610006
>>61610019
dereference operators are a bad idea and so is passing by value
literally just pass and return everything by reference all the time
if you want to copy something then fucking explicitly copy it jesus
>>
>>61610055
>* ++variable
>relying on undefined behavior
NOT PORTABLE
dumb fuck
>>
>>61610056
kill yourself script kiddie
>>
>>61610067
not undefined behavior
this would be undefined behavior:
(*z) * (*z) * (++(*z))
>>
>>61610067
>undefined behavior
where in the standard did you read that?
>>
>>61610067
Not that guy but why is pointer arithmetic and then a dereference UB?
>>
>>61610093
>the standard
not portable
>>
>>61610105
>not portable
not portable
>>
>>61610076
>script kiddie
what the fuck are you on about
i'm not even talking about scripting languages
i'm talking about there should be a bare metal compiled language, on the level of c or at least c++ in terms of speed, in which everything is always passed and returned by reference
>>
>>61609655
I think I figured out a decent solution.
private:
constexpr static bool isValid()
{
return (((CHAR_BIT * sizeof(T)) >= decimal_bits) && (decimal_bits >= 0));
}
typedef typename std::enable_if<isValid(), bool>::type valid;

It's scoped within the class itself so nothing leaks out, I'm satisfied. I'll see if I can constrain T to an integral type too.
>>
>>61610087
what if x or y = z?

int n = 3

int z = &n;
int x = &n;

int nn = *x * ++*z; // 3 * 4 or 4 * 4 ?
>>
>>61610177
That would be UB. For very understandable reasons hopefully.
>>
>>61610177
that...
that code...
there is so much wrong with that code i don't even know where to begin

what i assume you meant:
int n = 3;

int *z = &n;
int *x = &n;

int nn = *x * ++*z;


in this case yes, that would be undefined behavior

looks like a good use case for restrict actually
>>
>>61610226
>>61610239
That's why C shall be avoided at any cost.
>>
>>61610283
>be bad at c
>decide c is bad because of this
nice attitude
>>
>people writing language in the most unreadable way think that somehow it proves the language is bad
>>
>>61610310
i want a programming language that help me being a better programmer, not the inverse.
>>
>>61610174
std::is_integral
>>
>>61609155
Anyone know how to do software rendering using only integer math?
>>
>>61610368
Yep, I heard of that before, pretty happy with how it turned out.
    // Template parameter constraints
private:
constexpr static bool valid_decimal_bits()
{
return (((CHAR_BIT * sizeof(T)) >= decimal_bits) && (decimal_bits >= 0));
}
typedef typename std::enable_if< valid_decimal_bits()
&& std::is_integral<T>::value>::type valid;
>>
>>61610367
C isn't about helping you be a better programmer and it isn't about the inverse either.
C is about quick and dirty.
C is about assuming you know what you're doing and staying the fuck out of your way.
C is about holding maximizing efficiency so far above all other concerns that in comparison they cease to be concerns at all.
C doesn't give a fuck about what kind of experience you have with it as a programmer. This is something about it that you should understand going into it, and if you don't, you have no one to blame but yourself.
>>
>>61610417
><()>&&::<T>::>::;
The best language ever
>>
>>61610449
>constexpr static typedef typename::value::type
that's the real problem here dummy
>>
File: n.png (150KB, 587x855px) Image search: [Google]
n.png
150KB, 587x855px
>>61610390
with this? http://dec64.com/
>>
>>61610449
that's not specifically a problem with c++, that's just the fact that between ADTs, generics, and OOP, all three are always bad, and you are unconditionally better off with a less sophisticated type system, and frankly having types at all is more of a necessary evil than a feature
>>
>>61610490
Err, preferably without any decimal encoding scheme.
>>
>>61610513
chapel does it nicely, so sepples has no exceuse.
>>
File: javabook.jpg (391KB, 1147x1504px) Image search: [Google]
javabook.jpg
391KB, 1147x1504px
>>61609155
Just bought this, is it any good?
>>
>>61610540
no it doesn't, i'll admit that its syntax is better but its concept is still far inferior to simply not having anything of the sort, which is how c handles the issue
one of the many reasons c is better than c++
>>
>>61610558
just looking at that cover makes me feel sick
>>
>>61610562
why is having a weak type system good?
>>
File: smug_ran2.png (495KB, 1000x1000px) Image search: [Google]
smug_ran2.png
495KB, 1000x1000px
>>61609270
>this is what CS majors believe
>>
>>61610558
that book are fantastic meme
you are oblige to keep mem
>>
>>61610593
>t. dumb js web designer shitter
>>
>>61610598
because it's one step closer to having no type system, i.e. manipulating everything purely in terms of words, which is the platonic ideal to which we should aspire
>>
>>61610367
>i want a programming language that help me being a better programmer, not the inverse.
try reading a book
>>
>>61610636
go back to Lisp fag
>>
>>61610654
What the fuck are you on about?
Lisp doesn't completely lack a type system and manipulate everything purely in terms of words.
In fact there isn't a single modern language I can think of that does. Most recent I can think of is B.
It's really a shame this principle was left in the dust in favor of the pointless clusterfuck that is types. A computer should never do a programmer's job for him.
>>
>>61610685
Lisp syntax is as minimal as it get. If you don't want syntax getting in your way, it's right there.
>>
>>61610703
Lisp is dynamically typed. That's a completely different beast, not to mention a hideous and disgusting one that compromises efficiency for programmer comfort.
I'm talking about minimal syntax WITHOUT compromising efficiency. By being UN-typed. NOT dynamically typed.
>>
>>61610726
So all data is simply the native word type of the machine it's running on?
>>
File: 2017-07-28-210300_517x401_scrot.png (13KB, 517x401px) Image search: [Google]
2017-07-28-210300_517x401_scrot.png
13KB, 517x401px
>>61610685
lisp does it if you use the unsafe procedures.
>>
>>61610636
>>61610685
>>61610726
oh my god what a nerd
literally just use C
>inb4 "but it has tyyyypes waaaah"
C's type system is very minimal and everything it provides is quite necessary for the sake of sanity
>>
File: smug_ran4.jpg (465KB, 565x800px) Image search: [Google]
smug_ran4.jpg
465KB, 565x800px
>>61610752
>divergent series
You mean conditionally convergent? Do you even know Riemann rearrangement theorem?
https://en.wikipedia.org/wiki/Riemann_series_theorem
>if an infinite series of real numbers is conditionally convergent, then its terms can be arranged in a permutation so that the new series converges to an arbitrary real number, or diverges.
>conditionally convergent
Fucking retard.
Also you cannot assign values to all divergent series (e.g. series around an essential singularity), only those that have analytic continuations in the first place.
>applied math major
Of course you are. Absolutely pathetic.
>>
I want to learn Python.

What is the most efficient approach to learning Python?

I could obviously google this, but I would appreciate answers from people on 4chan.

Thanks.
>>
>>61610685
>In fact there isn't a single modern language I can think of that does. Most recent I can think of is B.

c being weakly typed, you can simply do *(anytype*)&p

or

union
{
void *x;
type *y;
} toType;

*(toType){.x = &p}.y
>>
>>61610834
just start writing a program and learning as you go along
>>
>>61610860
Ah, my bad. I should have clarified. I have zero experience in programming before this.

Does that change your recommendation, or is it still sound?

Thanks for your help mate.
>>
File: ran_disgust.png (53KB, 204x288px) Image search: [Google]
ran_disgust.png
53KB, 204x288px
>>61610920
So the theorem doesn't hold you dumbfuck idiot. That particular one is assigned a value via analytic continuation, not Riemann rearrangement.
Holy shit you're stupid.
>>
it actually makes perfect sense that the sum of all positive integers would be negative

on the riemann sphere the "last" positive integer would also be the "last" negative integer as well as the "last" multiple of any complex unit -- namely the single point added to the complex numbers to form the sphere in the first place

a series should generally be greater than the last element of its sequence, no?

that is to say, farther in whatever direction the sequence was proceeding

but the last element of the sequence in this case is the top of the sphere

so if we started at the bottom, proceeded around the circumference "forever" until we "got to" the top, and kept going in the same direction for a "slightly lesser" "forever" then of course it would make sense we'd wind up slightly prior to where we started, because it's a sphere
>>
>>61609155

(repeat from old sqt) What's the best GUI framework for learning GUI programming? I know Java, Python and C++.
>>
reminder that the natural numbers start at 1
>>
>>61610961
Nobody cares.

>>61610941
>virgin math geek keeps posting chinese cartoons
Go make a containment thread for yourself. Stop polluting ours.

Ideally, use >>>/sci/
>>
>>61611029
>gets called out for being an enormous idiot
>REEEEEEEE
PATHETIC
>>
>>61611027
No. They start at 0, you dumb Mathfag.

https://www.iso.org/standard/31887.html

>mathfags are this dumb
>>
>>61611042
You're the one getting called out, dumb animuposter.

>they actually believe natural numbers start at 1

This is a programming thread. Fuck off.
>>
File: 01155.gif (114KB, 650x450px) Image search: [Google]
01155.gif
114KB, 650x450px
>>61611043
>No. They start at 0, you dumb Mathfag.
you're mistaking them for the whole numbers
the whole numbers start at 0, the natural numbers at 1
>>
>>61611051
>>they actually believe natural numbers start at 1
see: >>61611062
>>
>>61611062
No, I'm talking about NATURAL NUMBERS.
Read the fucking ISO definition, dumb mathshit.
>>
>>61611027
>>
File: COUBntiUkAAtESP.jpg (98KB, 600x600px) Image search: [Google]
COUBntiUkAAtESP.jpg
98KB, 600x600px
>>61611079
>ISO
opinion discarded
pic related: mfw
>>
File: smug_ran5.png (325KB, 529x735px) Image search: [Google]
smug_ran5.png
325KB, 529x735px
>>61611029
>>61611051
Oops forgot to attach my SMUG ANIME PICTURE that triggers the retard into a frenzy of projections and insecurities.
>You're the one getting called out
False, as you're the one with the absolutely retarded statement of
>You can prove that it's possible to make any divergent series sum to literally any real number by rearranging the order of its sequence.
Which is obviously Riemann rearrangement theorem but with a mistake of conflating conditionally convergent and divergent series that only a complete retard such as yourself would make.
>he deleted the post
LMFAO this is fucking hilarious.
>>
>>61611051
>>61611062

"Some definitions, including the standard ISO 80000-2,[1] begin the natural numbers with 0, corresponding to the non-negative integers 0, 1, 2, 3, …, whereas others start with 1, corresponding to the positive integers 1, 2, 3, ….[2][3][4][5] Texts that exclude zero from the natural numbers sometimes refer to the natural numbers together with zero as the whole numbers, but in other writings, that term is used instead for the integers (including negative integers).[6]"

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

"Regrettably, there seems to be no general agreement about whether to include 0 in the set of natural numbers."

http://mathworld.wolfram.com/NaturalNumber.html

There is no set definition; people just use the definition that best works for them. So you can just chill.
>>
>>61611087
>Racket
opinion discarded
pic related: mfw
>>
File: smug39.jpg (35KB, 314x327px) Image search: [Google]
smug39.jpg
35KB, 314x327px
>>61610752
>>61610920
What's wrong anon? Embarrassed?
>>
>>61611097
god fuckign dammit
why yall gotta come burstin in with the hard facts
the bait party was just about to start getting good
>>
Thread ruined by mathfags. Can we get a new one?
>>
>>61611144
>inb4 muslim shitposter
>>
File: smug43.jpg (34KB, 294x362px) Image search: [Google]
smug43.jpg
34KB, 294x362px
>>61611144
Where's my (You) anon? Reminder that you could've prevented this if you had kept your dumb whore mouth shut but you didn't, so now you're reaping the consequences faggot.
>>
>>61611194
reminder that 1 is the first prime
>>
>>61611144
>Thread ruined by mathfags. Can we get a new one?

How can a programmer hate math? Programming and Computer Science is just a species of mathematical engineering, after all. It is the only bullshit free academic subject known to man.
>>
>>61611194
This is what I'm talking about. Why do mathfags have to do this to every thread they post to?

Can somebody post a new /dpt/, please?

>>61611213
>le programming is math meme
No, it isn't.
>>
What's easier to do some data manipulation and use an open source image processing library?

My choices are C and python.

C is a tiny language and I can learn it all faster, but it might be more difficult to implement being so low level.
Python is higher level and holds my hand more, but it's much more complicated and I might write amateurish code.
>>
File: smug42.png (213KB, 302x422px) Image search: [Google]
smug42.png
213KB, 302x422px
>>61611224
>every thread
every thread where some dumbass "applied math" major spouts retarded shit*
I'd gladly talk about programming, but it's you who derailed the thread first with your stupid uneducated bullshit.
Fucking retard thinks he can dictate what other people do after he's thoroughly embarrassed himself LMFAO I'm laughing my panties off.
>>
File: she-plus-plus-conference-team.jpg (51KB, 470x315px) Image search: [Google]
she-plus-plus-conference-team.jpg
51KB, 470x315px
>>61611213
>It is the only bullshit free academic subject known to man.
Pic related.
>is just a species of mathematical engineering
PROTIP: It's not engineering and it's not Math if even pajeets can do it.
>>
>>61611213
>It is the only bullshit free academic subject known to man.
(function(){window.google={kEI:'45J7WfOJBeWU0gLS5pzYCw',kEXPI:'1301798,1353383,1353801,1354230,1354277,1354296,1354562,1354570,1354625,3700287,3700347,3700433,3700436,3700442,4029815,4031109,4038214,4038394,4041776,4043492,4045096,4045293,4045841,4047140,4047454,4048347,4048980,4050750,4051887,4056126,4056682,4058016,4061666,4061980,4062724,4064468,4064796,4069829,4072270,4072775,4076999,4078430,4078588,4080760,4081039,4081164,4082131,4082230,4085181,4089071,4093136,4093313,4093524,4094544,4095910,4097153,4097469,4097922,4097928,4097951,4098050,4098721,4098727,4098751,4099392,4102090,4102237,4102827,4102974,4103475,4103861,4104202,4104259,4105085,4105114,4105118,4105125,4105127,4106450,4106452,4106625,4106647,4107555,4108457,4108497,4108894,4109293,4109316,4109490,4109528,4110086,4110259,4110404,4110656,4110931,4112286,4113148,4113217,4113495,4114476,4114931,4114975,4115218,4115438,4115697,4116365,4116926,4116927,4116934,4117534,4117535,4117912,4117980,4118103,4118226,4118427,4118456,4118626,4118798,4118976,4118977,4119032,4119034,4119036,4119238,4119272,4119621,4120006,4120194,4120278,4120289,4120290,4120916,4121035,4121175,4121295,4121515,4121851,4122007,4122025,4122266,4122268,4122699,4122705,4122724,4122803,4123381,4123829,4123836,4123983,4124148,10200083,19002897',authuser:0,j:{en:1,bv:24,pm:'p',u:'d5a2a4f7',qbp:0},kscs:'d5a2a4f7_24'};google.kHL='en';})();(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI};google.getLEI=function(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;return b};google.https=function(){return"https:"==window.location.protocol};google.ml=function(){return null};google.wl=function(a,b).......
>>
File: Pioneers-Babbage-Turing-Neumann.jpg (504KB, 800x438px) Image search: [Google]
Pioneers-Babbage-Turing-Neumann.jpg
504KB, 800x438px
>>61611224
>No, it isn't.

Yes it is. Mathematicians invented the computer and computer science. A computer is giant math machine, preforming operations on numbers. Everything else is window dressing.
>>
>>61611285
>Mathematicians invented the computer and computer science.
Cool story bro, but I never said computer science isn't math.
I said programming isn't math.
>>
>>61611246
work it out in python first. takes less time to suss the algo and you can sort of test certain kinds of scripts in GIMP
>>
Hey fuckers, working on a video launching project with my friend and the code is all fucking messy and doesn't work so efficiently. Help a fucker out and gimme some advice at least, sqt is full of people who can't google. Anyway here's my simple python code to launch videos from a pir's hooked up to an arduino.
import subprocess
import os
import serial
import time
import sys

ser = serial.Serial('COM15', 9600)

def launchvid():
p = subprocess.Popen(["C:/Program Files/VideoLAN/VLC/vlc.exe","stuff/mus.mp4",'--play-and-exit', '--fullscreen'], shell=False)

def launchvid2():
p = subprocess.Popen(["C:/Program Files/VideoLAN/VLC/vlc.exe","stuff/Born into this.mp4",'--play-and-exit', '--fullscreen'], shell=False)

def launchvid3():
p = subprocess.Popen(["C:/Program Files/VideoLAN/VLC/vlc.exe","Arduino SPI.mp4",'--input-repeat=999999', '--fullscreen',], shell=False)

while True:
message = ser.readline()
print(message)

message[-0] == {"A":launchvid(), "B":launchvid2(),"!":launchvid3()}




I can post the arduino code if anyone would care to offer some advice?
>>
I'm in OO analysis paralysis hell and I don't know how to generally structure all of my components, fuck
>>
>>61611342

I ask because I know neither language, my knowledge is in C#.

So python is probably easier from what I've seen of both languages. I'll give it a bash in python first.
>>
>>61611285
>Mathematicians invented the computer and computer science
computer science, yes. computers, no. first computers were made by electronic engineers and the first one was made by a civil engineer. also, von neumann is a fraud.
>>
How much better are D's templates than C++? I feel like I'm in hell right now, everything's a hack.
>>
>>61611354
This looks really messy, are you sure shared_ptrs are the right choice here?
>>
>>61611374
Much fucking cleaner.
>>
>>61611354
visitor pattern.
>>
File: I'm_a_hacker.png (1MB, 1241x925px) Image search: [Google]
I'm_a_hacker.png
1MB, 1241x925px
>>61611213
>It is the only bullshit free academic subject known to man.
>>
>>61611213
>Programming and Computer Science is just a species of mathematical engineering
no
>>
>>61611407
looks more like backer to me
>>
>>61611259
>>61611407
>>It is the only bullshit free academic subject known to man.

I was referring to math, not computer science. Software Engineering consists of nothing but bullshit.
>>
>>61611299
But it is.
Programming is just algebra, except for two differences:
1) there are side effects
2) instead of solving the equations you make them up yourself, specifically in order to achieve the desired sequence of the aforementioned side effects
>>
>>61611433
>Software Engineering consists of nothing but bullshit.
k tard
>>
>>61610390
fixed point arithmetic?
it's pretty easy to do bresenham's line algorithm by hand with 32 bit ints, if you use macros you're a pussy
https://hbfs.wordpress.com/2009/07/28/faster-than-bresenhams-algorithm/
>>
>>61611205
Everyone agrees that that is totally false. If you knew the fundamental theorem of arithmetic you'd know why.
>>
>>61609458
I remember when racket was the meme programming language of the month here in /g/
>>
>>61611446
>he majored in software engineering
laughing_girls.jpeg
>>
>le programming has no math meemay
kill yourselves
>>
File: 2lacy88.png (74KB, 469x422px) Image search: [Google]
2lacy88.png
74KB, 469x422px
>>61611492
reminder that 2 is the first mersenne prime
>>
File: trashkell_on_suicide_watch.png (448KB, 580x1500px) Image search: [Google]
trashkell_on_suicide_watch.png
448KB, 580x1500px
>muh "moan ads"
>>
>>61611658
>muh "lamb duhs"
>>
>tfw no good crypto libraries for .NET

How badly would it impact performance interop with C from .NET? It's something that would be called in a loop as fast as possible, indefinitely.
>>
>>61611803
>crypto
>fast
Anon crypto is inherently slow by design. It's just slower for hackers (hopefully).
>>
Why isn't "be that as it ain't" a thing?
You know, like "be that as it may," except instead of saying you concede the point but question its relevance, you're saying you don't concede the point but you also question its relevance and therefore suggest we not argue about it.
>>
>>61610449
it's like complaining that lisp is just (((((((()))))))
>>
>>61611990
>((((((((((((((((((((((((((((lisp))))))))))))))))))))))))))))
>>
>>61611990
>>61612006
lately, any time I build some tooling for work, I make sure it can be eval'd and ran as (((they)))
>>
>>61611972
Because 'even were that true' conveys the same thing without sounding like a fucking retard.
>>
>>61612006
?
>>
>>61611990
People complain about both. But lisp has better reasons to be ((())) than sepples has to be <<<>>>&&::

And honestly the ((())) are technically optional. There's parsers that let you write lisp in a python like syntax that convert it to parentheses. They didn't catch on because ((())) are great despite the haters.
One of many such parsers:
>https://srfi.schemers.org/srfi-119/srfi-119.html
>>
>>61609339
/pol/ pls
You're just too dumb to functions.
>>
>>61611990
((((()))))) tell you nothing
:: <> {} () &* tell you everything
>>
atom is slow

vscode vs sublime?

i'm not paying for sublime if it matters(prob doesnt)
>>
If we say we're going to round something towards negative infinity, is that just a strange way of saying that we're going to round down?
>>
>>61612203
Yes
>>
>>61612046
what if there were a lisp where:
>there are no parentheses for function calls, not even python style
>fixed arity functions are reverse polish, e.g.
cons 1 nil

>variadic functions are inset, e.g.
1 + 2 + 3
, but can be invoked as reverse polish on one argument, e.g. list 1
>parentheses are only used to disambiguate associativity
>>
>>61612141
#include <stdio.h>
void main() {
int * a = NULL;
int b = 10;
printf("%i\n", &b &&a);
}

vs
#include <stdio.h>
void main() {
int * a = NULL;
int b = 10;
printf("%i\n", &b & &a);
}

:^)
>>
>>61611494
i remember when /g/ was about lisp because of RMS.
>>
>>61612255
What you wrote is polish notation not reverse polish notation. But what you describe encroaches on FORTH without FORTH's simplistic beauty.

I wouldn't use it. Compare
(printf "~A ~B" 1 2)

in sane lisp
"~A ~B" printf 1 printf 2

in fuck parens lisp.

>disambiguate associativity
Associativity doesn't need to be disambiguated in polish notation
>>
>>61612046
make the parenthesis for the top expression optional and lisp become a shell language.
>>
>>61612320
That's pretty easy to do yourself though. Just do it anon. Make a REPL that wraps the input in one set of parentheses.
>>
>>61612320

the lisp REPL existed before shells existed and shells are just a neutered nephew
>>
>>61609865

>makes fun of someone for using a shitty commodity architecture
>uses a shitty commodity architecture

fufufufufufu
>>
>>61612141
hello, in Lisps () defines the bounds of a form
(+ 1 2) is evaluated as "value of 1 equates to 1, value of 2 equates to 2, values 1 and 2 passed to + result in a new form of 3. You may think of them as func(){} in algol-style languages.
>>
>people cum all over JetBrains' tools
>decide to try CLion on Windows as it markets itself as a cross platform C/C++ ide
>uses fucking CMake
Yeah... no.
Who ever thought this was a good idea should hang themselves.
>>
piracy is bad
>>
>>61612185
VS Code
>>
constexpr function pointer, will that run any worse than a plain function at runtime?
>>
>>61612185
>vscode vs sublime?
What language?
vscode doesn't lint C properly
>>
>>61612708
What do you use to build cross platform C++, anon?
>>
>>61612708
Yeah I felt the same.
If they had given you a nice UI for the whole thing and had cmake as a backend I'd be fine with it. But as is they're just worse than visual studio (except they're cross platform).
>>
>>61612835
Makefiles, plain old simple makefiles.
>but cmake generates makefiles
except it doesn't work half the time on non *nix systems

cmake is a dumpster fire and needs to be replaced.
>>
File: image-w1280.jpg (63KB, 1280x720px) Image search: [Google]
image-w1280.jpg
63KB, 1280x720px
>>61609155
>Just want a job that pays me 6 figures to basically come in and do "8 hours of worth" of work in the first 2 and spend the rest shitposting on the internet

Is that too much to ask?
>>
File: anderson.c.png (33KB, 440x885px) Image search: [Google]
anderson.c.png
33KB, 440x885px
>>61612256
>and two pointers pointing to the stack and print
Ok.
Try a little harder.
http://ioccc.org/
>>
File: anderson.hint.png (18KB, 562x348px) Image search: [Google]
anderson.hint.png
18KB, 562x348px
>>61612894
Fun bunch.
>>
>>61612708
>JetBrains
>CLion
>ide
>CMake
literally why??
it is so much easier and more versatile to just:
>terminal + coreutils
>need IDE? tmux
>need auto build? make
>>
>>61612894
>>61612912
wow this is a blast from the past. I remember finding this code when I first started learning C back in my freshman years of highschool
>>
>>61611803

>How badly would it impact performance interop with C from .NET?
You're not going to get slower performance for calling a C function via an FFI. You may even get better performance.

>>61612864

If you are referring to Windows, I'm pretty sure you need to explicitly mention to use MinGW. Like so:
cmake .. -G "MinGW Makefiles"
>>
>>61612141
You don't need 'to be told' anything, there is no syntax. You fundamentally don't understand how Lisps work.
>>
>>61613031
That's precisely the issue, everything looks the same.
>>
>>61613117
That's because everything *is* the same.
>>
>>61610367
git gud
>>
File: 1498584279209.png (3MB, 1920x1080px) Image search: [Google]
1498584279209.png
3MB, 1920x1080px
>move from parents house
>goto new place (rich zone)
>no internet
>but multiple wireless networks from neighbors
>install kali linux
>try to enter the wifi by brute forcing

is this a good idea?
>>
>>61613196
wrong thread m8 are you trying to get blood and wank all over your face at the same time

>>>/v/
>>
>>61613121
That's wonderful for jerking off over but I prefer languages that makes code that has a different purpose look different.
>>
>>61613214
Then you will never know true enlightenment: code is data, data is code.
>>
>>61613196
>committing a felony because you're too cheap to get internet
>>
>>61613248
h o m o i c o n i c i t y
>>
>>61613214
You don't understand lisp. Lisp has an unparalleled unity to it. Code is data and data is code.
>>
>>61613280
what's so great about Lisp?

are there Lisp jobs?
>>
>>61613248
Not him but that's not true though.
That's an illusion created by computers.
If you go down to the level of electrical circuits more generally, including circuits that are not computers or computer components, but are technically still "programs" if you think about it -- such as light fixtures -- you see that code and data are very different. Data is electrical signals, whereas code is arrangement of electrical components.
>>
>>61613294
Lisp is a dead meme from the 80s, of course not.
>>
>>61613309
What you describe is architecture not code.

Light fixtures are finite state machines not programs.
>>
>>61613309
> computer code is the arrangement of electrical components
Wow.

It's all just letters and numbers on a screen, my man. It's *all* data.
>>
>>61613280
>>61613294
>>61613327

I'm an aws consultant, i'm implementing an SDK for it in common lisp right now. I'm sick of having to use Python to interact with AWS services, and the other SDK choices are java, javascript, ruby, or node. Lisp is actually fun to write, and my SDK so far looks fucking beautiful compared to the existing stuff like boto3.

If you think Lisp is dead you're ill-informed. Don't learn CL just to learn CL, learn it so you can very easily work with Racket, Scheme, Clojure, PigPen, etc. There are plenty of things out there that you can leverage with a Lisp.
>>
>>61613376
>I'm an aws consultant
never heard of this one before lol

> i'm implementing an SDK
what is that and what for?
>>
>>61613452
it just means that I work with clients who are using aws as a provider but i don't work for aws.

software development kit. in aws' case they have a lot of service API's the SDK's are wrappers in various languages around those service APIs.
>>
>>61609155
Made my minecraft clone multithreaded. Separated it into a game logic thread and a rendering thread. The game logic thread now runs twice as fast in normal conditions. Performance improvements are pretty good especially for things like render distance.

And people told me writing my own mutexes was a mistake!

There's still some room for performance improvement. I need to replace some procedures with non-blocking versions to reduce the number of execution bubbles in my program that particularly arise during high demand moments (such as say, hypothetically, burning down a forest). Also I need to figure out a new way to precondition the data that isn't filthy O(nlogn) qsort. My old method relied on what would be an incurable race condition in a multithreaded application.
>>
>>61613967
you're about to get lit up with

>>>/v/ redirects
I just want to let you know that that sounds pretty cool and it's definitely /dpt/ programming.
>>
>>61613982
>it's definitely /dpt/ programming.
I think
>
There's still some room for performance improvement. I need to replace some procedures with non-blocking versions to reduce the number of execution bubbles in my program that particularly arise during high demand moments (such as say, hypothetically, burning down a forest). Also I need to figure out a new way to precondition the data that isn't filthy O(nlogn) qsort. My old method relied on what would be an incurable race condition in a multithreaded application.
Is leagues better than the posts we get here on /dpt/ normally.
>>
>>61613366
point of disorder: electrical engineers sometimes call the fixing of parameters of an integrated circuit by the choice of external component values "programming"
>>
>>61614012
what's your goal?

you wanna be a game programmer?
>>
File: scalacollections.png (56KB, 1013x580px) Image search: [Google]
scalacollections.png
56KB, 1013x580px
In Scala, singly-linked lists are faster then vectors. How is this even possible??

http://www.lihaoyi.com/post/BenchmarkingScalaCollections.html
>>
re-entering Ada rn, came back for Nostalgia reasons, don't regret it.

Currently looking at what one can do on embedded devices with it.
>>
>>61614012
it's true, /dpt/ is the culmination of life-times of shit-posting methodologies. I still don't know if the d-lang girl is a human or bot. It's almost misguided to post real content here but I hope those few keep doing so. For all the shit they catch from idiots who can't even fizzbuzz there are other people picking up what they are putting down
>>
>>61614038
I am only somewhat informed so please take it with a heavy grain of salt. Most of my Scala exposure comes from providing data scientists with facilities in which to do their work. Scala has a native home on some very impressive architecture, namely Spark on top of Hadoop or Mesos. Many of it's functions are structured in a way that they are easily made parallel. Scala has some unique abilities to transform, collect, and accumulate large corpus's of data.

I would guess that the singly linked list is leveraging some native functionality of the JVM whereas vectors take place in an abstraction in the JVM.
>>
>>61613967
Are you the Scheme Minecraft dev? Which Scheme are you using?
>>
>>61614012
If you want more detail, the "incurable race condition" was that the renderdata of each chunk is sorted into 4 categories so I can do instanced rendering
>solid
>liquid
>models
>invisible (air or totally occluded geometry)
The old preconditioning algorithm would bubble individual changed renderdata along borders between these regions, which was pretty efficient as it's O(1) per changed renderdata. But the way it knew where changed renderdata was is that each block had a pointer to the changed renderdata. Worked great single threaded. But it was necessary that the renderdata was resorted immediately otherwise the renderdata pointers would point to the wrong renderdata. This can no longer be done because only the rendering thread can touch vram.

>>61614024
Just fun. I'd work as a game programmer if the conditions weren't so fucking awful. I'm more compatible with the 2 part time job lifestyle anyway, which crunch time does not allow for. So I'm not even remotely considering it.

>>61614207
Chicken. Plays very nicely with C and runs very fast.
>>
>>61614207
http://call-cc.org/
>>
>>61614260
>Chicken. Plays very nicely with C and runs very fast.
Nice. I guess the multithreading is all in the C/Rust part of the code, though? AIUI Chicken doesn't support native threads
>>
>>61614260
What's the best way to git gud in Scheme? I've been doing SICP and it's been pretty easy so far (I have a FP background), not sure I'm learning much from it
>>
Reminder that if you take electrical engineering and call it a programming language, then it's Turing complete, and also machine language is implemented in it so really machine language is not the lowest level programming language possible. And also as a language electrical engineering bears a greater resemblance to Haskell than it does to any imperative or object oriented language. Cfags btfo. My pure functional language with no first class functions and only booleans and floats as types is WAY more efficient than your imperative shitlang, and also despite being very low level it's entirely cross platform because it doesn't even fucking run on a platform.
>>
>>61614297
I'm not the gentleman writing the MC stuff, but I'm the aws consultant writing the CL aws-sdk, If you've been doing SICP Scheme should basically be an instant pickup. I think there are even direct apples-to-apples charts of CL against Scheme.

Scheme is just really ivory tower CL, it doesn't have all the hairy libs and as much 'get shit done' but it's beautiful and capable of plently. think of it as a shift in keywords and use Chez.
>>
>>61614282
Right. The rendering thread is pure C. It would have been that way with or without chicken threads though.

The annoying part is going to be writing dynamic chunk saving/loading to/from disk though. Right now the chunk loading code is in scheme, which is a bit of a nuisance because ideally saving/loading to/from disk should be asynchronous. I'm probably just going to spawn a separate instance of chicken and serialize data between the two.
>>
I wrote a program that plays the level up sound from WoW whenever you save 100+ lines of new code
Now I don't know what to make while using it
>>
>>61614297
I read SICP to learn Scheme. If you have a FP background you'll probably handle chapters 1 and 2 pretty well, but 3 and past will be harder/more novel by comparison.
>>
>>61614335
A compiler.

You'll pass the 100+ lines very fast
>>
>>61614305
>literally thinks reality has no state
lmfao you are beyond retarded
>>
>>61614305
son, i know it's your first year in school and you are thrilled (as well as drunk, clearly) but the notation you're writing in EE isn't a 'computer language' it's the principals of EE expressed in mathematical notation. You can certainly express these concepts in a programming language.

If you're lucky you'll get a visa to a us university or an h1-b and then we can teach you about these things.
>>
>>61614260
Have you ever tried using racket?
>>
>>61614328
rather than focus on your write-to-disc implementation and what language it is in I would actually suggest that you throw in some sort caching layer that provides eventual write consitency. this way you have many more things offloaded to ram and a seperate process that is with eventual consistency writing these things to disk out of band
>>
>>61614352
>the notation you're writing in EE isn't a 'computer language'
It is though. Reality is the computer in question. And it's sure as hell a much better computer than the shitty imperativefag """"computers"""" we have today.
>>61614351
First of all, mathematically speaking, reality indeed has "no" state. There's a lot of energy, and a lot of spacetime, but the sum of all the energy there is and all the spacetime there is is 0.
Regardless, I don't give a shit. Reality can have state or whatever. But circuits don't. Unless you abuse them.
>>
>>61614376
I could be wrong, so if I am definitely post me the benchmarks but I'm pretty sure Racket is slower perf-wise than both Scheme and even CL at.
>>
>>61614349
I've been meaning to do this for a while, but I don't think I'd be able to come up with anything useful enough that would make it any different than C
>>
Why cannot GDI capture screenbuffer output for fullscreen applications?
I am experimenting with screen capture methods, and while GDI works in most desktop cases, full screen applications return pitch black capture. I suspect this might be to do with DirectX/OpenGL rendering, however wouldn't the output of these still pass through the GDI API when interfacing with Windows?
>>
>>61614389
alright I get it, you're in EE because you weren't smart enough for physics. I don't blame you I went to school for EE only to go back for a physics degree many years later.

also, based on your response to that other gentleman I'm questioning the quality of your education. Almost any particle or particle interplay I can think of seeks out a natural state of lower exitablity
>>
>>61614433
I'm not even in EE, I'm in CS
>Almost any particle or particle interplay I can think of seeks out a natural state of lower exitablity
That's the hill trying to seep back into the hole
It certainly doesn't change the fact that before there was either thing, there was a flat plain (i.e. 0)
>>
>>61614433
>>61614394
Stop being mean anons
>>
>>61614376
I opened up the IDE and decided it was too much effort, then uninstalled it.

>>61614381
I haven't even gotten dynamic loading to/from vram in yet so there's a bit of ways to go for that in general. There's no choice but scheme for the read-write implementation though. The terrain generator has to be in scheme.

By caching layer do you mean say a ramdisk and a process that occasionally flushes it to the real disk? Could you link some info about that?
>>
>>61614406
>I don't think I'd be able to come up with anything useful enough that would make it any different than C
You don't need to.

Just make a small subset of any language you want, for example smallC, where the +=,++ doesn't exist, and only simple operations are allowed.

You write a non ambiguous grammar for your language, that is , rather simple.

It's a fun project
>>
>>61614394
It's a bit slower than scheme according to benchmarks game
Could just be a lack of racket programmers though
It appears to be using less memory than scheme
>>
File: 1471216526275.jpg (50KB, 433x469px) Image search: [Google]
1471216526275.jpg
50KB, 433x469px
someone explain merge sorting to me
is it just dividing an array into individual pieces and sorting them followed by recombining them into a single array
>>
Racket is the Java of lisps
>>
is it me or does lisp documentation just suck

both common lisp and racket just have hyperlinks upon hyperlinks of documentation that doesn't really say anything
>>
>>61614467
MERGE SORT:

>Split the array in half
>Sort the left half
>Sort the right half
>Merge the two halves together
>>
>>61614491
Lisp, by nature of its simplicity, requires very little documentation
>>
>>61609355
Peyton is a Persian name
>>
>>61614491
Most documentation for scheme is in their original srfi pages or the r5rs specification. It's pretty good desu.
https://srfi.schemers.org/
http://www.schemers.org/Documents/Standards/R5RS/
GL on racket exclusive functions and macros though.
>>
>>61614467
Assume you have an efficient (linear time) function for sorting adjacent sorted sections of an array. Call it merge.

Then, if you have an array of length 8:

Merge [0] and [1], [2] and [3], [4] and [5], [6] and [7]
Merge [0,1] and [2,3], [4,5] and [6,7]
Merge [0,1,2,3] and [4,5,6,7]

The array is now sorted.
>>
>>61614459
so you just need to shut the fuck up then?
dismissed you faggot.
>>
>>61614335

>save 100+ lines of new code
Now, when I think "save lines of code", I think "removing lines of code while keeping the same effect and not destroying readability." It seems you're just incentivizing creating new code, whether or not it's useful.
>>
File: 1501184483073.jpg (103KB, 500x500px) Image search: [Google]
1501184483073.jpg
103KB, 500x500px
This miku walks up to you and splatters you with Principles of Object Oriented Programming! (POOP)

What do?
>>
>>61614543
What is a "This miku"?
>>
webdevs are majorly butthurt:

https://m.phillydevshop.com/apples-refusal-to-support-progressive-web-apps-is-a-serious-detriment-to-future-of-the-web-e81b2be29676
>>
>>61614551
The Hatsune Miku in that picture.

Is this 'POOP' actually human faeces or does Principles of Objected Oriented Programming just resemble poop?
>>
>>61614572
give me a quick rundown
>>
>>61614572
>Progressive Web Apps
wew fuckin lad
>>
>>61614539
Yeah, it's difficult to measure the value of code that is added, removed, or replaced
It was just the simplest metric to implement
I also figured that as a program grew in size, the programmers ability to increasing the programs size in a linear manner decreases, making "leveling up" more challenging at "higher levels"
>>
>>61614572
Didn't we learn this was a mistake from Windows XP?
>>
>>61614467
Yes, basically, but what's special about it is that the recombining part is also the sorting part. You divide it into singleton arrays, each one is already sorted because they're singletons, and when two arrays are already sorted you can build a sorted multi-union like this:
>pop the lesser of the two front values off its respective array and push it to the back of the output array
>repeat until at least one of the two arrays is empty
>if only one is empty append the rest of the other one to the end of the output array
So you keep combining pairs of arrays into sorted multi-unions until you only have one array left, and that's your sorted complete array.
>>
>>61614604
Yes, and we will continue to make this mistake again and again

>>61614586
Having to write native iOS apps makes webdevs sad
>>
>>61614462
thats ok Scheme is really honorable despite it's lack of ecosystem and it *is* performant. You are correct I am moreso speaking of infrastructure. You will not be able to make anything scalable if you have inline functions that require writing or fetching from disk. I must admit though I am more versed in the CL ecosystem and not the Scheme-specific ecosystem. I don't know what sort of ramdisk/caching options there are in scheme. in CL i'd say something like LMDB. perhaps there is a scheme implementation of it?

>>61614464
i've noticed that Racket vs SBCL, SBCL consumes more RAM but returns quicker. When I was younger I would have said that was cheating but these days memory is so cheap that if you bloat out in RAM but return on a thread sooner I am just fine with that. That being said I think this shows that Racket has potential in environments where RAM is at a premium (e.g. a mesos cluster, for those of you who actually know what that is)
>>
>>61614583
>Hatsune Miku
What is one of those?
>>
File: 1499206703034.png (103KB, 500x700px) Image search: [Google]
1499206703034.png
103KB, 500x700px
>>61609170
I tried.
I failed
I accepted that C++ is more my thing,
Nah ty
>>
>>61609170
But I can just use C for everything
>>
File: 1499303725654.jpg (72KB, 640x1205px) Image search: [Google]
1499303725654.jpg
72KB, 640x1205px
>>61614662
>mfw this is me
Are feels allowed on /g/?
>>
>>61614634
Ahh I'll look into it. Looks like what you linked is in C, so getting it to work in scheme should be really easy.
>>
>there are people in this thread who haven't written code in at least 10 different languages
You have zero excuse
>>
>>61614713
Does the programming languages course I took seven years ago count?
>>
When will you accept that pretty soon, all software will be webdev?

https://medium.com/javascript-scene/native-apps-are-doomed-ac397148a2c0

Everything will be cross-platform, reactive HTML, CSS, and JavaScript. You won't ever have to fight with Qt, or GTK, or any other native UI library ever again. Everything will look and behave the same whether your users are using Windows or Macs.
>>
>>61614662
>C++ is more my thing
C++ programmers really are a joke.
>>
File: nah.jpg (6KB, 250x202px) Image search: [Google]
nah.jpg
6KB, 250x202px
>>61611658
>40* the compile time of c++

zweet hesus man
>>
>>61614713
>php
>c
>c++
>java
>idris
>javascript
>ruby
>python
>sbcl
>mit scheme
>racket
damn close call tho
>>
>>61614729
>complains about compile times but refuses to learn Go
Hmmm
>>
>>61614713
>php
>c
>c++
>javascript
>java
>scheme
>glsl
>x86
>6502
>bash
>python
Phew close call.
>>
>>61614752
>touts go but refuses to learn c
hmmm
>>
>>61614711
I know from personal experience that using it with Common Lisp is quite fluid so Chez Scheme shouldn't be much different. I mainly suggested it because it allows for much larger items (4GB+ I think) compared to something like Redis (512Mb? again maybe I am thinking of a different object) and maybe this is better for your use-case. LMDB has many less features than redis or memcached, so maybe if they could be better suited I would check them all out, or see what other in-memory caches are available to you. Any decent in-mem cache lib will provide you with functions or classes for eventual write/read consistency.
>>
File: 1496810915969.jpg (98KB, 1456x896px) Image search: [Google]
1496810915969.jpg
98KB, 1456x896px
>>61614736
>>php
>>c++
>>java
>>javascript
>>ruby
>>python
>>racket
not programming languages try again brainlet
>>
/dpt/ eat a raw serrano pepper NOW.
>>
Made a bunch of invisible progress that you can't tell externally, but basically the card information is properly stored in a model which properly observes changes and passes it off to appropriate controllers which properly tell views to start animating.
I am now knee deep in Design Patterns (tm). I think it was an appropriate use of the Observable Pattern.

I'm still a bit unhappy with the code quality of some of my views and controllers; rewriting them is on the backburner.
>>
>>61614844
ITS HOT FUG
>>
Trying to build a GUI for the DMX lighting controller
>>
>>61614844

;_; why you make me do this
>>
File: 7251.jpg (138KB, 403x403px) Image search: [Google]
7251.jpg
138KB, 403x403px
>>61609155
Is there any documentation editor that would produce something as simple as this? could be also a markdown editor that has an automatic table of contents.

http://surjithctly.github.io/documentation-html-template/
>>
>>61614953
>>61614962
It was only a suggestion.
>>
>>61614999
racket scribble
>>
>BIOS """"""""""engineers""""""""""
>>
https://www.reddit.com/r/ocaml/comments/61pep4/ocaml_multicore_support/
OCaml eternally BTFO
>>
File: 1485847174360.jpg (35KB, 564x422px) Image search: [Google]
1485847174360.jpg
35KB, 564x422px
>>61614713
It's because i'm shit and its really hard to learn
>>
>>61615001
I know but what happen was I was afraid to eat it all at once so i rip it up and the juice gets on my hand. I put one half of the pepper in my mouth but save the other half for later. well guess what turns out that the one half i ate is still damn hot but those juices are also all over my hands. turns out i'm but named wearing nothing but a pancho and now i've got serrano sauce all over my hands. turns out i'm also stuck in a regressive state of mind where i'm constantly fondling my gonads like a child. now i've got fresh serrano juice all over my diddler and wingmen and there is a fire alight like never before experienced in my southern polar region. I'm looking for answers, solvents, bases, extracts, lotions, potions, shaman, showmen, ram das/roger stone types to help me out. As my vision fades to red all I can do is smear more aloe on my balls and face(unrelated)
>>
>>61615016
thanks, but maybe something a bit more readable.
>>
>>61615107
Milk
>>
>>61615136
I just poured milk all over my balls but my wife walked in and she saw me with an inflamed face and penis/balls and took the chlidren and she said she's scared and she's staying with her black co-worker jamal because he's always helping around the house what do I do /dpt/ i just wanted to learn haskell now i'm being cuckolded while i incinerate my own balls and shaft
>>
>>61615155
>i just wanted to learn haskell now i'm being cuckolded while i incinerate my own balls and shaft
/dpt/
>>
File: 1495766556416.gif (3MB, 286x258px) Image search: [Google]
1495766556416.gif
3MB, 286x258px
>>61615168
>>
>>61615107
>>61615155
Is this a Markov chain shitpost generator?
>>
New thread:

>>61615327
>>61615327
>>61615327
>>
>>61611027
https://en.wikipedia.org/wiki/Peano_axioms
>>
File: 149189240084.png (219KB, 722x768px) Image search: [Google]
149189240084.png
219KB, 722x768px
IntelliJ IDEA, NetBeans or Eclipse?
>>
>>61614305
>what is asynchronicity
>>
>>61615497
Option D) None of the above
>>
>>61615548
Then what?
>>
>>61609601
static_assert?
>>
>>61615497
>>61616645
vim
Thread posts: 318
Thread images: 53


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