[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - daily programming thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 36
File: 20149546.jpg (109 KB, 403x405) Image search: [Google]
20149546.jpg
109 KB, 403x405
Haskell Master Race Edition

Old: >>54874365
>>
https://www.youtube.com/watch?v=I94qbWBGsDs
>The person giving presentation is Mencius Moldbug, who is like the next Hitler or something. Always had this sketchy feeling that the whole Haskell community are actually crypto-nazis, while liberal people are more predisposed towards the languages like Ruby.
>>
WAYYY too early.
Saged.
>>
>>54877214
>memegenerator dot net
>csharp dot net
>csharp dot meme
>>
>>54877238
Is that good parts all blank pages?
>>
>>54877262
No, but it is double spaced
>>
What can Haskell do that Lisp can't do just as well?

>protip: nothing
>>
>>54877214
C# is an abbreviation for Cute Sharp!
>>
>>54877214
What's so good about Haskell? I've started learning programming for myself and currently reading Automate Borring Stuff with Python, but should I just learn Haskell after?
>>
>>54877278
C# is an abbreviation for Cill yourself
>>
>>54877273
Write literally any program without brackets
>>
>>54877288
That appears to be pronounced as 'sill'!
>>
>>54877285
>What's so good about Haskell?
nothing except you can be a super smug pseudointellectual and pretend that others just don't "get it"
>>
Haskell is fucking cancer.
>>
>>54877315 >>54877317
4 .pyth have been added to your account
>>
>>54877315
pls stop regurgirating this leftist propaganda
>>
friendly reminders that actual trannies use haskell
>>
>>54877315
This, pretty much.

Haskell?

More like HACKFAIL LOL
>>
Haskell would be good if it wasn't so unpolished.
>>
>>54877345
No that's C
>>
>>54877345
So?
>>
>>54877345
>>54877367
No that's Ruby
>>
>>54877273

Haskell is designed with functional programming in mind. Lisp is more general-purpose.

You can do functional programming in Lisp to some extent, depending on what flavor of Lisp you're using. But you can't do it as well as you can with Haskell. It's the difference between a specialized tool vs. a general tool - the specialized tool works really well for what it's designed for, but the general tool works for the stuff that the specialized tool can't do.
>>
>>54877377
trannies are gross
>>
https://geekfeminism.org/2012/09/29/quick-hit-how-git-shows-the-patriarchal-nature-of-the-software-industry/
>>
>>54877528
Patriachy > Matriarchy and everyone knows it
Matriarchy is inherently unstable, partly because women are inherently unstable
>>
>>54877528
>https://geekfeminism.org/2012/09/29/quick-hit-how-git-shows-the-patriarchal-nature-of-the-software-industry/
That's a gem, thanks bro.
[spoiler]It ai'nt prooving SHET[/spoiler]
>>
>>54877548
Feminists don't even use that term correctly.

They have their own definition which is basically societal gender norms while everyone else has patriarchy to mean a familial structure where the oldest male (the patriarch) is the leader
>>
>>54877528
Why don't they write an article about how books are transphobic because they don't magically change your name when you become a tranny?
>>
File: parallelconcurrenthaskell.jpg (795 KB, 2100x2756) Image search: [Google]
parallelconcurrenthaskell.jpg
795 KB, 2100x2756
Is this good?
>>
>>54877776
yes
>>
It's a gamedev repost! Wow! Last thred is ded that's my excuse

I've been thinking about developing a Minecraft Clone engine for years now. I've more-or-less worked out the architecture of the engine (but not the rendering algorithms, since those depend on the hard question of "How pretty do I want it to look, at the expense of not letting poorfags play?").

What I want is a few highly-optimized native code modules, which are imported (embedded? I don't really know the terminology) by a scripting language, which then does all of the glue and high-level code. Message-passing would be used heavily, and a lot of stuff would work off of some standard APIs which could have any number of backing implementations.

So, what I'm wondering, is...

For the native code, do I use C or Rust?

and

For the scripting language, do I use Python or something else? Python is really designed around the kind of architecture I have in mind, but the problem is that Python really hates multithreading. Stackless Python is weird but I could look into that, I guess. Lua is for putting into your C applications, not the other way around. I have never used Ruby. JavaScript is hahaha no.
>>
>>54877837
>minecraft engine

You and everyone else who is trying to ride that cash wave is making a minecraft or has made a minecraft engine. I'd try something else, mate.
>>
>>54877857
Literally all of the clones have made tonnes of $$$
>>
>>54877857
>you can only program for the purpose of making money
>>
Reminder:
You are all faggots if you don't use either APL or FORTH
>>
So I am trying to download a FITS image using a python post request.

When I use HTTPResponse.read(), python fucks up the encoding and scrambles the image.

The content type of the response is an octet-stream. How do I wrote this as a binary into a file?
>>
>>54877837
You'll get brownie points if you make a noteworthy game in Go. It's built for easy concurrency and is simple like Python. You could probably skip the optimized modules due to its good performance.

https://github.com/veandco/go-sdl2
>>
>>54877918
J is better than APL desu
>>
Jesus fucking Christ you guys are retarded.
>>
>>54877857
>You and everyone else who is trying to ride that cash wave

I'm going to make a confession, here

I have super mega butthurt because every internet cynic assumes there can be no other reason to want to make a voxel engine

I don't care if an actual game results with this, I just want to fuck with coding problems related to a 3D grid game-space, because they're interesting. I'm fully aware that I won't make any money off of this. That's not the point.

pls senpai
>>
>>54877952
thxm8
>>
>>54877273
Both are equally good for dumbing down the CS curriculum and producing a class full of idiots.
>>
>>54877285
I'm a beginning programmer ad well, but out of Java and Haskell, Haskell just feels much cleaner to work with
>>
>>54877918
APL is unreadable and Forth is too awkward. Come back when you have taste.
>>
>>54877918
Factor is better than FORTH desu
>>
$ curl --silent 'http://boards.4chan.org/g/thread/54877214/dpt-daily-programming-thread' \
| grep -o 'href=...i.4cdn.org.[a-z]*.[0-9]*\.[webm|jpg|jpeg|png|gif]*' \
| sed 's/^.*\/\///g' \
| xargs wget -nc -q


rate my 4chan thread scraper for images etc B)
>>
>>54877981
Haskell is miles better than Java, but both are trainwrecks. Pick up some C# or F#.
>>
>>54877932
Go's lack of generics is a big problem. Its fuckshit crazy dependency management system is a big problem. It has a garbage collector and for videogames that's the biggest problem.

That said, I was originally thinking of making this in Go.
>>
Urbit is the future why dont you all learn hoon.
>>
>>54877978
pajeet pls
>>
>>54878013
10/10. Well meme'd my friend. :^)
>>
>>54877417
You can always write a haskell in lisp. Actually first haskell compiler was done this way.
>>
>>54878052
B-but you can also write lisp in haskell
>>
Functional programming is a meme.
>>
>>54878052
>>54878067
https://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours
>>
>>54877921
Open the file in binary mode?
>>
File: 1461880737783.jpg (103 KB, 1300x955) Image search: [Google]
1461880737783.jpg
103 KB, 1300x955
>>54878072
Nice meme
>>
>>54878072
>all memes are bad
bigot get out
>>
Almost no programs are written in Lisp or Haskell, but the shills take over threads and forums everywhere. Why?

How can these programming languages have more shills than users?

They make extraordinary claims about Lisp or Haskell being more productive, but never produce anything in these languages. The same people who say Lisp or Haskell are superior are unable to prove it.

https://news.ycombinator.com/item?id=1016583
>>
>>54878276
What are you talking about? This thread is full of anti-Haskell shills
>>
>>54878276
an extremely vocal minority
probably less than 100 users worldwide are making all the english-language arguments in favor of haskell
>>
>>54878276
Like your link says, Lisp is awesome because of how easy it is to build your own things instead of making libraries.

Second of all, languages are usually adopted by businesses based on social status (ex. they're established in a particular niche) rather than technical merits.
>>
>>54878373
You're exaggerating. Haskell is pretty viral - see plebbit.
>>
>>54878008
What is a trainwreck to you is useful to another.

What makes it a trainwreck?
>>
>>54878398
It's pretty easy to fluff up haskell when a haskell zealot owns the r/haskell subreddit
>>
What do you guys think of Scala? Thinking of learning just for the popularity and compensation.
>>
>>54878427
Java is renowned for being verbose. Haskell is bandaided (has like a million language extensions).

Java is poorly designed (and suffering heavily due to maintaining backward compatibility) and Haskell is unpolished, commonly thought of as a research project.
>>
>>54878459
Is Java usefully verbose? Does Haskell work properly with these extensions?

Haskell may be unpolished, but why? And why is Java "poorly designed"?
>>
>[2] Consider Linux: the poster child of successful free software. It is a knockoff of a 1970s operating system well past its sell-by date. This is because a herd simply cannot innovate, whether for fun or for profit. Every innovative work of mankind has been the product of one – sometimes two, rarely three – minds. And never the work of a herd. No mathematical theorem, no enjoyable novel, no work of art of any importance, have ever been produced by a herd. I fail to see why innovative software ought to play by a different set of rules.
>>
>>54878276
because their language is so unsuitable for projects, they have plenty of free time to shill for their language.
>>
>>54878427
Both java and haskell are shitty static languages. It's like debating pros/cons of cow dung vs dog poop.
>>
>>54878492
Most find Java's verbosity painful, but you won't understand that if you don't know many languages, Blub Paradox and all that.

Haskell extensions do work properly but it's still a pain to track and make sure you're using all the extensions necessary for the language to not suck for what you're currently doing.

Haskell is unpolished because it's maintained by students and researches who want to avoid success [at all costs]. They're not interested in popularity but they are interested in discovery and investigation, so refinements are neglected in favor of trying new things.

Java is poorly designed because it was designed 20 years ago when the industry was 1) very different and 2) knew less about what works well. After that it's all about maintaining backwards compatibility to appeal to businesses (who need their legacy applications to keep working).
>>
>>54878539
Just because a statically typed language forced you to write correct code doesn't mean it's bad.
>>
>>54878276

