/dpt/ - Daily Programming Thread

previous thread: shit
What are you working on?

Other urls found in this thread:

montreal.ubisoft.com/en/women-at-ubisoft/
gamerant.com/ubisoft-excuses-for-no-females-in-assassins-creed-unity/
youtu.be/FGQAP0GxlW8?t=24m13s
seas.upenn.edu/~cis194/spring13/lectures.html
github.com/NICTA/course
scs.stanford.edu/14sp-cs240h/
twitter.com/SFWRedditGifs

me second from the right in the front row

What's with the red circles?

Satori

(defun pajeet-destroyer (n)
(dotimes (i n)
(format t "~%~:[~d~:;~:*~{~c~^~}~]"
(append (and (zerop (rem i 3)) (coerce "fizz" 'list))
(and (zerop (rem i 5)) (coerce "buzz" 'list)))
i)))

This is what the botnet found:
montreal.ubisoft.com/en/women-at-ubisoft/

The botnet also shits this out as related:
gamerant.com/ubisoft-excuses-for-no-females-in-assassins-creed-unity/

Basically it's some SJW bs. Probably the red circles are for some waifu bs.

The smell in there must be unbearable.

looks like a pretty open room. do you have hyper active olfactory senses ore something?

No, I'm just repulsed by the smell of fish

>"~%~:[~d~:;~:*~{~c~^~}~]"
Holy shit Lisp is ugly.

def pajeetDestroyer(n):
for i in xrange(1, n+1):
print(((not i % 3 and "fizz") + (not i % 5 and "buzz")) or i)

...

i don't understand. is there a joke here or do you hallucinate around women?

>not i % 3 and "fizz"
Wouldn't work, for 3 you would have "fizz" + False and it would throw a type error.

No, that's just CL's format syntax. Of course it's ugly.

>i don't understand
Apparently.

What does it feel like to be loved by a woman

Indeed.

can I hire someone to think for me?
would make decisions much easier

What is the best way to create a custom google map?
With the API? It looked like generating a kml file was the best way but they don't work anymore, I guess.
I want to automatically put points on a world map with some data.

youtu.be/FGQAP0GxlW8?t=24m13s

>Mark's Haskell solution was an order of magnitude smaller than Ada or C++
>with the most documentation and one of the shortest development times
>they picked a graduate student and gave him 8 days to learn Haskell
>his solution was the second shortest

>DARPA evalutator calls it "too cute for its own good"
>high-order functions are just a trick

their api is obviously going to be the best choice unless you're a master at forging login dictionaries

this sounds like one of those projects though that would be easier and faster to just do manually

tl;dw, but
>>Mark's Haskell solution was an order of magnitude smaller than Ada or C++
doesn't the whole haskell compiler use 1GB or something?

SICP or Practical common lisp or On lisp?

GHC today is less than 200MB, which while big yes is typical for a fast optimizing compiler of a statically typed language, but the anecdote I linked (which starts at 24:13, which I directly linked to) was from the mid-90s, and the program in question on the order of 50 lines of code compared to the 300-1000 of the other languages tried.

SICP, then the other one.

can i study sicp using CL?

typedef vector vll;

vll BigInt::karatsubaMultiply(const vll &a, const vll &b)
{
int n = a.size();
vll res(n + n);
if (n > 1;
vll a1(a.begin(), a.begin() + k);
vll a2(a.begin() + k, a.end());
vll b1(b.begin(), b.begin() + k);
vll b2(b.begin() + k, b.end());

vll a1b1 = karatsubaMultiply(a1, b1);
vll a2b2 = karatsubaMultiply(a2, b2);

for (int i = 0; i < k; i++)
a2[i] += a1[i];
for (int i = 0; i < k; i++)
b2[i] += b1[i];

vll r = karatsubaMultiply(a2, b2);
for (int i = 0; i < (int)a1b1.size(); i++)
r[i] -= a1b1[i];
for (int i = 0; i < (int)a2b2.size(); i++)
r[i] -= a2b2[i];

for (int i = 0; i < (int)r.size(); i++)
res[i + k] += r[i];
for (int i = 0; i < (int)a1b1.size(); i++)
res[i] += a1b1[i];
for (int i = 0; i < (int)a2b2.size(); i++)
res[i + n] += a2b2[i];
return res;
}


BigInt is done. BigFloat comes next.

Virgin

my girlfriend doesn't smell like fish so i have no idea what's wrong with your senses, but it seems like you need to get it sorted out.

There is no reason to use cl when there is superior scheme.

Fleeting.

is it used somewhere outside MIT?

There is racket which does have libraries. But like with any lisp chances of getting a job are slim to none.

Lisps are to sate your desires for a better programming experience. Getting a job with one would only be icing on the cake.

YOU'RE A STUPID VIRGIN OH MY GOD.
This is why we Anime in the op!

I love lisps, best languages! But they are kinda "useless" very much like haskell. Helps you achieve enlightenment tho.

>lol who needs types
>sorry this function only takes a cons cell, enjoy your exception

Lisps are fucking shit.
Use Haskell.

Never heard of typed racket?

Types are archaic crapware that should not exist in modern programming languages. But Haskell takes it to the next level and turns types into a purified form of crystallized autism.

>hurr durr muh type theory!!!11oneoneeleven
It shouldn't even be a field of study. It's like a bunch of autists got together and started worshipping archaic compilers.

see >lol who needs types
>sorry this function only takes a cons cell

>here, let me add this incomprehensible type framework to solve a minor inconvenience
>there, fixed it!

Wew lad, this will trigger bunch of autists

>minor inconvenience
>incomprehensible
>>fixed it

Stop this meme.

>meme
It's true and it's a major flaw in all lisps

Might as well be using Java if you want all these runtime exceptions

>not having a typechecker buddy tell you exactly what needs changing when knee-deep in refactoring shit code into good code

Learning Clojure because Lisp >>>>>>>>>> Haskell

What should my first program be?
>hard mode: something actually useful

Write a version of lisp that's actually good
>you can't

>needing a type checker
>needing to massively rework your code because of types

>>needing a type checker
whoops, forgot to add
>not having all your errors fail silently

This is now a Lisp vs Haskell turf war thread.

do this in lisp

>he thinks type errors are a actually nontrivial source of code issues
They account for like less than 5% of errors but add 100% to the time it takes to plan and write your code

>he's never used a language with expressive and fully inferred types

It's almost 1:30am and I'm going to bed. Maybe in the morning.

>They account for like less than 5% of errors
Not when you're using a half decent type system and don't employ code monkeys.

Examples of a shitty type system designed by code monkeys would be the one where you pretend types don't exist but in reality have distinct kinds of values of which certain functions can only handle some.

>Haskellfags actually believe this

>modern Haskell
>fully inferred types

It's not really a flaw if you know what you're doing.

>the only purpose of types is for preventing errors
Not every language is Java, user

>Might as well use Java
It's so simple to read Lispers minds because they're so simple minded.

Maybe I could've done better, maybe I should've greentexted "Might as well use Javascript"
After all, there aren't any problems if you know what you're doing

I dare you to write a well-typed expression that GHC can't infer that it ought to be able to.

Well, it's always been said that Javascript was created under the premise of bringing Scheme to web browsers, and I'd say it has succeeded in doing so. It's a fully-fledged and incredibly powerful language. Well designed, to boot.

Scheme is strongly typed language its not fucking python or javascript.

>would be easier and faster to just do manually
Any alternatives to google maps?
I have a location (city,state or long/lat), some tags and a picture for each entry.

Fucking hell the Python multiprocessing overhead is no joke.

I managed to cut my program's execution from 20s to 35s by splitting the job into four processes.

no I suppose not for adding pictures

and google is a far better service than something like mapmyrun or mapquest

Just learn their api. This project can be done in probably 20 lines of code, it'll just take some time invested. If you have no experience at all with providing login data you are in for a lot of learning though

Give Cython a try

Please stop. You're not only embarrassing yourself by this avatarfagging but also make decent Haskellfags look bad.

I'd just like to interject for a moment. What you’re referring to as eggs, is in fact, salt/eggs, or as I’ve recently taken to calling it, salt plus eggs. Eggs are not a whole meal unto itself, but rather another free component of a fully functioning meal made useful by salt comprising a full meal as defined by Chef Ramsey.
Many food consumers eat a modified version of salt every day, without realizing it. Through a peculiar turn of events, the version of salt which is widely used today is often called “eggs”, and many of its consumers are not aware that it is basically salt. There really is eggs, and these people are eating it, but it is just a part of the meal they use.
Eggs is the main ingredient: the food in the meal that brings the nutrients to the other body. The main ingredient is an essential part of a meal, but useless by itself; it can only function in the context of a complete meal. Eggs is normally used in combination with the salt seasoning: the whole system is basically salt with eggs added, or salt/eggs. All the so-called “eggs” distributions are really distributions of salt/eggs.

>I don't have any real counterpoint so I will try to insult you with words I don't understand

I'm a type theoretician by training, so I have plenty counterpoint to your silly arguments. My point is that you deliberately incite flames with your condescending and aggressive attitude and in effect make the whole Haskell community look as bad.

...

Thank you for CORRECTING THE RECORD.
4 cents has been deposited in your account.

So I realized I don't have a good grasp of big O.
In terms of size, from good to worse, the order is
1 > log n > n > n * log n > n2/3/etc > x to the Nth power > n!
Right?

I think so

>implying that's haskell, not lisp

(deftype square-matrix (&optional type size)
`(and (array ,type (,size ,size))
(satisfies equidimensional)))

(defun equidimensional (a)
(or (< (array-rank a) 2)
(apply #'= (array-dimensions a))))

I fear that you do not know what avatarfagging means my fellow newfag. Sadly you keep using that word in almost every thread.

well yes, smaller is better.
But actually, while x to the nth power may be smaller than n!, i think n to to the nth power is bigger than n!
because n * n * n * ... > n * n-1 * n-2 * ...
so that would be the worst i can think of, unless you get even more ridiculous like n to the power of n to the power of n to the power of n ..

>my fellow newfag
So you're admitting to being a newfag yourself?

any intellij tutorials? I seriously can't even get a project started for TDD, how is this worse than visual studio

the website documentation is so bad

Visual studio just works and for intellij you just have to select jdk... Whats the problem?

what about (fib n) ^ (fib n)

What about it?

>unless you get even more ridiculous like n to the power of n to the power of n to the power of n ..

I cannot even imagine any such algorithm.

forall n. n -> (n -> n -> n -> n)

>I fear that you do not know what avatarfagging means my fellow newfag.
That colorscheme and hasklig are unmistakable.

Kek, Hascucks can't even into dependent types without ugly nonnative workarounds.

* (type-of (make-array '(2 2) :element-type 'bit))

(SIMPLE-ARRAY BIT (2 2))

or, more complex,

(deftype sorted-array ()
`(and (array number *)
(satisfies sorted-p)))
(defun sorted-p (seq &optional (pred #'

>using a built in colour scheme and a particular font (Fira Code, not hasklig) is now avatar fagging

TypeInType

It's clear that you do not know what avatarfagging is it looks like.

I recognise that position anywhere, it's unmistakable, you're Please stop avatarfagging by defending the same position

I meant a genuine use case.

>nonstandard GHC extension
>native
Face it, Lisp has a more expressive type system than Haskell. And that's not including the compile time calculations you can do with types and macros.

Not to add ease of creating DSLs

GHC is the standard

Previous thread: GHC Haskell is what most people mean by Haskell
Nobody cares about the ""official"" standard
As says, GHC is basically its own standard

While we're on the subject of Hasmeme, is LYAH actually good or is it patronizing for people who are already programmers?

use either haskellbook.org or this
seas.upenn.edu/~cis194/spring13/lectures.html
into
github.com/NICTA/course
into
scs.stanford.edu/14sp-cs240h/

Whoops, meant to say
forall n. [n -> n -> n -> n]

A function that takes a type and gives you back a list of all tryadic functions of that type (e.g. in a testing framework) would be O(((n^n)^n)^n)


The drawings are abhorrent

or without typeclasses/implicits or some kind of data type analysis

forall n. [n] -> [n -> n -> n -> n]
(i.e. you give it all possible n's and it gives you all possible tryadic n functions)