/dpt/ - Daily Programming Thread

Old thread: What are you working on, Jow Forums?

Attached: 1559361675716.jpg (1025x1278, 143K)

For fucks sake, why don't the janitors delete their jobs and delete shitposting threads like this?

Anywhere, real /dpt/:
Don't post in this fucking retarded reddit garbage thread.

Lisp is the most powerful programming language.

How do I make a

Attached: 1494800626199.jpg (482x549, 57K)

What does this JavaScript thingy of yours do? Can you tell me about it?

Attached: 1553585299738.jpg (1364x2048, 230K)

I posted this in the wrong thread, cross post with question I am interested in.

A program that will list all the items in my PlugY stash. I didn't realize how ridiculous this format is.

char a = 'a';

make a

Reading small text in VR is garbage at the moment. Maybe in the future.

if the janitors deleted their jobs, they wouldn't be able to delete the shitpost threads.

Compaction of your cranial bones would become a real problem over time.

(defun dosmth (lst)
(declare (type (cons (integer 0 254)) lst))
(mapcar #'1+ lst))


Okay.

> (describe #'dosmth)
#
[compiled function]

Lambda-list: (LST)
Derived type: (FUNCTION ((CONS (MOD 255) T)) (VALUES LIST &OPTIONAL)


CONS (MOD 255)? Sure I guess.

> (dosmth '(3 5 7 11))
(4 6 8 12)


As expected.

> (dosmth 7)
The value
7
is not of type
(CONS (MOD 255) T)
when binding LST
[Condition of type TYPE-ERROR]


Good. This was not a CONS.

> (dosmth '(3 5 a))
The value
A
is not of type
NUMBER
when binding SB-KERNEL::X
[Condition of type TYPE-ERROR]
Backtrace:
0: (SB-KERNEL:TWO-ARG-+ A 1) [external]
1: (DOSMTH (3 5 A))


I expected this to be caught earlier. Is CONS wrong here? I couldn't find anything for actual list types.

> (dosmth '(3 5 12065))
(4 6 12066)


What the fuck? This doesn't look like (MOD 255) to me!

Also I am going to bed, don't @ me, nerds.

Never reply to me again unless you're contributing to the thread

you could define the type yourself with deftype.

I'm trying to associate something with multiple values in Python. Is it better to use a class, or linked list, or dictionary?
Basically I want to attach two values to a key so they can be called at any time. like Stock: [price, volume].
Yes I'm a brainlet. Glad we got that out of the way.

you said it yourself. make a dictionary, where the value is a list.

what kinda projects do you fellas make when learning a language

irc bot

I read a book because I don't like doing exercises.

Implement a protocol or an algorithm.

Project Euler

>math bullshit for practicing a language
for what reason