I don't know much about Haskell, but Lisp has its uses. JPL used it on a lot of their probes, for instance. Scheme is used behind the scenes for a lot of GNU stuff. There's Emacs, of course, and IIRC some Autodesk software uses Lisp as an extension language.

Mostly people say that learning Lisp makes you a better programmer, because you approach your code a different way. I know I got a lot of insight from working with it. I imagine it's the same for Haskell, although really any functional language would probably work.

One of these days I'll try picking up something like Haskell or ML just for the learning experience.
>>
Say I had a file that was a terabyte array of integers and I needed to sort it or do something that required me to bounce around in it. Obviously I cant hope to open the file and load it to the ram. So how exactly do I go about moving through the file.
Im instincts tell me that I probably ask the os for the pointer to the file. So Im assuming theres a way to get a pointer to a file in say c++ without trying to open the file.
And then from there if I know how the file is organized I can just jump around as need be.
>>
Is there anything Haskell can't do?
>>
>>54878640
Is there anything brainfuck can't do?
>>
>>54878640
performance
>>
>>54878640
be fast and usable.
>>
>>54878640
Keep your startup in business.
>>
>>54878653
>>54878673
>>54878674
>>54878691
thanks for the (You)s
>>
>>54878494
thnx4sharing
>>
>>54878697
(You)'re welcome
>>
>>54878605
>Java is poorly designed because it was designed 20 years ago when the industry was 1) very different and 2) knew less about what works well. After that it's all about maintaining backwards compatibility to appeal to businesses (who need their legacy applications to keep working).

