[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: 23
Thread images: 4

File: 1473981851293.jpg (10KB, 135x200px) Image search: [Google]
1473981851293.jpg
10KB, 135x200px
What are you working on, /g/?

Old thread: >>58898839
>>
>>58906091
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
>>
File: 1485976832894.jpg (34KB, 293x357px) Image search: [Google]
1485976832894.jpg
34KB, 293x357px
>>58906091
Currently writing Battleship game in Prolog.
Using C would be a lot better, I think.
>>
>>58906092
>>
>>58906275
>made later
Yeah, no.
>>
>>58906275
>>58906291
>>made later
>more replies
Yeah
>>
>>58906091
Currently thinking how to implement lambdas in Basic.
>>
>>58906091
Thanks for using an anime image
>>
>>58906325
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
>>
>>58906439
use a hashset, that automatically takes away duplicates
>>
>>58906439
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.
>>
>>58906461
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.
>>
>>58906498
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.
>>
>>58906091
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.
>>
>>58906679
sorted linked list means you can binary search (and if you know the count of the linked list)
>>
>>58906703
>binary search
>linked list
Senpai, pls
>>
>>58906091
https://tour.golang.org
>>
File: 1482650355671.jpg (13KB, 247x243px) Image search: [Google]
1482650355671.jpg
13KB, 247x243px
I need to learn assembly and xilinx how fucked am i
>>
>>58906679
Presumably, it's sorted based on whatever the value stored in each list node is.

>>58906861
You do know binary search works on any sorted linear data structure?
>>
>>58907845
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.
Thread posts: 23
Thread images: 4


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