[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: 327
Thread images: 29

File: mfw_he_doesnt_understand_monads.jpg (3MB, 3872x2592px) Image search: [Google]
mfw_he_doesnt_understand_monads.jpg
3MB, 3872x2592px
What are you working on, /g/?
Old thread: >>60572220
>>
File: 1469088417817.jpg (250KB, 1280x720px) Image search: [Google]
1469088417817.jpg
250KB, 1280x720px
Rewriting Rust in CoC.
>>
>>60578271
First for C
>>
File: 1476220448644.png (421KB, 3840x2160px) Image search: [Google]
1476220448644.png
421KB, 3840x2160px
>>
>>60578271
>no anime picture
0/10 thread
>>
File: spjJun06.8-e1470732652301.jpg (325KB, 2136x3216px) Image search: [Google]
spjJun06.8-e1470732652301.jpg
325KB, 2136x3216px
>>60578295
SPJ >>> Anime
>>
File: 1493431604092.jpg (41KB, 314x336px) Image search: [Google]
1493431604092.jpg
41KB, 314x336px
>>60578295
There is a form of anime on the whiteboard.
>>60578304
That won't be true even if he actually un-cripples his language.
>>
>>60578304
>>60578321
spj is one of my favourite 2ds
>>
>>60578292
generating random text is like the most boring application of markov chains and it's shameful that no "programming challenge" ever seem to do something interesting with them
>>
>>60578389
what other applications do markov chains have
>>
>>60578401
Have you heard of Page rank? It's used in search algorithms.
>>
>>60578401
modeling weather in a video gayman
>>
>>60578417
Oh, I didn't know that. Looks like I'll try giving Page rank another read.
>>
Doing an assignment for a class which focuses on ARMv7 assembly.

Basically, we are writing a program that will play a tune/baseline for a song out the mp3 port. We have access to a HAL library, so all we have to do is tell it to either play an amplitude of 0x7fff or 0x8000 for peaks and valleys of a square wave.

The current assignment is to get two development boards to communicate; one being the sender and another being the receiver. I managed to get the protocol working fine (p2000 protocol), but I had this weird bug where I couldn't hear any data on the receiver.

On the earlier assignments, when you wrote to r0 to specify whether you wanted to play 0x7fff or 0x8000, the function would only take the least significant 16 bits. As a result, I was chucking the whole register which included both frequency and amplitude into the register which would hold amplitude as an argument.

Turns out this doesn't work for the library provided for this assignment. Spent the whole day debugging it and finally found it tonight.

So goddamn happy it works now.
>>
Is there any case of a functional programming language beating a low level language in performance?
>>
>>60578608
What is a ``functional programming language" and what is a ``low level language"?
>>
File: rust.png (40KB, 635x371px) Image search: [Google]
rust.png
40KB, 635x371px
>>60578608
Rust.
>>
>tfw you realize that C++ generics are useless
==> list.h <==
#define LIST(T) struct T ## _list

#define DEFLIST(T) LIST(T) \
{ \
T head; \
LIST(T) *tail; \
}

#define CONSLIST(T, y, x, l) \
do { \
LIST(T) *p; \
p = \
(LIST(T) *) malloc ( \
sizeof (LIST(T))); \
if (p != NULL) { \
p->head = (x); \
p->tail = (l); \
} \
y = p; \
} while (0)

#define FREELIST(T, l) \
do { \
LIST(T) *p; \
p = (l); \
while (p != NULL) { \
LIST(T) *next; \
next = p->tail; \
free (p); \
p = next; \
} \
} while (0)
==> main.c <==
#include <stdio.h>
#include <stdlib.h>

#include "list.h"

typedef short int short_int;

DEFLIST (short_int);

static void print_list (const LIST(short_int) *l) {
while (l != NULL) {
printf ("%d ", l->head);
l = l->tail;
}
printf ("\n");
}

int main (void) {
LIST(short_int) *l;
l = NULL;
CONSLIST(short_int, l, 2, l);
CONSLIST(short_int, l, 10, l);
print_list (l);
FREELIST(short_int, l);
return 0;
}
>>
>>60578638
>generics
What is a "Generics"?
>>
>>60578638
how exactly are they useless?
>>
>>60578638
>ribbit the reddit frog
>>>/r/abbit/
>>
File: parametric.png (616KB, 680x954px) Image search: [Google]
parametric.png
616KB, 680x954px
>>60578638
>>
>>60578655
>t.sanjai the contrarian trying to fit in faggot
>>
>>60578653
The only reason to use C++ instead of C is templates. But I just realize that I can do templates without C++. So saying that generics are useless in C++ just mean that C++ is useless.
>>
>>60578638
>C++
>Generics
>typedef short int short_int;
>CONSLIST(short_int, l, 2, l);
So... this is the power of C... woah
>>
>>60578680
>The only reason to use C++ instead of C is templates.
lol
>>
>>60578687
I never say that C is perfect.
>>
>>60578680
>generics
What is a "Generics"?
>>
>>60578680
> I can do templates without C++
No, you can't.
>>
>>60578704
You are trying too hard, fuck off
>>
>>60578705
Really? Are you claiming sepples is the only language which has something comparable to "t*mplates"?
>>
>>60578711
>trying too hard
What is a ´Trying too hard´?
>>
>>60578696
>said the angry shitposter as he unleashed his righteous fury
>>
>>60578711
What do you mean by this? I'm not quite sure I understand.
>>
>>60578680
The only reasons to use C instead of C++ are if you are working on an OS kernel, drivers or if you are a schoolkid learning programming.
>>
>>60578742
C is minimal, easier to grasp
>>
>>60578715
No, I'm saying whatever preprocessor magic you're going to use you won't be able to produce in pure C anything comparable with templates in speed, type-safety, and convenience.
>>
>>60578756
>I'm having problems grasping serious programming languages
You should consider switching to Go then, it was designed with people like you in mind.
>>
>>60578766
>C++ templates
>speed
>type safety
>convenience

Yes, C could never reach those lows
>>
>>60578766
I don't use t*mplates or C though. You seem to use them though so I'm not sure I can trust you.
>>
>>60578628
Eg. Haskell vs C/Rust
>>
>>60578781
Go is too complex and bloated of a language for any practical programmer.
>>
>>60578781
I don't thing you understand. C++ is too big to master, the STL itself is massive.
>>
>>60578790
This doesn't help. With this information I can only answer "Is there any case of a Haskell beating C/Rust in performance?", which wasn't the original question.
>>
>>60578756
It's good for schoolkids to show how the basic data structures, OOP such as virtual method tables and sheeeiiit are implemented.
>>
Every somewhat serious C++ project I've encountered at work tends to stay away from any "fancy" C++ feature. No templates, overloading, exceptions. Rtti, stl, and boost are out of the question. It's like C plus a tiny bit of sugar.
>>
Writing a language a thousand times faster than C, yet completely safe
>>
>>60578289
How to CoC Misaki-san?
>>
>>60578812
>POO
Stopped reading right there. Fuck off to some other website.
>>
>>60578829
He wasn't talking to you
>>
>>60578817
so how many projects have you encountered? like.. 2?
>>
>>60578782
>a C toddler trying to be funny
http://martin-ueding.de/en/articles/qsort-vs-std-sort/index.html
http://www.geeksforgeeks.org/c-qsort-vs-c-sort/
>>
>>60578821
Same here, but my language will only be 700 times faster.
>>
>>60578843
>geeksforgeeks
"Epic" as we "Say". "Cool".
>>
>make decent language(chapel)
>make such compiler that libraries compiled with it can only be used from c and not from chapel
Is that even legal?
>>
File: 1480702845363.jpg (56KB, 645x773px) Image search: [Google]
1480702845363.jpg
56KB, 645x773px
>>60578802
>C++ is too big FOR ME to master
>STL itself is too massive FOR ME
As I've said, you can switch to Go anytime.
>>
>>60578829
What's your problem, kiddo? They just encourage you to learn lambda calculus. OOP is originated from Simula and Smalltalk, it gained the popularity because it's easier to maintain large projects.
>>
>>60578843
>>a C toddler
who are you referring to?
I don't use C
>>
>>60578790
Rust is more functional than many so-called "functional" languages tho.
>>
>>60578866
how so?
>>
>>60578857
Ignorance. It's such a bliss, isn't it?
>>
>templates
>more type safe than macros
no
>>
>>60578866
rust is literally LISP in javascripts syntax
>>
Does anybody here even know how to program anything more than a fizzbuzz?
>>
>>60578861
>What's your problem, kiddo?
I don't like bad languages.
>They just encourage you to learn lambda calculus
Which one though?
>POO is originated from Simula and Smalltalk
Both of which are disgusting "languages" no sane person would ever touch.
>it gained the popularity...
Doesn't mean it isn't complete and utter trash.
>>
>>60578817
>Every somewhat serious C++ project I've encountered
Like, both of them? Look at LLVM/CLang, Qt, Tensorflow, Swift compiler, WebKIT/Chrome, Firefox, etc. for modern C++ code.
>>
>>60578883
Nope... Sadly I can't program even that.
>>
>>60578885
Hi Uriel
>>
>>60578766
Explain to me where >>60578638 is not type safe or fast?
>>
>>60578866
What is a ``functional language"?
>>
What's polymorphism?

When you overload a function name by using different parameters?
When you exploit the type-compatibility between pointers to derived classes and pointers to base classes?
Templates?
All of them?
What should I say if they ask me about polymorphism in interviews?
>>
>>60578883
Sure
>>
>>60578883
>/g/
>capable programmers
wrong website m8
>>
>>60578907
Sorry, can't read that.
>>
>>60578885
>smalltalk
>disgusting
no

Also, the message-passing based OOP of smalltalk is completely different.
>>
>>60578909
Make your own opinion anon.
git clone https://github.com/ocaml/ocaml.git && \
cd ocaml && \
./configure -prefix "$HOME/local" && \
make -j world && \
make -j bootstrap && \
make -j opt && \
make -j opt.opt && \
make install && \
rlwrap ocaml
>>
>>60578913
polymorphism literally means "many forms"
a thing that takes "many forms" is polymorphic
>>
>>60578913
None of them.
>>
>>60578927
>completely different
I don't know why you think that it somehow makes it less shit. I know that it's not J*va-like POO, but it's still POO.
>>
>>60578920
So you, an ignorant, think that you're allowed to speak?
>>
>>60578931
I don't think the interviewer means what the word means etymologically
>>
Modern way to write a compiler?
I read that yacc or bison are not used anymore. What is used now?
>>
>>60578939
Then?
>>
>80 posts in
>Not one single constructive and intellectual post
>>
>>60578928
So is ``Ocaml" the only ``functional language"? I need a decision algorithm.
>>
>>60578885
>I don't like bad languages.
Well, no one forces you to use them. The languages are just tools, not a religion.
>Which one though?
Typed lambda calculus, I guess.
>Both of which are disgusting "languages" no sane person would ever touch.
A sane person can also know how for example virtual method tables are implemented in compilers.
>Doesn't mean it isn't complete and utter trash.
May be.
>>
File: 1491221616216.gif (703KB, 798x899px) Image search: [Google]
1491221616216.gif
703KB, 798x899px
>>60578942
You probably know nothing about message passing OOP, it's literally the purest form of programming. Read your SICP and stop talking about things you have no idea about.
>>
>>60578945
that's where the word comes from you dip

>parametric polymorphism
many forms - Vector Int, Vector Float, ...
>ad hoc polymorphism
many forms - (==) @Int, (==) @ Float
>subtype polymorphism
many forms - car.wheels, truck.wheels
>>
>>60578907
> not type safe
You have to write the right type every time, how is it safe.
>fast
It's a fucking linked list, the slowest array-like data structure out there, std::vector will rip it to shreds.
>>
File: 1494541901812.jpg (105KB, 473x496px) Image search: [Google]
1494541901812.jpg
105KB, 473x496px
>>60578974
>You have to write the right type every time, how is it safe.
... that's literally what type safety is
the less you write the type the less safe
>>
What seperates successful programmers from unsuccessful ones? Everyone on here sounds smart so surely you guys have useful skills no?
>>
>>60578956
stop doing ``this"
>>
>>60578873
Rust is basically Haskell 98 with C-like syntax and without GC.
>>60578881
Lisp isn't even FP language.
>>
>>60578979
This is wrong though. Type safety should make it so you only need to write the type once unless casting.
>>
>>60578987
No, that's type inference or reconstruction.
Type safety has nothing to do with making you write the type less.
The stronger your type system gets, the more you need to write types
>>
>>60578974
How does writing the type every time makes it less safe?

>>60578979
>... that's literally what type safety is
>what is type inference
>>
>>60578999
Right, this is why you can program Haskell without writing any types.
>>
>>60578957
>The languages are just tools
A tool is something which has a use. A POOlang has only one use and that use is turning anything it touches into literal shit. I guess you could call that a "tool".
>A sane person can also know how for example virtual method tables are implemented in compilers.
I don't see how this follows from my statement.
>May be.
Not "may be". I'm positively stating that it has no say in quality.

>>60578971
>it's literally the purest form of programming
Only if the purest form of programming is programming with literal feces. That might actually be the case today, but I don't subscribe to that retardation.
>>
>>60578982
He wants to pretend that he is a /prog/rammer.
>>
>>60579009
Haskell isn't type-safe. And by no means does it have a ""strong" type system.
>>
>>60578931
>a thing that takes "many forms" is polymorphic
My dick takes many forms: hard, soft, and semi-flaccid among others. Does that make my dick polymorphic?
>>
>>60579019
Yeah, keep talking about things that you have no idea about.
Do you even know what message-passing is? Do you even know what SICP is?
>>
>>60579005
>what is type inference
Not type safety.

>>60579009
STANDARD Haskell uses HM.
Do you know what HM is?
It's a type system that is PURPOSEFULLY LIMITED so that all types can be inferred.
Almost every GHC extension breaks that rule - Rank N Types, Existential Quantification, MultiParamTypeClasses, GADTs, all of them.
>>
>>60578802
C stands for Cancer because you're constantly fucking with pointers, you don't have classes and booleans don't exist unless you import a header.
>>
>>60578982
How else am I supposed to pretend that I'm one of those 1337 ma5ter haxxorz?
>>
>>60578982
Why?
>>60578983
What is an ``FP language"?
>>
>>60579032
Yeah, keep posting these hot opinions.
>>
>>60579042
>Not type safety.
Sure it is.

>Do you know what HM is?
No because you are using a shitty abbreviation.
>>
>>60579042
>It's a type system that is PURPOSEFULLY LIMITED so that all types can be inferred.
Which makes it into instant trash.
>>60579051
My post doesn't state a single opinion.
>>60579063
He's using an abbreviation which is blatantly clear to anyone even remotely familiar with it (and you have to be to use H*skell).
>>
>>60579033
Yes.

>>60579045
C stands for Cute.

>and booleans don't exist unless you import a header
This is false, _Bool exists.
>>
>>60579063
>Sure it is.
No it isn't, you daft idiot.
You're seriously saying a language that requires more type annotations is automatically less type safe?

>No because you are using a shitty abbreviation.
The fact you don't know HM = Hindley Milner when we're literally talking about Haskell tells me all I need to know about how little you know
>>
>>60579046
y0u (0u!d 574r5 8y !34r/\/1/\/g 1337 5|*34|{
>>
>>60579074
>_Bool
>"cute"
This is mental illness. almost as close to FP autists
>>
>>60579019
Shitload of excellent projects written in C++ prove the opposite.
>>
>Only one post ITT has code
daily """"""""""""programming"""""""""""" thread
>>
>>60579086
What is a ``FP"?
>>
>>60579088
Are you a schizo?
>>
>>60579088
How does it feel being jobless?

>>60579074
Except _Bool is just an unsigned int.
>>
>>60579102
Why?
>>
>>60579103
Everyone's got a weak point.
>>
>>60579077
>You're seriously saying a language that requires more type annotations is automatically less type safe?
No, are you retarded.

>The fact you don't know HM = Hindley Milner when we're literally talking about Haskell tells me all I need to know about how little you know
Except that haskell uses System F faggot (And I would still would not understand it if you said something retarded like SF)
>>
>>60579105
>How does it feel being jobless?
How does it feel being a wageslave indian?

>Except _Bool is just an unsigned int.
No, it is not. Read the standard retard.
>>
>>60579115
I don't even care to respond any more.
You've made a fool of yourself.
>>
>>60579134
Is this what you say when you lose an argument? Retard.
>>
>>60579096
>/dpt/
>Dead programming thread
>>
>>60578802
>the STL itself is massive.
Can't possibly be larger than Python's standard library, can it?
>>
File: c99_types.png (58KB, 564x421px) Image search: [Google]
c99_types.png
58KB, 564x421px
>>60579105
>C toddlers don't read the standard
Why am I not surprised?
>>
>>60579115
>Except that haskell uses System F faggot
Only H*skell98 does. And even that uses a T*ring-complete version of it.
>(And I would still would not understand it if you said something retarded like SF)
HM is the standard abbreviation of Hindley-Milner. Any non-retard understands this.
>>
>nobody to help me with my CoC language
;_;

Any good CoC books?
>>
>>60579146
repeating a joke does not normally make it funnier
watch:

you
you
you
>>
>>60579155
He is clearly against C, thus he is not a "C toddler".
>>
>>60579096
>>60579147
Things could be different if we had
1. Poster IDs per threads
2. Proper moderation
>>
>>60579158
There're some books on Coq out there.
>>
>>60579157
>HM is the standard abbreviation of Hindley-Milner
Never seen it used anywhere. Very standard, huh?

>>60579159
Did you get mindbroken or something? Sorry if the conversation that you had with me caused you so much pain, I would not disagree with you if I knew.
>>
>>60579131
>>60579155
"Standard C (since C99) provides a boolean type, called _Bool. By including the header stdbool.h one can use the more intuitive name bool and the constants true and false. The language guarantees that any two true values will compare equal (which was impossible to achieve before the introduction of the type). Boolean values still behave as integers, can be stored in integer variables, and used anywhere integers would be valid, including in indexing, arithmetic, parsing, and formatting. This approach (Boolean values are just integers) has been retained in all later versions of C."

C retards still stuck in 1999.
>>
>>60579181
>Code of queers
eww
>>
>>60579174
This
>>
>Write a function that given a list of non negative integers, arranges them such that they form the largest possible number. For example, given [50, 2, 1, 9], the largest formed number is 95021.

Prettiest solution wins
>>
>>60579174
Flags can be also good because I surmise there're many pajeets here.
>>
>>60579158
wtf is coc? code of conduct? how is that a language?
>>
>>60579174
>>>/feedback/
>>
>>60579189
Kys iyra

>C retards still stuck in 1999.
It says that it has that since 1999, it still has it now so I am unsure why you think that we are stuck there.

I am unsure what other point you are trying to make with your shitty post.
>>
>>60579187
Ignorance is not an excuse. That being said I'm certain you haven't even heard "Hindley-Milner".
>>
>>60579200
Pretty sure flags would degenerate the conversation in these threads even further
>>
>>60579202
What is a "/r/ibbit" and what do those have to do with it?
>>
>>60579181
sure there're some but I am looking for the good ones.
>>
>>60579212
>Ignorance is not an excuse
About what?
>>
>>60579174
And don't forget official /dpt/ code of conduct!
>>
>>60579102
FP = ``Floating Point"
>>
>>60579201
Calculus of Constructions.
>>60579189
It's like saying char can be used in place of int, therefore, char is just an int. Also, whom are you quoting?
>>
>>60579235
About standard and well known abbreviations.
Even if you haven't heard it before it's pretty fucking clear from the context that it means "Hindley-Milner".
>>
>>60579199
Dont feel like coding it

Convert ints to strings
Reverse Sort
Output in order

Can all be done with a list and map
>>
>>60579242
So who are these ``Floating Point Autists"?
>>
Writing a program that compares areas of pictures pixel by pixel and if enough pixels are a match it moves the image to another folder.
>>
>>60579253
>Convert ints to strings
Stopped reading there
>>
>>60579242
F***tional "programming'
>>
>>60579252
>About standard and well known abbreviations.
What standard? There is no standard that defines HM and literally nobody other than 4chan NEETS use that term.

>Even if you haven't heard it before it's pretty fucking clear from the context that it means "Hindley-Milner".
No it was not.
>>
>>60579259
>>60579242
>>60579102
Are you replying to yourself because no one else finds your posts worth giving a fuck
>>
>>60579266
idiot
>>
>>60579259
People who use IEEE floating point.
>>
>>60579279
terrible programmer
>>
>>60579284
At least he is a programmer
>>
>>60579032
What would you suggest instead?
>>
>>60579269
>There is no standard that defines HM
There is. I created that type system.
>No it was not.
Yes it was.
>>
>>60579290
An indian janitor is more of a programmer than he is
>>
Oh are we back to the golden ``backquote"" meme days
>>
>>60579290
If you haven't failed at it you still have your pride. It's better to be a "Non-programmer´´ than a shitty programmer
>>
>>60579293
Suggest what and for what purpose?
>>
>>60579302
>more of a programmer
What is the "scale of programmer"?
>>
>>60579314
A type safe language.
>>
>>60579316
I would like to add "is programmer scale equality decidable?"
>>
>>60579309
Non-programmers are not welcome in this thread.
>>
>>60579189
>>60579105
>>60579045
Why haven't you killed yourself yet? You are a waste of flesh.
>>
>>60578271
Shoehorning an old version of Perl into CircleCI.
>>
Why the fuck doesn't Idris have the $ operator? It's literally the comfiest thing in the entire Haskell, now I have to write ((())((()())(())((((())))) like a retarded lisp programmer.
>>
>>60579328
But there's not a single programmer in this thread?
>>
https://pastebin.com/XHxAxiLX
Magical

>>60579328
does scripting count?
>>
>>60579328
Sir, everyone can be a programmer.
>>
>>60579321
Any language listed here http://www.rbjones.com/rbjpub/logic/cl/tlc001.htm
>>
>>60579350
>does scripting count?
No. >>>/g/wdg
>>
>>60579343
>lisp programmer
Stopped reading right here
>>
>>60579350
Scripting is programming.
>>
>>60579376
you didn't miss much
>>
>>60579371
It's bash script not PHP or anything.
>>
File: 83f.png (380KB, 618x390px) Image search: [Google]
83f.png
380KB, 618x390px
>>60579341
Only C programmers can get this upset.
>>
>>60579343
Can't you define your own?
>>
>>60579343
Does it not allow you to define new operators?
>>
>>60579353
And yet people ITT fail doing so
>>
>>60579384
Go suck a Dick.
>>
>>60579343
It does tough?
Type checking .\dollar.idr
λΠ> id $ 4 + 4
8 : Integer
λΠ>
>>
>>60579403
Go find a job.
>>
>>60579391
>>60579393
I guess? I don't know, I just wonder why it isn't in the prelude while everything else is.
>>
>>60579413
>FP
>Job
???
>>
>200 posts
>3 code blocks
So this is how /dpt/ dies
>>
>>60579266
Your solution is garbage
>>
>>60579424
>FP
What is a ``FP"?
>>
File: kissbg.webm (2MB, 1280x720px) Image search: [Google]
kissbg.webm
2MB, 1280x720px
>>60578608
Haskell GHC:                    0.454930841 seconds time elapsed
OCaml: 0.747779583 seconds time elapsed
F# Mono: 4.429195035 seconds time elapsed

C clang: 9.971914301 seconds time elapsed
C++ clang++: 5.518077517 seconds time elapsed
C++ G++: 4.659448453 seconds time elapsed
Rust rustc: 6.583698221 seconds time elapsed
>>
>>60579426
>coding
We are not pajeets here.
>>
>>60578949
Every sane language implementation uses a custom hand written parser so you get maximum control and good error messages.
>>
>>60579438
Latest one
Haskell GHC:                    90.454930841 seconds time elapsed
OCaml: 70.747779583 seconds time elapsed
F# Mono: 44.429195035 seconds time elapsed

C clang: 9.971914301 seconds time elapsed
C++ clang++: 5.518077517 seconds time elapsed
C++ G++: 4.659448453 seconds time elapsed
Rust rustc: 6.583698221 seconds time elapsed
>>
>>60579438
Nice meme
>>
>>60579459
>meme """benchmark""" programs

kys redd*t
>>
wtf I hate haskell now!
Haskell GHC:                    88910.454930841 seconds time elapsed
OCaml: 7570.747779583 seconds time elapsed
F# Mono: 4104.429195035 seconds time elapsed

C clang: 29.971914301 seconds time elapsed
C++ clang++: 115.518077517 seconds time elapsed
C++ G++: 994.659448453 seconds time elapsed
Rust rustc: 621.583698221 seconds time elapsed
>>
What's the best way to learn web development bascis ? So HTML, CSS, PHP and Javascript
>>
>>60579484
Kill yourself
>>
>>60579465
read this sentence.
>>
>>60579478
>meme
>kys
>>>/r/ibbit
>>
>Reverse a number. Given 123 it should output 321
proc reverseNumber
over 1 < @end if
10 *
over 10 % +
swap 10 / swap
reverseNumber
end

getln 0
reverseNumber
println

please rate
>>
>>60579484
HTTP/CGI + Sh/C/Scheme
>>
>>60579489
I just did. I can't find the word "coding``
>>
>>60579490
>ribbit
>>>/p/lebbbit>>60579497
>>
>>60579492
trash
>>
>>60579484
>>>60558866
>>
>>60579497
>hey look at me!!! I pretend to be from /prog/
retard
>>
>>60579503
>/p/lebbbit
>>>/r/ibbit
>>
>>60579492
too many lines

>>60579497
read this sentence.
>>
>>60579512
Who are you quoting?
>>
/tkt/: Thursday Koding Thread
>>
>>60579519
>>60579497
>>
>>60579484
This is a post that should only be replied to with
>>>/g/wdg

Please talk about actual webdev in /wdg/.
>>
>>60579404
Wew, it looks like it does, I'm such a retard.
Why doesn't the author use it anywhere in the book or the documentation then? I've just assumed it doesn't have it.
>>
>>60579521
>>60579529

read this sentence.
>>
File: 1481030175140.png (633KB, 1280x720px) Image search: [Google]
1481030175140.png
633KB, 1280x720px
>>60579492
Almost cute. I recommend either '_' instead of c*melCase or just lower case for everything. Or at the very least consistent c*melCase.
>>
Excuse me sirs and gentlemans
What MML (Modern Meme Language for you plebs) should i learn?
>>
>>60579530
>Please talk about actual webdev in /wdg/.
What is an "actual`` webdev? What webdev is not an ``actual" webdev?
>>
>>60579492
rated
>>
>>60579540
none
>>
>>60579536
>>60579529
>>
>>60579521
You are not welcome in either board :)
>>
>>60579531
I just assumed any sane language with Haskell-like syntax would have it.
>>
>>60579540
What ever you do, don't learn malbogne.
>>
>>60579540
Malboge with OOP.

jobs starting at $102K, because no one knows it
>>
>>60579540
Go
>>
>>60579538
>I recommend either '_' instead of c*melCase or just lower case for everything
This causes cancer.
>>
File: olympus.jpg (18KB, 572x359px) Image search: [Google]
olympus.jpg
18KB, 572x359px
Current state of /dpt/
>>
>>60579585
I am enjoying it, fuck off.
>>
File: 1371336249913.jpg (9KB, 243x207px) Image search: [Google]
1371336249913.jpg
9KB, 243x207px
>>60579538
cuteness is the driving factor in the development of this language
all lowercase would just get confusing. using '_' is just as ugly as c*melcase though
>>
>>60579585
c00l :)
>>
>>60579599
Same "here``
>>
>>60579492
AIDS
>>
>>60579538
>weebshit
>>>/a/
>>
>>60579585
wipe this thread off the face of earth. I hope a mod comes and rangebans everybody in this thread, including myself
>>
>>60579600
>all lowercase would just get confusing.
Then you would have to limit your names to something shorter. And I think that's quite possible with an RPN language.
>>
File: images.jpg (5KB, 225x225px) Image search: [Google]
images.jpg
5KB, 225x225px
>>60579585
It's actually more like this.
>>
>>60579637
Are you on /meem war/ naw?
Post your best, /b/ tards xD
>>
60579622 <~> 60579622
Anime is the fundamental part of imageboard culture and being disgraceful to the anime must be a punishable offence.
>>
>>60578680
Anon do yourself a favor and pick up a metaprogramming library. As fun as macros can be they won't compete with a proper tool. Same goes for templates. If you felt templates were useful you're gonna love more proper metaprogramming.
>>
Re: 60579649

Fuck you weebshit
>>
File: images.jpg (7KB, 219x230px) Image search: [Google]
images.jpg
7KB, 219x230px
>Triggered weeb
LMAO, are you having a stroke right now?
>>
>>60578680
>The only reason to use C++ instead of C is templates.
lel, no.
>>
>>60579686
>>60579669
AYY don't talk shit about my wifeu bro!! I'll shove my power rasengun up your ass
>>
>No anime.
... on an anime site.
You have a very low IQ anon.
>>
>>60579705
Not an argument, pleb.
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); and she's super duper cute and easy to prototype in! Say something nice about her, /dpt/!

>>60578290
c-chan is also very cute!
>>
>>60578974
>You have to write the right type every time, how is it safe.
Try to write the wrong type and see what happen. You're confusing type inference and type safety anon.
>It's a fucking linked list, the slowest array-like data structure out there, std::vector will rip it to shreds.
It's an example of generic in C. You're out of subject anon.

typical C++ coder

>>60579660
Do not worry, I use OCaml for everything where C is not mandatory.

>>60579705
Yes.
>>
>>60579727
fuck off no one cares about programming here especially not deadlang
>>
>>60579727
Daily reminder for you to hang yourself.
>>
>>60579538
God I want to eat out her hair
>>
File: W5AMy0P.gif (2MB, 304x256px) Image search: [Google]
W5AMy0P.gif
2MB, 304x256px
>>60579727
>>
postingInOcamlCase
>>
File: C8CqgfbW0AIwmHM.jpg (164KB, 963x1444px) Image search: [Google]
C8CqgfbW0AIwmHM.jpg
164KB, 963x1444px
>>
>>60579742
cringe
>>
>>60579755
can we still tempt andrei into FP?
>>
>>60579486
That's not really kind, i am new on the site and didnt see the other thread, you should treat people with respect even online :)
>>
File: 1494459684321.png (100KB, 450x426px) Image search: [Google]
1494459684321.png
100KB, 450x426px
>>60578271
A language which has non-terminating well-typed programs is complete and utter trash which no good programmer should take seriously.
>>
>>60579778
Not even productive corecursion in turing incomplete languages?
>>
Why are these threads so retarded holy shit
Where can I go to discuss actual programming, reddit is total cancer
>>
>>60579769
I doubt. It's such a shame he isn't a core Rust developer or even the BDFL.
>>
>>60579742
Same here.
>>60579769
What is a ``FP" though?
>>
>>60579798
Real programmers are well, programming, and these fuckers on their high horses, without a job, are left.
>>
>>60579801
>>>/r/abbit
>>
>>60579798
>Where can I go to discuss actual programming
Here. You could start by posting your question or topic you want to discuss instead of whining.
>>
>>60579727
Not type safe
>>
>>60579801
F***tional ''programming``
>>
>>60579820
please elaborate
>>
>>60579818
Yeah right every time I do that some smartass give me a meme answer thinking he is so funny
that's fucking pathetic
I really want to like /g/ but it's just constant autism everyday all year long
>>
>>60579778
Why?
>>
>>60579778
>>>/a/
Fuck off, stinky weeb EWW
>>
>>60579794
A good language won't allow non-terminating co-recursion and co-induction.
>>60579840
They are a hack for low skilled programmers. Or alternatively a tool for researchers, which aren't necessarily good programmers.
>>
>>60579857
What is a better lang?
>>
File: 1443500977688.png (835KB, 1200x1080px) Image search: [Google]
1443500977688.png
835KB, 1200x1080px
W-well, /dpt/?
>>
>>60579866
How was that in any context a response to what I said?
>>
>>60579857
>A good language won't allow non-terminating co-recursion and co-induction.
That's nonsense.
>>
>>60579881
Cute boys that dress like girls:
1: make the best girls
2: make the best programmers
3: make the best girlfriends
4: are the cutest
5: I love them!!!
>>
>>60579886
I just ask you what a better language would be.
>>
>>60579881
>>60579911
mental illness
>>
>>60579881
Debunk this:
Girl gf = new Boy();
>>Cannot implicitly convert type 'Boy' to 'Girl'
>>
>>60579881
>>60579911
I just can't help to imagine how awkward you kind of people in real life are.
>>
>>60579881
>>60579911
6: have cute feminine penises which must NOT be sucked! They should be put in chastity and learn to use their butts instead.
>>
>>60579958
class Boy : Girl {
//...
}
>>
File: mfw_reinterpret_cast.jpg (23KB, 720x405px) Image search: [Google]
mfw_reinterpret_cast.jpg
23KB, 720x405px
>>60579958
Girl* gf = reinterpret_cast<Girl*>(boy);
>>
>>60579894
Why is that?
>>60579928
Your question doesn't make sense in this context.
>>
>>60579967
I someone was to talk to me in real life I would cry and run away.

>>60579985
>Girl*
Girl *
>>
>>60579987
A good language can talk about meaningful infinite structures
>>
>>60579987
Are you trolling?
>>
>>60580004
In what way is "infinite" non-terminating?
Is the type of natural numbers somehow "non-terminating"? So even inductive types are now "non-terminating"?

>>60580011
Really now?
>>
I unironically have an erection from browsing this thread and reading about cute girls(male). Too bad I'm at work right now.
>>
>>60580024
A stream is non-terminating.
>>
>>60580024
What is so difficult to answer about >>60579866?
>>
>>60578638
Why are you casting the return value of malloc? Sepplesfag unmasked!
>>
Hey /g/

How realistic is it to have an sql database with, say, 3 ints and 2 strings per row, and in the order of 10^5 to 10^6 rows, on a personal computer?

in particular, lets say i want to calculate the mean of one of those columns, would it be reasonable to expect this to take a few minutes to an hour at most?
>>
>>60580036
This would imply a proof of inconsistency for every major theorem prover. I suggest you share your discovery.
>>60580038
The question doesn't make sense in the context it was asked in. I can't answer it.
>>
>>60580079
How does it not make any sense? I ask you what would be a better language than Haskell.
>>
>>60580047
I don't know SQL well but minutes sounds excessive for that few values. All of that fits in memory so it shouldn't take more than a millisecond if you have a good implementation for your task. Which SQL may not be but I don't think you could reasonably make the process this slow.
>>
>>60580095
>I ask you what would be a better language than Haskell.
Any language is better than trashkell. The bigger question is, if trashkell's garbage collection is fundamentally flawed
>>
>>60580047
One million rows is nothing.

The only issue you'll run into is trying to do a non-indexable string search, potentially.

Add in columnar storage and it can be near instantaneous.
>>
>>60580095
Are you sure you're replying to the correct person? I never mentioned Haskell.
>>
>>60580114
>Any language is better than trashkell
But >>60579778 disagrees.
>>
>>60580079
>This would imply a proof of inconsistency for every major theorem prover. I suggest you share your discovery.
A stream is a non-terminating VALUE.
>>
>>60580126
Did you even read the post? It doesn't imply that every language is better than Haskell.
>>
>be on Tinder
>no matches
>mention I am a Code Artisan on my profile
>wake up
>10 matches, 2 superlikes
jokes on dem gals though, I am actually a C++ programmer
>>
>>60580124
>60579778 disagrees
Don't bother him, he's a weaboo. That alone makes his opinion discardable
>>
>>60578271
I learn programming ( html and css )
>>
>>60580139
What does Haskell have to do with anything?
>>
>>60580119
What language were you talking about >>60579778 then? And what language would you suggest that a good programmer would take seriously.
>>
>>60580154
I learn programming ( json and mongodb )
>>
>>60580041
>Why are you casting the return value of malloc? Sepplesfag unmasked!
Oups. Bad reflex. Thank you for pointing it.
>>
Great thread fags
>>
New thread:
>>60580178
>>60580178
>>60580178
>>
>>60580126
That doesn't imply it causes a program to be non-terminating.

>>60580159
I replied to the wrong post.
It was meant for >>60580124

>>60580161
>What language were you talking about
Did I suggest I was talking about some language?
>And what language would you suggest that a good programmer would take seriously.
A language which is the opposite of what I described in that post.
>>
>>60580195
>Did I suggest I was talking about some language?
The fact that you replied to OP and considering the picture of OP I assumed that you were talking about Haskell.

>A language which is the opposite of what I described in that post.
Such as? Idris?
>>
>>60580184
/g/ is a slow board you idiot
>>
>>60580225
>I assumed that you were talking about Haskell
I wasn't.

>Such as? Idris?
No, in Idris it's trivial to define a function which matches any type whatsoever.
f = f

But it has an optional totality checker, which already makes it better than Haskell (assuming you use it all the time and don't import non-terminating code).
Or you can prove the termination of your code on paper if you have to, that's the only acceptable alternative.
>>
>>60580279
>No
What language should one use then?

>in Idris it's trivial to define a function which matches any type whatsoever.
Is this that bad?
>>
>>60580170
Yeah no problem anon, luv ya!
>>
>>60580299
>What language should one use then?
I already said that you could use a subset of Idris.
>Is this that bad?
Yes. Why would it be good? Certain types simply aren't possible in a system which makes sense.
>>
File: 1493926689915.jpg (134KB, 1280x720px) Image search: [Google]
1493926689915.jpg
134KB, 1280x720px
>>60579949
Fuck off, i bet you fuck girls, fucking faggot.
Thread posts: 327
Thread images: 29


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