Then it's anachronistic in its design philosophy and not "poorly designed". Would you fault C for all its quirks while still acknowledging that it was developed when memory was literally woven by hand?


>Haskell is unpolished because it's maintained by students and researches who want to avoid success [at all costs]. They're not interested in popularity but they are interested in discovery and investigation, so refinements are neglected in favor of trying new things.

You need to define "unpolished" and "success". Obviously they have different goals.
>>
>>54878795
We can argue semantics about Java all day, it's still a widely hated language that the industry should move past.

Google "haskell avoid success at all costs" for the Haskell motto. By unpolished I mean hard to use.

I suspect you're drawn to these two languages because they're all you know and I strongly recommend you try a variety of other languages and let go of any religious beliefs. They'll only hurt you.
>>
new thread WITHOUT SWATISKA
>>54878937
>>54878937
>>54878937
>>54878937
>>
>>54878607
My code is correct, all the typing is done in my head. My static friends said that I'm probably a good programmer if I can write correct code without explicit typing.

Self-discipline (^:
>>
>>54878874
Fine, but I think you should acknowledge the benefits of functional programming (though maybe not exclusively Haskell). Uncle Bob (Richard C. Martin) has some good talks about it.

If you're wondering, I've used C, C++, Java, and Haskell to see how things are done in strictly imperative/OO/functional languages and so far functional languages seem the most "correct" in the way I define it.
>>
>>54878637
fopen fseek fread

mmap
>>
>>54878956
For the record I think functional far outclasses OOP.

Also I like how Bob Martin used to be stupidly religious about static typing and now uses Clojure.

Don't get me started on his TDD dogma bullshit.
>>
>>54878945
Faggot
>>
>>54878637
actually I dont even know where to get started with this. Google doesnt really know what Im trying to ask and I probably dont either. Closest lead I have is external sorting
>>
>>54877214
Test tomorrow, Haskell, basic functions, can I borrow a typing hand?
>>
>>54879018

Haskell helper

http://cheatsheet.codeslower.com/CheatSheet.pdf
>>
>>54878795
>Would you fault C for all its quirks while still acknowledging that it was developed when memory was literally woven by hand?
Yes, because the designers of C personally used better languages when working with Multics.
>>
>>54879033
doesn't quite work, can I pass you the practive and you give me a hand?
It'd mean a lot and otherwise i'm DOOMED
>>
>>54879208
>doesn't quite work, can I pass you the practive and you give me a hand?
>It'd mean a lot and otherwise i'm DOOMED

what the fuck nigga. do you expect me to do the test for you?

are you sure you're in the right course?
>>
>>54879208
I hope you get DOOMED, BLACKED and drop out of your college, lazy firstworlder
>>
File: 1442795158737.jpg (23 KB, 409x409) Image search: [Google]
1442795158737.jpg
23 KB, 409x409
>tfw installing VA on a new machine and getting rid of intellisense
>>
std::chrono::duration<float>(deltaTimeNanoseconds).count()


vs

(deltaTimeNanoseconds)/1e9f)
>>
>>54879417
>1e9f
But #define it with a meaningful name
>>
apparently i posted on the wrong thread
can i do:
_popen("where python","r"); in c++ and not have it open a dos window?
and i dont want to use CreateProcess for something so simple, thats too much work
>>
>>54879447
1e9f = 1000000000.0
>>
>>54879334
I am, I just need help witht he part small part. I already did the other 2 parts
>>54879374
Third, sentite bobo
>>
>>54877417
Lisp is a lot older and less refined. Lisp interpreters have the advantage that they can be written from scratch relatively easily. Haskell is definitely the superior language, but try writing GHC from scratch and you'll have a bad time.
>>
File: fancy_hat.jpg (57 KB, 386x499) Image search: [Google]
fancy_hat.jpg
57 KB, 386x499
In the planning stages for a little foray into teledildonics. The idea is basically to piggy-back an AVR with a bluetooth module onto a vibrator. The AVR would then receive commands via bluetooth from a client application on a pc/phone. This has been done before of course (WeVibe etc.), but a DIY solution will be far cheaper.

