/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

tour.golang.org
twitter.com/SFWRedditGifs

re-writing the linux kernel in recursive haskell with some parts in lisp to prove that these so called """meme languages""" are in fact usable in the real world

Currently writing Battleship game in Prolog.
Using C would be a lot better, I think.

...

>made later
Yeah, no.

>>made later
>more replies
Yeah

Currently thinking how to implement lambdas in Basic.

Thanks for using an anime image

Sorry for ant size

So I am very new to programming and I am stuck on an issue. The program needs to have the user enter in a title and format for his collection.

To do this I made an arraylist that just adds objects created by the userinput.

But I can not seem to figure out how to stop duplicates. Not just finding them but stopping the user from entering Doom twice as the title.

I have spent awhile looking at stackoverflow and to no avail. Its in java btw

use a hashset, that automatically takes away duplicates

Well, why user can't have Doom twice as the title?
Or what's the purpose of input?

I had a non productive evening last night. I have been reading a book on Go and it assumed I had previous knowledge in programming.

I, however, was okay with this since I have done a bit of python before. I read up until pointers and then it became too hard to follow, specially with channels, interfaces etc. So I have been searching a good golang book that's a bit more verbose and explains what those are. So far I have came across books that are either
1. too short: does not discuss the topic at hand at all, only describes how to perform certain things in Go (instead of describing what those certain things at first)
2. too verbose, while it doesn't really describe what the topic is, the book goes into the deepest detail of Golang itself.

The purpose of the input is for them to store data on their media collection. And as the shitty program it is, it won't allow duplicates.

Well, I think make program to read the base after the user clicked the Submit button and check if the same name is present. If it finds a duplicate, it screams at user that there's the same name in the base.
Kinda that.

Doing some challenges using the meme challenge language Haskell.

What's the difference between a single linked list and a sorted single linked list? Basically, sorted in what way? And is the goal of a sorted linked list so that when I add an item, it's put into the right location and therefore sorted in order?

Basic questions just so I'm clear of what I'm about to do.

sorted linked list means you can binary search (and if you know the count of the linked list)

>binary search
>linked list
Senpai, pls

tour.golang.org

I need to learn assembly and xilinx how fucked am i

Presumably, it's sorted based on whatever the value stored in each list node is.

You do know binary search works on any sorted linear data structure?

Do you realize how ridiculous it is to perform a binary search on a singly linked list?

The linear search is trivially always faster on a linked list.