Current goal is to sync vibrator power to music, though the possibilities are endless. What a time to be alive...
>>
>>54877214
>GDB is dropping the backwards compatibility to old platforms patch by patch
>reusable GDB library is planned for future and first steps taken to it
Is this gonna happen? or just memes? I don't really want lldb shit to throw GDB into the trash
>>
File: piegeon.jpg (204 KB, 1046x730) Image search: [Google]
piegeon.jpg
204 KB, 1046x730
who wants a stake in my startup
>>
>>54879669
Hi there!
You seem to have made a bit of a mistake in your post. Luckily, the users of 4chan are always willing to help you clear this problem right up! You appear to have used a tripcode when posting, but your identity has nothing at all to do with the conversation! Whoops! You should always remember to stop using your tripcode when the thread it was used for is gone, unless another one is started! Posting with a tripcode when it isn't necessary is poor form. You should always try to post anonymously, unless your identity is absolutely vital to the post that you're making!
Now, there's no need to thank me - I'm just doing my bait to help you get used to the anonymous image-board culture!
>>
File: silent tripcode.webm (3 MB, 1280x720) Image search: [Google]
silent tripcode.webm
3 MB, 1280x720
>>54879669
>>54879907
>>
>>54879907
good pasta. How am I to differenciate myself from someone who post a different program?
>>
>>54879953
Get the fuck out, we're not accepting new fucking posters you cunt
>>
>>54877986
get a load of this faggot.
what part of
 ↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵
do you not understand?
>>
>>54879447
>But #define it with a meaningful name
retard
>>
>>54879417
*1e-9f
>>
>>54879754
Good, but remember rule number one:

1. Every piece of electronics that has contact to human body should be completely autonomous, powered by battery. Any wired connection to PC or other mains-connected device is prohibited. No USB, no anything.

Good luck.
>>
File: WhenDoubtCreepsIn.jpg (51 KB, 680x320) Image search: [Google]
WhenDoubtCreepsIn.jpg
51 KB, 680x320
i read a non- english (russian) blog about technology, but i have to translate to English everytime i want to read something .

does anyone know a good webpage translator?
>>
when you're doing projects what do you use to save tasks that you still have to do or notes? do you just write in a text file?
>>
>>54880466
text file is nice, but I usually use github's issues section for that
>>
>>54880466
>do you just write in a text file?
yes
>>
>>54880556
and/or TODO comments at specific parts in the code base
>>
>>54880343
Of course! The PC connection is wireless (bluetooth), so should be no issue. The mcu will share battery with the vibrator.
>>
>>54878494
What's this from
>>
>>54880617
http://www.loper-os.org/?p=69

https://news.ycombinator.com/item?id=1016583
>>
>>54878494
linus did most of the decision making so his point fails in that regard
>>
>>54877981
that's because java is legit the worst language.
>>
>>54880635
very interesting read, thanks
>>
>>54880703
>wahhh i had a hard time in my shitty school's programming101 class
nice meme retard
>>
>>54877606
When I think of patriarchy I think of Orthodox Patriarchs and get confused because we aren't ruled by those.

Isn't hillary the democratic nominee anyways?
>>
>>54880464
>http://www.loper-os.org/?p=69
>>54880464
>>54880464
>>54880464
anyone?
>>
>>54880506
>>54880556
i mainly use bitbutcket can you create and push issues or do you have to create them manually?
>>
>>54880751
heartless hillary's only argument for winning is for SJW meme points by having had the first female president, trump is obviously a better candidate, most bernie supporters prefer trump over shillary
>>
>>54880778
What do you mean by doing it manually?
>>
>>54880818

We can only hope she doesn't win.
>>
>>54881161
Hilary Clinton is /dpt/s candidate
>>
>>54881238
no
>>
>>54881238
no
>>
>>54881285
>>54881337
Exactly, say no to Trump
>>
Any reason for me to use LLVM over GCC?
>>
>>54881238
>>54881350
kys
>>
>>54881524
Maybe you need a sane JIT target.
>>
Good site to learn programming for an absolute beginner?
>>
>>54881524
error messages
>>
>>54881667
never had any problem with -Wall, etc
>>
>>54881667
GCC error messages have gotten much better. That is not a real advantage that Clang has anymore.
>>
>>54881877
Yeah i've noticed lately. Clang's are colour coded though.

Does LLVM still compile faster or is that out the window too?
>>
>>54881994
gcc has colored error messages now, though I believe you have to specifically enable that feature through a command line option.
>>
>>54882008
>though I believe you have to specifically enable that feature through a command line option
I don't know if my distro (Arch) modifies its GCC to turn colours on or something, but I get it by default.
>>
I began to build some scrapers with cURL, what interesting things could I do with that?
>>
>>54877273
partial application
>>
>>54882008
>>54882024
Xubuntu here, getting color from gcc as well
>>
>>54879953
Prove its pasta
>>
File: weeeee.gif (495 KB, 500x443) Image search: [Google]
weeeee.gif
495 KB, 500x443
>tfw massive thunderstorms tomorrow thus leading to a high probability of C tests being canceled
>>
>>54883167

You don't want to take your C exam?
>>
File: 1462666392038.jpg (57 KB, 415x440) Image search: [Google]
1462666392038.jpg
57 KB, 415x440
>>54883167
>wanting to miss a programming test
>>
File: stopnobullypls.jpg (61 KB, 572x497) Image search: [Google]
stopnobullypls.jpg
61 KB, 572x497
>>54883200
>>54883206

I'm scared waaah
>>
>>54883230
You're not gonna make it, anon-chan.
>>
>>54883240
But I did
I just want to keep ok-ish grades
>>
File: required reading for (You).png (381 KB, 528x528) Image search: [Google]
required reading for (You).png
381 KB, 528x528
>>54883230
>>
>>54878097
Yes that was the solution. I didn't realize python had different modes for writing binary
>>
>>54883230

When in doubt, the answer is: undefined behavior
>>
>>54878276
DPT isn't full of people who are actually doing any work; it's full of memelords and neckbeards who just want to learn

In terms of learning purpose, Lisp is the best programming language.

It takes the menial aspects of programming that are nonetheless important (static typing, memory management, distinctions between compiler-time and runtime, distinctions between declaration and assignment, distinctions between strings and symbols, complicated AST, no native first-class support of functions, no TCO etc.) and toss them out of the window to allow the humans to focus on what humans have been doing best for millennia : math (specifically, lambda calculus and discrete maths).

Unfortunately, computers don't run on human math, they run on Von Neumann, and it turns out that von Neumann machines do come with those aforementioned hiccups in human ability. So a Lisp interpreter usually has to revert to an application that is written in a language that people "actually" use (usually, an interpreter written in C; although Clojure runs on pretty much everything : JavaScript engines, the JVM, CLR, etc.). Usually, if you had just written that application in the bottom, implemented language in the first place, the application would've been much, much faster for the user; so usually, 'worse' languages like C, C++, Java, etc. win out in terms of market dominance.

But Lisp isn't about the user. It's about the programmer. To quote the writers of SICP, "programs are written to be read, and only incidentally to run on the machine".

So, if you just want to learn, and don't think that you have any Facebook-level ideas brewing around in your head, it's usually best to learn Lisp and get accustomed to programming as an intellectual art rather than an economical means-to-and-end. Once you're ready to actually build something for a market, then you can think about those other, "worse", more popular languages.
>>
>>54883380
>use Lisp
But I'm straight
>>
File: trump.png (92 KB, 300x300) Image search: [Google]
trump.png
92 KB, 300x300
>>54877214

H a s k e l l i s r e d d i t f a g
a a
s f
k
e t
l i
l d
d
i e
s r

r s
e i
d
d l
i l
t e
k
f s
a a
g a f t i d d e r s i l l e k s a H
>>
>>54883380
What bothers me is the existence of languages that are both slow *and* "worse". Why does JavaScript even exist? It has the worst aspects of C-like languages (arbitrarily complicated and large syntactical rules; type coercion that leads to frequently misunderstood and unknown behaviors) combined with the worst aspects of Lisp-like languages (slow as fuck; dynamic typing really doesn't put any restrictions on the programmer which is bad if your programmers are a bunch of fucking retards that don't know how to code properly).
>>
>>54883417
>is reddit fag
What?
>>
>>54883380
Yes, but you can also use a language that's better than Lisp and all those ""worse"" languages in the first place.
>>
>>54883448
Being a newfag isn't any better than being from reddit anon. You should know that.
>>
>>54883427
>JavaScript
>Slow as fuck

Have you ever heard of a little project called V8?
>>
>>54883427
>which is bad if your programmers are a bunch of fucking retards that don't know how to code properly
Static types can't save you from them either.
>>
>>54883430
Except you'd have to learn that language's syntax. The awesome thing about Lisp (or at least, tiny Lisps, like Scheme) is that there is no syntax. Technically, all you need to be considered a "Lisp" is lambda, cond, cons, car, cdr, quote, eval. So learning "Lisp" is really just learning discrete maths that happen to run on Lisp. This makes learning Lisp a rather portable skill set; when you return to writing production C code, perhaps you won't be writing Lisp, but you will remember the elegance and power in the self-defined, recursive, and bottom-up nature of Lisp.

Perhaps other languages, like Haskell, offer more features than many Lisps do. But you'd have to learn those language-specific features. And then, when you return to "actual" programming languages used in production like C or Java, all that learning becomes meaningless.

>>54883488
Yes, actually, and V8 wasn't actually the first engine that made JavaScript fast. The idea that you can convert JavaScript to native code on the fly actually comes out of Apple : SquirrelFish Extreme (marketed as Nitro) was available in Safari since 2008. V8 just got more popular because it's multiplatform.

I digress. V8 is only "fast" relative to other JIT compilers, like the JVM or the CLR. Compared to actually running preprocessed machine code like C/C++/D/Rust ... well, that's why you don't see Crysis in Chrome just yet.
>>
>>54883535
Why were you complaining about JS being slow as fuck then? Do you want people to be able to execute arbitrary machine code in the browser?
>>
>>54883541
Yes. I'm not the only one. Google "WebAssembly".
>>
>>54883514
Then why are you spamming so many foreign memes?
>>
>>54883541
>Do you want people to be able to execute arbitrary machine code in the browser?
Why not
>>
>>54883549
Probably won't provide huge speedups over what V8 already can do with properly written JS
>>
>>54883575
Are you kidding me?
"Locate JavaScript file, do native compilation to processor instruction set, run processor instruction set"
Versus
"locate processor instruction set, run processor instruction set"

It's not rocket science. The reason that you can't play Crysis in WebGL just it isn't because there isn't a huge demand for Crysis in WebGL. Do you know how much money Valve, Blizzard, et. al. stand to make if they port their free-to-play games to a website, where casuals can just type in the URL and start playing as opposed to having to download a bunch of services like Battle.net or Steam?

The reason you can't play Crysis in WebGL is just because JIT compilation just isn't fast enough.
>>
>>54883617
>having to download 14 gigs every time into your browser cache just to play the game
>using a poverty graphics api like webgl when based d3d exists
>>
>>54883617
>The reason you can't play Crysis in WebGL is just because JIT compilation just isn't fast enough.
It's also a couple gigabytes dude.

>>54883666
>devils number
>shilling proprietary APIs
>>
File: maxresdefault.jpg (132 KB, 1500x1500) Image search: [Google]
maxresdefault.jpg
132 KB, 1500x1500
>>54883666
>you have to download all assets ahead of use
>in an internet-connected application
>>
>>54883541
You should expect something like js to be slow. It's okay to be slow if the language makes up for it in expressiveness. js is inexpressive and has retarded semantics *in addition to being slow*.
>>
>>54883722
ES6 is pretty expressive in my humble opinion
>>
>>54883704
>the bullets will be downloaded before they can fire
>>
File: 1371934990652.jpg (113 KB, 1280x720) Image search: [Google]
1371934990652.jpg
113 KB, 1280x720
>>54883722
only plebbitors use *asterisks like this*

fuck all the way back to plebbit, cuck
>>
>>54883500
Yeah, but it's relative. Some programmers are helpless (the types that take the time to learn enough programming to set up websites ... but program those websites to save passwords in plain-text). Some hackers can do magic in anything (John Carmack rewrote Wolfenstein 3D in Haskell). Some people in the middle would do decent enough work to be employable at your run-of-the-mill Shitty Startup that's going to fail in 2 years anyways or as some nameless drone in some massive B2B company, but they just need some bumper walls : static typing.

>>54883666
>>54883686
D3D is pretty awesome, but that's only because it's had so much history of development behind it. In any case, modern drivers don't really need the bloated feature sets of old APIs like pre-12 D3D or OpenGL. The push is towards much smaller, bare-metal drivers like Vulkan or new D3D, and then have engine-implementers like Unity or Unreal deal with feature sets that developers use. WebAssembly + WebGL would be like that.

And you wouldn't download the game. I think you'd keep the relatively tiny .DLLs in cache; the real culprit in terms of file size when it comes to video games is the asset size.

Here's my crazy fucking batshit insane theory - in the future, hardware will be so fast that WebAssembly will allow for "streamed" games; much like Twitch streams video content, Valve will stream executable content. If you're on a shitty network connection, Valve will just give you shittier assets (we already do this for optimization in terms of texture mipmapping and smaller models for lower resolutions) to keep ping optimal.

>>54883736
You'd have a very strange and inconsistent definition of "expressive" then
>>
>>54883756
why don't you kill kys yourself?
>>
>>54883774
downvoted
>>
>>54883774
>kys
Get suicided fagit
>>
Whats the difference between x86 and x64 when making a program. Is it just as simple as telling the compiler to switch between the 32 bit and 64 bit?
>>
>>54883535
>The awesome thing about Lisp (or at least, tiny Lisps, like Scheme) is that there is no syntax.
Lisps and Scheme have a lot of syntax.

Lisp users have a really weird definition of syntax that has nothing to do with characters, tokens, or abstract syntax.
>>
>>54883830

parens don't count.
>>
>>54883830
Having no syntax and being able to define your own AST directly is good. Syntax is what makes other languages suck, because you should not be forced to use a syntax SOMEONE ELSE decided was appropriate.
>>
>>54883763
>Here's my crazy fucking batshit insane theory - in the future, hardware will be so fast that WebAssembly will allow for "streamed" games; much like Twitch streams video content, Valve will stream executable content. If you're on a shitty network connection, Valve will just give you shittier assets (we already do this for optimization in terms of texture mipmapping and smaller models for lower resolutions) to keep ping optimal.
Or it could work 100% if the files are saved locally.

>In any case, modern drivers don't really need the bloated feature sets of old APIs like pre-12 D3D or OpenGL
Wasn't bloat taken out of OpenGL when they introduced shaders?
>>
>>54883816
32 and 64 bit pointers

8GB and 6 Trillion GB (?) memory
>>
Lisps: Prefix Syntax, Huge Runtimes, Imperformant
Forths: Postfix Syntax, Slim Runtimes, Performant

Really makes you think... why did we stray from God's Given Path?
>>
how do you make runtime packers?

https://en.wikipedia.org/wiki/Executable_compression
>>
Im using entity framework to create a WEB API.

Im using controllers, so Im using GET, POST, etc. So I have a stored procedure that recieves some parameters and then create a new record on 2 different tables.

So one little question, if anyone knows...Since every table has his own controller where should I put this stored procedure? And how should I call it?
>>
>>54883899
32 bit can address 4 gb (2^32 is around 4 billion)

64 bit can address that much squared.
>>
>>54883924
Oh, then 4GB and ~1.5 trillion GB (?)
>>
>>54883906
>Lisps
>Imperformant

not true m8. sbcl for example has a good optimizing compiler
>>
>>54883936
Nah, not that much
>>
>>54883869
but lisp does have syntax you shitter
you literally have to write polish notation for everything, and everything is considered a sequence.
All operations are done like : (function (function (function list))) etc

If you don't follow that constraint, then it's not syntactically correct. IE it has syntax.
>>
>>54883946
Still hampered by a huge runtime and, let's be honest, SBCL is the end product of half a century of research by extremely smart people trying to make Lisps of the Common Lisp lineage actually perform well. It's a testament to man's rejection of nature! A foul menace!
>>
File: I'm on the R.A.G.png (120 KB, 871x709) Image search: [Google]
I'm on the R.A.G.png
120 KB, 871x709
Trying to find a way to use formal grammars to parse binary data. Apparently its impossible with context-free grammars since chunky file formats have size tags followed by <size> tokens.

So I started looking for a way to metaprogram the grammar and found some pretty deep shit
>>
>>54883830
Depending on what Lisp you use, you have to deal with syntax. Common Lisp is especially loaded with a bunch of arcane syntax.

"Pure" Lisp (which doesn't exist, by the way; "pure" Lisp can't print to a screen which kinda makes the abstract language useless a priori) has exactly seven primitive expressions : cons, cond, car, cdr, quote, lambda, eval. You can combine these expressions using parentheses. Data is written in lambda : zero is (lambda), one is (lambda (lambda)), two is (lambda (lambda (lambda))), etc., so on and so forth.

Obviously, no Lisp is actually this simple. That's why Scheme exists : it has the lowest amount of "special" forms (define, append, display, if, and string support are all you need to build really cool things; like a Scheme interpreter written in Scheme).

>>54883874
That's the thing though. The files wouldn't be saved locally. They'd be saved on Valve HQ. Much like we don't save our e-mail or Netflix movies locally. They'd be served up to us on-demand.

Modern OpenGL is pretty bloat-less, but the driver is still pretty huge. That's why stuff like Vulkan and Mantle exist.

>>54883906
>postfix syntax
Not really. We only use postfix syntax on algebraic operators. Pretty much everything else in "popular" programming languages, like OO, is technically prefix. Imagine if you wrote Object1.m(Object2).m(Object3).m(Object4).m(Object5).m(Object6) when you mean Object1.m(2 through 6). Prefix notation just makes the logical conclusion -- why arbitrarily give any object priority if it has nothing to do with it? m(1 through 6). This makes it MUCH easier to work with data structures instead of specialized single objects. It works with data structures; it's a LISt Processor.
Performance doesn't matter when you're trying to learn. And slim runtimes just means thick compile-time, when the whole point of Lisp is making the language powerful through high-density expression as opposed to loading on static typing to the user.
>>
>>54884002
Congratulations, you are more autistic than a lisp weenie.
>>
File: Fuck.png (107 KB, 1038x704) Image search: [Google]
Fuck.png
107 KB, 1038x704
>>54884022
This shit is seriously worse than fucking Perl.
>>
>>54884022
Use a parser monad instead
>>
>>54884002
that's not true, you can make macros in Lisp to be able to use something like "(add 1 through 10)" or "(see spot run quickly)" be valid, and the LOOP function in the standard library is an example of this:

(loop for i from 1 to 10 collecting i)
>>
>>54877285
Google "reasons to learn latin". It's basically the same.
>>
File: suppose G.png (4 KB, 259x36) Image search: [Google]
suppose G.png
4 KB, 259x36
>>54884049

{ New York Daily News, Salon, DailyKos, HuffPo, Mother Jones } ∈ G
>>
>>54884094
Don't LOOP!
Iterate.
>>
File: principia_v1_p128.jpg (108 KB, 438x667) Image search: [Google]
principia_v1_p128.jpg
108 KB, 438x667
>>54884049
I'm reading the principia mathematica to see the birth of type theory, and notation in math sure have gotten better since Peano's days.
>>
File: file.png (84 KB, 1011x647) Image search: [Google]
file.png
84 KB, 1011x647
>>54884089
And how does that work?

How does that let me write a grammar that (1) reads a protocol-specified number of bits (which are the tokens), (2) decodes those bits into a semantic integer value, (3) meaning the exact number of tokens to expect immediately after the number and (4) rewrites the grammar to parse exactly that many tokens or reject the input?

>>54884135
Seriously, how is anyone supposed to read any of this crap, let alone understand it

How did this faggot even think up this shit
>>
File: principia_v1_p128.jpg (834 KB, 1826x2776) Image search: [Google]
principia_v1_p128.jpg
834 KB, 1826x2776
>>54884135
Fuckin' imagemagick, I'll never get how it works.

Also this page is in the easiest chapters.
>>
>>54884025
I heard they already do some weird thing like that with Steam Pipe
>>
>>54884184
http://www.cs.nott.ac.uk/~pszgmh/monparsing.pdf
>>
File: smug.jpg (355 KB, 774x880) Image search: [Google]
smug.jpg
355 KB, 774x880
>>54884204
How much mental masturbation was necessary to ejaculate so many symbols in that paper?
>>
>>54884234
Looking for a pure grammar solution. Something that lets me metaprogram the grammar rules inside the grammar itself with no need for any code. I suppose what I found is the best I'll ever get, since that RAG shit is literally turing complete

Because if I really wanted to, I could easily wire up my awesome Earley parser implementation in a nested structure. I built that capability right into it. It appears this is what your "parser combinators" paper is suggesting I do. Wasn't even aware this was a thing.
>>
>>54884245
Russel and Whitehead were trying to found all of mathematics on logic. The result was one of the most important book of the twentieth century that influenced maths, logic, programming languages, and analytic philosophy. Gödel's articles on provability were about the Principia's (all of mathematics) and Peano's (arithmetic) systems.
>>
>>54884297
will implement a parser monad in F# and show you
>>
File: wizard.png (199 KB, 413x374) Image search: [Google]
wizard.png
199 KB, 413x374
>>54884302
What kind of superpower do you need to have to grok the meaning of a 5-line full-width solid block of symbols
>>
File: atomica_alpha.png (59 KB, 552x798) Image search: [Google]
atomica_alpha.png
59 KB, 552x798
Just added that rescan ASCII progress bar when scanning the library(root music dir), was caught up in dealing with the separate widths of the chars which was a total bitch.
Looks sleek and operates buttery as fuck for an alpha build. It saves all the id3 tags and path in one big scan so that the searches become fucking instantaneous.

Next in mind I'll consider auto retrieval of album art through reliable and quick web scraping, if the user cares for that obviously.
Also auto-tagging tracks with bad ID3 tags ( a little more difficult than the previous) as a fork idea to the above.

Biggest of all I think I finally have a stable standalone,multi-threaded, python-to-exe translated build fucking working (and binary msi installer). CxFreeze, you fucking geniuses.

Any suggestions or feedback? This is my biggest personal project at the moment and i'd like to make it as nice and pleasing to use as possible. Inspired mostly by the linux media managers.
Should I include those track length metrics or keep it minimal? Something like (nowplayingtime" + ": " + "endtracktime)

Any help is appreciated before I go back to wage cucking in a week.
>>
File: 2016-06-03 00_24_38-Atomica.png (124 KB, 552x798) Image search: [Google]
2016-06-03 00_24_38-Atomica.png
124 KB, 552x798
>>54884349
It's comfy to me bros, to make and design something to work exactly the way I want it to.

You guys surely know this feel? Especially if you've engineered something that you use everyday.
>>
File: bgpic2.png (174 KB, 799x433) Image search: [Google]
bgpic2.png
174 KB, 799x433
>>54884466

I recognize the feel, it's just that I haven't put nearly as much work into mine.

Been meaning to rewrite it with WPF, but I can't be assed.
>>
File: frege_notation.jpg (240 KB, 1131x1698) Image search: [Google]
frege_notation.jpg
240 KB, 1131x1698
>>54884341
Maybe you'd like Frege's funky drawings better.
>>
>>54884479
>AC/DC
>pic of sheboon

literally the biggest pleb

fuck off tripfaggot
>>
File: fuoh.png (299 KB, 367x508) Image search: [Google]
fuoh.png
299 KB, 367x508
>>54884488

That's... Cool.
>>
File: OSGTP.jpg (126 KB, 1300x936) Image search: [Google]
OSGTP.jpg
126 KB, 1300x936
>>54884479
>>
>>54884479
that's a big ass
>>
>>54884503

Are you sure you aren't angrier about the Red Hot Chili Peppers and Vitamin String Quartet?

Negresses a best.

>>54884525
>niggers are monkeys!

fresh & spicy meme
>>
http://pastebin.com/Pk6ufFZY
Rate my autistic php script!
>>
generally speaking, how difficult is it to write a music player?

I can work with pretty much any language and I'd be ok with any dependencies (so not decoding from scratch)

anyone here done anything like this before?
>>
>>54884558
>PajeetHP

>>54884647
How much of a signals processing wiz are you?
>>
>>54884543
as fresh and spicy as black womens
>>
>>54884695
>How much of a signals processing wiz are you?
what do you mean by that?
>>
>>54884735
I mean it's literally pure signals processing.
>>
>>54884707

They are fresh and spicy, though.
>>
>>54884647
i can't imagine that it would be particularly hard, most of it would be polishing the GUI stuff at least if you want a serious music player and not just a toy program
>>
>>54884647
do you mean designing the UI around an existing player (e.g. scikits.audiolab) or writing something to actually decode audio files? the former would be easy but probably tedious, i don't have any experience with reading audio formats but using .wav would be much easier than mp3 i'd assume
>>
>>54879754

THIS GUY FUCKS
>>
Finished my final exam for one of my subjects yesterday, hopefully that was the last fucking time I touch the cancer that is functional programming
>>
>>54877918
guess I'm a faggot
who knew
>>
>>54877999
cool bro
>>
>>54883774
>kill kys

you stuttering, you lil plebbit pussy faggot?
>>
>>54885088
Thanfully no woman will ever have to touch the cancer that is your tiny penis
>>
>>54885248
>taking benzos
>2016

Enjoy the brain damage.
>>
>>54885223
I have better things to do than argue about my genitalia size on an Armenian towel knitting image board
>>
I don't understand why people are slamming on Haskell. You can learn more than one language. Haskell has some pretty cool features.

As every computer science professor has to repeat, there are multiple ways to do things and there's not a right way.
>>
>>54885361
It's just the same edge lord teenagers who think they're funny. They post every thread now.
>>
>>54885361
it's shit and it's not useful in the industry
>>
>>54885382
>the industry
>>fresh off the boat from reddit
Sorry I meant /v/adg
>>
File: 1464632537832.png (152 KB, 1948x858) Image search: [Google]
1464632537832.png
152 KB, 1948x858
>>54885397
Then again, is there even a difference?
>>
File: haskelel2.jpg (745 KB, 1920x1080) Image search: [Google]
haskelel2.jpg
745 KB, 1920x1080
haskell has no redeeming features. even if you're a FP memer there are better FP langs to choose from
>>
>>54885419
14 packages have been added to your nimble
Thread replies: 255
Thread images: 36

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.