All Activity

This stream auto-updates   

  1. Yesterday
  2. Volume 23 of The Hacker Digest is now out. If you're a lifetime digital subscriber, you will have already received this edition. Volume 23 is comprised of issues from 2006. We had a man from space theme on that year's covers centering on HOPE Number Six and other hacker milestones. As privacy became more endangered by the day, we were there to expose both the bad laws and the massive security holes that prevailed - some to this day. You can click here to buy Volume 23 or become a lifetime digital subscriber here. If you do the latter, you will receive digital copies of everything we have published to date, plus everything that we publish in the future. We have now digitized 33 out of our 35 years. If you also want paper copies, we have a special offer here. And if you're an existing paper lifetime subscriber who wants to upgrade to digital at a discounted rate, just click here. View the full article
  3. spy on pc and android phone hack fb,twitter accounts and paypal cc bank and western union TF with proof Grey-hat hackers we are specialize in hacking services stated below and more please come with with your hacking project for only serious mind. no free jobs hack fb,twitter accounts and paypal 1.)take control of pc of victim without him knowing 2.)the same with the phone 3.)create virus trojan for work and hide,bind,crypt it in any file (undetectable) 4.)spy on pc and android phone 5.)hack fb,twitter accounts and paypal 6.)website attacks to steal database's 7.) [whatsapp hacker] [snapchat hacker] 8.)Clients based Customization and clearn criminal records from all site 9.)Hacking Iphone ss| SSN | Android based | ip | spying 10). i will teach you about Bank Hacking Credit Card Hacking in Details 11)Contact me for Western Uninon Transfer Dumps Fullz Bank Logins Paypals ★ Credit Cards Loading (Only USA & UK & CANADA "CC's) No time wasters am here for real business Sami.hacking@gmail.com Discord ID: holyhack#2442
  4. http://Vn5socks.net - Service Seller Socks Good - Socks 5 VIP - Pass Paypal Blacklist Example daily 30: It is allowed to get maximium 30 socks for a day. If do not get them you will lose 30 socks in a day ( no incremental socks). An account will be expired after 30 days Payment Methods - PLEASE LOGIN TO PLACE ORDER - Auto payment Perfect Money - PM - Auto payment WebMoney - WMZ - Auto update socks new 24/24 - How to get socks5? -> After buy a package -> Click login -> Click VIEWSOCK -> Click ***.***... to get socks5! -> Contact: Skype: vn5socks.net - ICQ: 673820903 Welcome to http://Vn5socks.net
  5. Last week
  6. spy on pc and android phone hack fb,twitter accounts and paypal cc bank and western union TF with proof Grey-hat hackers we are specialize in hacking services stated below and more please come with with your hacking project for only serious mind. no free jobs hack fb,twitter accounts and paypal 1.)take control of pc of victim without him knowing 2.)the same with the phone 3.)create virus trojan for work and hide,bind,crypt it in any file (undetectable) 4.)spy on pc and android phone 5.)hack fb,twitter accounts and paypal 6.)website attacks to steal database's 7.) [whatsapp hacker] [snapchat hacker] 8.)Clients based Customization and clearn criminal records from all site 9.)Hacking Iphone ss| SSN | Android based | ip | spying 10). i will teach you about Bank Hacking Credit Card Hacking in Details 11)Contact me for Western Uninon Transfer Dumps Fullz Bank Logins Paypals ★ Credit Cards Loading (Only USA & UK & CANADA "CC's) No time wasters am here for real business Sami.hacking@gmail.com Discord ID: holyhack#2442
  7. Hacker Public Radio New Years Show episode 2 Claudio talks about doing IT for a school Pinebook discussion - complaints about keyboard, speakers, trackpad https://www.pine64.org Scanning photo negatives Camera discussion Firefly https://www.imdb.com/title/tt0303461 Serenity https://www.imdb.com/title/tt0379786 Babylon 5 https://www.imdb.com/title/tt0105946 POLYBIUS - The Video Game That Doesn't Exist https://www.youtube.com/watch?v=_7X6Yeydgyg https://en.wikipedia.org/wiki/Polybius Cicada 3301 https://en.wikipedia.org/wiki/Cicada_3301 Ahoy you channel https://www.youtube.com/channel/UCE1jXbVAGJQEORz9nZqb5bQ Resilo Sync https://en.wikipedia.org/wiki/Resilio_Sync Mintcast https://mintcast.org/ Zoom H2 https://www.zoom-na.com/products/field-video-recording/field-recording/h2-handy-recorder LG Tone headsets https://www.lg.com/us/bluetooth-headsets-headphones Urbanite XL https://en-us.sennheiser.com/urbanite-xl cmhobbs joins and asks for episode input. will record winter field day 2019 from northwest arkansas. Book & audiobook Recommendations for books: Daemon by Daniel Suarez, http://daniel-suarez.com/ Skyward by Brandon Sanderson, https://brandonsanderson.com/books/skyward/skyward/ Audiobook reading tips: To get into audiobooks, try listening to a book you've read before Try increasing or decreasing the speed of the book Use the TTS feature of your eBook reader to create your own audiobooks Oddity of TTS mispronouncing words can be fun or frustrating Linux desktop upgrade fun MX Linux https://mxlinux.org/ AntiX Linux https://antixlinux.com/ exwm https://github.com/ch11ng/exwm ZFS on Linux https://zfsonlinux.org/ Dell venue 11 pro https://www.dell.com/en-us/work/shop/cty/venue-11-pro/spd/dell-venue-11-pro Acer aspire 1 https://www.acer.com/ac/en/US/content/series/aspire1 View the full article
  8. NEW 'Off The Hook' ONLINE Posted 13 Jun, 2019 2:40:32 UTC The new edition of Off The Hook from 12/06/2019 has been archived and is now available online. "Off The Hook" - 12/06/2019 Download the torrent here!!!! View the full article
  9. Desktop: xfce4-terminal globaltime (orage) xfce4 notes thunar firefox Emacs claws-mail weechat mupdf gtk-redshift asunder keepassx lucky backup virtualbox/kvm xlog gpredict arduino ide tor browser bundle ledger wallet xmame freedoom rRootage dia fbreader gnumeric/libreoffice mandelbulber2 gqrx transmission xastir youtube-dl gui zenmap mpv Android LineageOS built in phone signal built in fm radio built in camera 2048 acrylic paint amsatdroid free antennapod aprsdroid audiofx barcode scanner binaural beats blockinger blowtorch built in calendar call recorder chroma doze built in clock cloudlibrary built in contacts danmaku death echolink equate f-droid fbreader fennec f-droid red cross first aid flashlight freegal music gadgetbridge built in gallery ghost commander gobandroid hoopla iz2uuf morse code trainer libby lightning mobilinkd tnc mupdf netguard o’reilly orbot, orfox osmand~ red cross pet first aid plumble propel graviton radiodroid (radio-browser.info) recorder roblox rpn sealnote sim card simple world clock space trader spotify suntimes, suntimes alarms survival manual termux timber tsumego pro ttrss-reader unifi vlc webtube weechat-android wifianalyzer wikipedia yalp store yorecast View the full article
  10. spy on pc and android phone hack fb,twitter accounts and paypal cc bank and western union TF with proof Grey-hat hackers we are specialize in hacking services stated below and more please come with with your hacking project for only serious mind. no free jobs hack fb,twitter accounts and paypal 1.)take control of pc of victim without him knowing 2.)the same with the phone 3.)create virus trojan for work and hide,bind,crypt it in any file (undetectable) 4.)spy on pc and android phone 5.)hack fb,twitter accounts and paypal 6.)website attacks to steal database's 7.) [whatsapp hacker] [snapchat hacker] 8.)Clients based Customization and clearn criminal records from all site 9.)Hacking Iphone ss| SSN | Android based | ip | spying 10). i will teach you about Bank Hacking Credit Card Hacking in Details 11)Contact me for Western Uninon Transfer Dumps Fullz Bank Logins Paypals ★ Credit Cards Loading (Only USA & UK & CANADA "CC's) No time wasters am here for real business Sami.hacking@gmail.com Discord ID: holyhack#2442
  11. NEW 'Off The Wall' ONLINE Posted 12 Jun, 2019 0:39:09 UTC The new edition of Off The Wall from 11/06/2019 has been archived and is now available online. "Off The Wall" - 11/06/2019 Download the torrent here!!!! View the full article
  12. In this show an Interview with Joep Piscaer, recorded during the recent Loadays conference in Antwerpen, Belgium. Schedule of recent Loadays event: https://cfp.loadays.org/2019/schedule/ I mention the "Cut the crap podcast", made by Ryan Caligiuri. And specifically episode 145 as an excellent example of his podcast quality: https://player.fm/series/the-cut-the-crap-show/ep-145-stronger-develop-the-resilience-you-need-to-succeed-with-dr-george-everly At the end of the podcast I a refer to the "Follow your Gift" talk, by Steve Harvey. You can find a recording of this talk on YouTube at https://www.youtube.com/watch?v=3x3rEg2qvcQ View the full article
  13. For any exchange server recovery needs that you might have, your best bet is to use EdbMails EDB to PST Converter. There can be a number of reasons for exchange databases to become corrupt or inaccessible : Dirty shutdowns Hardware failure Virus or other such malicious software attacks Header file corruption etc EdbMails can handle all types of such errors very well. Anybody can make use of EdbMails for exchange recovery as the process isn’t complex at all. It has a rather straightforward user interface wherein you select the EDB file to be recovered and within just a few clicks you can have all the EDB data you wish to be recovered in a PST file. Being a one stop solution, EdbMails EDB to PST Converter also gives you the flexibility to directly migrate EDB to Office 365 as well as Live Exchange server. As stated earlier you don't need to understanding and troubleshooting complex powershell cmdlets as EdbMails automatically handles everything for you. The tool to Convert EDB to PST from EdbMails uses deep scanning algorithms that have been perfected over the years to be able to recover all information from even the most heavily corrupted exchange database EDB files. EdbMails ensures secure recovery of all your asks, journals,zip attachments,Inbox,calendars etc. The corruption in exchange databases can be of two main types: Logical: Happens when a crucial piece of data is missing from the database itself. Such scenarios can lead to inconsistencies in the database and make it inaccessible. Physical: This is often related to any hardware or system failure. For example a sudden hard disk crash can result in database corruption. Whatever be the type of corruption, physical or logical, EdbMails can very well handle it all. For Public Folder EDB recovery and migration as well as for archive mailbox migration you can use EdbMails. There is support for Non English unicode characters as well in EdbMails.
  14. This is just a brief intro into my introduction to Linux. View the full article
  15. When it comes to monitoring your network, and the machines on it, you have a lot of options. But, let’s face it : none of those are easy to implement, and configuring a monitoring tool, whether it’s an open-source or a proprietary one, is often complex and time consuming. Well, someone took that matter into their own hands, and made NEMS. What is NEMS, how can it help us, and what infrastructure does it require? Those are a few of the questions I asked Robbie Ferguson, the maintainer of NEMS, who joined me on Easter week-end for a little chat. Links https://nemslinux.com/ https://twitter.com/NEMSLinux https://baldnerd.com/ View the full article
  16. spy on pc and android phone hack fb,twitter accounts and paypal cc bank and western union TF with proof Grey-hat hackers we are specialize in hacking services stated below and more please come with with your hacking project for only serious mind. no free jobs hack fb,twitter accounts and paypal 1.)take control of pc of victim without him knowing 2.)the same with the phone 3.)create virus trojan for work and hide,bind,crypt it in any file (undetectable) 4.)spy on pc and android phone 5.)hack fb,twitter accounts and paypal 6.)website attacks to steal database's 7.) [whatsapp hacker] [snapchat hacker] 8.)Clients based Customization and clearn criminal records from all site 9.)Hacking Iphone ss| SSN | Android based | ip | spying 10). i will teach you about Bank Hacking Credit Card Hacking in Details 11)Contact me for Western Uninon Transfer Dumps Fullz Bank Logins Paypals ★ Credit Cards Loading (Only USA & UK & CANADA "CC's) No time wasters am here for real business Sami.hacking@gmail.com Discord ID: holyhack#2442
  17. I have a Elcotel Payphone that I need to program and need the Elcotel PNM plus Demo software or the Elcotel PNM plus full version with a serial does anyone have a copy they could upload or email to me ? Thanks
  18. Earlier
  19. spy on pc and android phone hack fb,twitter accounts and paypal cc bank and western union TF with proof Grey-hat hackers we are specialize in hacking services stated below and more please come with with your hacking project for only serious mind. no free jobs hack fb,twitter accounts and paypal 1.)take control of pc of victim without him knowing 2.)the same with the phone 3.)create virus trojan for work and hide,bind,crypt it in any file (undetectable) 4.)spy on pc and android phone 5.)hack fb,twitter accounts and paypal 6.)website attacks to steal database's 7.) [whatsapp hacker] [snapchat hacker] 8.)Clients based Customization and clearn criminal records from all site 9.)Hacking Iphone ss| SSN | Android based | ip | spying 10). i will teach you about Bank Hacking Credit Card Hacking in Details 11)Contact me for Western Uninon Transfer Dumps Fullz Bank Logins Paypals ★ Credit Cards Loading (Only USA & UK & CANADA "CC's) No time wasters am here for real business Sami.hacking@gmail.com Discord ID: holyhack#2442
  20. spy on pc and android phone hack fb,twitter accounts and paypal cc bank and western union TF with proof Grey-hat hackers we are specialize in hacking services stated below and more please come with with your hacking project for only serious mind. no free jobs hack fb,twitter accounts and paypal 1.)take control of pc of victim without him knowing 2.)the same with the phone 3.)create virus trojan for work and hide,bind,crypt it in any file (undetectable) 4.)spy on pc and android phone 5.)hack fb,twitter accounts and paypal 6.)website attacks to steal database's 7.) [whatsapp hacker] [snapchat hacker] 8.)Clients based Customization and clearn criminal records from all site 9.)Hacking Iphone ss| SSN | Android based | ip | spying 10). i will teach you about Bank Hacking Credit Card Hacking in Details 11)Contact me for Western Uninon Transfer Dumps Fullz Bank Logins Paypals ★ Credit Cards Loading (Only USA & UK & CANADA "CC's) No time wasters am here for real business Sami.hacking@gmail.com Discord ID: holyhack#2442
  21. http://Vn5socks.net - Service Seller Socks Good - Socks 5 VIP - Pass Paypal Blacklist Example daily 30: It is allowed to get maximium 30 socks for a day. If do not get them you will lose 30 socks in a day ( no incremental socks). An account will be expired after 30 days Payment Methods - PLEASE LOGIN TO PLACE ORDER - Auto payment Perfect Money - PM - Auto payment WebMoney - WMZ - Auto update socks new 24/24 - How to get socks5? -> After buy a package -> Click login -> Click VIEWSOCK -> Click ***.***... to get socks5! -> Contact: Skype: vn5socks.net - ICQ: 673820903 Welcome to http://Vn5socks.net
  22. Hacker Public Radio New Years Show episode 1 Welcome to the 7th Annual Hacker Public Radio show. It is December the 31st 2018 and the time is 10 hundred hours UTC. Ken introduces the New year show, gives some history and thanks Kevin Wisher and HonkeyMagoo for organising this. Wondering where Klaatu is, Fifty one fifty talks about his new isp https://www.blazinghog.com Ken GETS STUCK IN CAPS LOCK https://wiki.archlinux.org/index.php/Xorg/Keyboard_configuration ISO8601 YYYY-MM-DD https://en.wikipedia.org/wiki/ISO_8601 https://www.hostelworld.com/hosteldetails.php/STF-IYHF-af-Chapman/Stockholm/32555 Honkey is on his way to work $ alias utc='/bin/date -u +%Y-%m-%d_%H-%M-%SZ_%A' https://www.youtube.com/watch?v=9PfdQod8HTw History Buffs: Tora! Tora! Tora! klaatu joins us, career at Red Hat, IBM takeover, teaching Linux to non-tech people https://en.wikipedia.org/wiki/Dalton_Plan Computer musems http://vonhagen.org/collection.html barcamp (yes related to foo) https://en.wikipedia.org/wiki/BarCamp Oggcamp https://oggcamp.org/ Mint Cast Podcast https://mintcast.org/ Brexit https://en.wikipedia.org/wiki/Brexit "we should have bought stock" View the full article
  23. In response to many suggestions from our readers, we've introduced the first ever 2600 tote bag. It's black and has the famous 2600 government seal logo on each side. Each bag measures 15 1/2 by 15 inches, has a nice long 26 inch strap, and is made from 100 percent cotton. They're very strong - you can load most anything in them. (We had no trouble filling them with 2600 back issues and carrying them crosstown.) More than suitable for trips to the grocery store. Get your 2600 tote bag here. View the full article
  24. spy on pc and android phone hack fb,twitter accounts and paypal cc bank and western union TF with proof Grey-hat hackers we are specialize in hacking services stated below and more please come with with your hacking project for only serious mind. no free jobs hack fb,twitter accounts and paypal 1.)take control of pc of victim without him knowing 2.)the same with the phone 3.)create virus trojan for work and hide,bind,crypt it in any file (undetectable) 4.)spy on pc and android phone 5.)hack fb,twitter accounts and paypal 6.)website attacks to steal database's 7.) [whatsapp hacker] [snapchat hacker] 8.)Clients based Customization and clearn criminal records from all site 9.)Hacking Iphone ss| SSN | Android based | ip | spying 10). i will teach you about Bank Hacking Credit Card Hacking in Details 11)Contact me for Western Uninon Transfer Dumps Fullz Bank Logins Paypals ★ Credit Cards Loading (Only USA & UK & CANADA "CC's) No time wasters am here for real business Sami.hacking@gmail.com Discord ID: holyhack#2442
  25. NEW 'Off The Hook' ONLINE Posted 06 Jun, 2019 4:55:07 UTC The new edition of Off The Hook from 05/06/2019 has been archived and is now available online. "Off The Hook" - 05/06/2019 Download the torrent here!!!! View the full article
  26. Request for comments Hi All, Under safe harbor provisions, we as volunteers are usually insulated from any copyright issues that may arise in the shows. "We do not vet, edit, moderate or in any way censor any of the shows on the network, we trust you to do that." This we got by accident because "This is a long standing tradition arising from the fact that HPR is a community of peers who believe that any host has as much right to submit shows as any other." In the show notes associated with hpr2829 on 2019-06-06, the host included the following text "For all included materials: If anyone feels they have right to any material in this show please let me know and I will comply." This violates the HPR upload policy. "Never include content, for example music, in your show that you do not have permission to redistribute. Try to avoid using any content in your show that can not be redistributed under a Creative Commons Attribution-ShareAlike 3.0 Unported license. If you are redistributing under another Creative Commons License or by arranged permission please make note of the restrictions when you upload your show. We can then signal that, so that others who redistribute HPR content can filter your show out." As it was clear that they were not in compliance, I contacted the host. The host has been very helpful and has already removed some of the content but commented "There are still 2 audio clips included. I claim I can use them on the basis off fair use principles." While the host may be correct, if they are not, then it is me and not the host that will be held responsible for posting it. I do not want that responsibility. Under the current HPR rules I am allowed to reject this submission. Before I do, I would appreciate as much feedback as possible on this topic so that we can gauge the opinions of the HPR Community as a whole. Regards, Ken. The discussion thread remains open and is open to all by joining the Maillist. View the full article
  27. NEW 'Off The Wall' ONLINE Posted 05 Jun, 2019 1:11:27 UTC The new edition of Off The Wall from 04/06/2019 has been archived and is now available online. "Off The Wall" - 04/06/2019 Download the torrent here!!!! View the full article
  28. Intro Last time we looked how to model technology and research. This time we’ll do some actual research. I’m skipping over some of the details as the episode is long enough as it is. Hopefully it’s still possible to follow with the show notes. Main concepts that I’m mentioning: Technology allows usage of specific buildings, ship components and such. Research unlock technologies and may have antecedents that has to be completed before the research can be started. Research cost is measure of how expensive a research is in terms of research points, which are produced by different buildings. Earlier I modeled tech tree as Map that had Technology as keys and Research as values. I realized that this is suboptimal and will replace it at some point in the future. Server API There’s three resources that client can connect to. First one is for retrieving list of available research, second one for manipulating current research and last one for retrieving info on how much research points is being produced. /api/research/available ApiAvailableResearchR GET /api/research/current ApiCurrentResearchR GET POST DELETE /api/research/production ApiResearchProductionR GET Simulation Simulation of research is done by handleFactionResearch, which does simulation for one faction for a given date. After calculating current research point production and retrieving list of current research, function calculates progress of current researches. Unfinished ones are written back to database, while completed are moved into completed_research table. Final step is updating what research will be available in the next turn. handleFactionResearch date faction = do production <- totalProduction $ entityKey faction current <- selectList [ CurrentResearchFactionId ==. entityKey faction ] [] let updated = updateProgress production <$> current _ <- updateUnfinished updated _ <- handleCompleted date updated $ entityKey faction _ <- updateAvailableResearch $ entityKey faction return () Research point production Research points are produced by buildings. So first step is to load all planets owned by the faction and buildings on those planets. Applying researchOutput function to each building yields a list of TotalResearchScore, which is then summed up by mconcat. We can use mconcat as TotalResearchScore is a monoid (I talked about these couple episodes ago). totalProduction fId = do pnbs <- factionBuildings fId let buildings = join $ fmap snd pnbs return $ mconcat $ researchOutput . entityVal <$> buildings researchOutput function below uses pattern matching. Instead of writing one function definition and case expression inside of it, we’re writing multiple definitions. Each of them matches building of different type. First example is definition that is used for ResearchComplex, while second one is for ParticleAccelerator. Final case uses underscore to match anything and indicate that we’re not even interested on the particular value being matched. mempty is again from our monoid definition. It is empty or unit value of monoid, which in case of TotalResearchScore is zero points in all research categories. researchOutput Building { buildingType = ResearchComplex } = TotalResearchScore { totalResearchScoreEngineering = ResearchScore 10 , totalResearchScoreNatural = ResearchScore 10 , totalResearchScoreSocial = ResearchScore 10 } researchOutput Building { buildingType = ParticleAccelerator } = TotalResearchScore { totalResearchScoreEngineering = ResearchScore 15 , totalResearchScoreNatural = ResearchScore 15 , totalResearchScoreSocial = ResearchScore 0 } researchOutput _ = mempty Updating progress Moving research forward is more complex looking function. There’s bunch of filtering and case expressions going on, but the idea is hopefully clear after a bit of explanation. updateProgress takes two parameters, total production of research points and current research that is being modified. This assumes that there are only one of each categories of research going on at any given time. If there were more, we would have to divide research points between them by some logic. Function calculates effect of research points on current research and produces a new current research that is the end result. Perhaps the most interesting part is use of lenses. For example, line entityValL . currentResearchProgressL +~ engResearch $ curr means that curr (which is Entity CurrentResearch) is used as starting point. First we reach to data part of Entity and then we focus on currentResearchProgress and add engResearch to it. This results a completely new Entity CurrentResearch being constructed, which is otherwise identical with the original, but the currentResearchProgress has been modified. Without lenses we would have to do this destructuring and restructuring manually. updateProgress :: TotalResearchScore ResearchProduction -> Entity CurrentResearch -> Entity CurrentResearch updateProgress prod curr = case researchCategory <$> research of Just (Engineering _) -> entityValL . currentResearchProgressL +~ engResearch $ curr Just (NaturalScience _) -> entityValL . currentResearchProgressL +~ natResearch $ curr Just (SocialScience _) -> entityValL . currentResearchProgressL +~ socResearch $ curr Nothing -> curr where research = Map.lookup (currentResearchType . entityVal $ curr) techMap engResearch = unResearchScore $ totalResearchScoreEngineering prod natResearch = unResearchScore $ totalResearchScoreNatural prod socResearch = unResearchScore $ totalResearchScoreSocial prod Writing unfinished research back to database is short function. First we find ones that hasn’t been finished by filtering with (not . researchReady . entityVal) and then we apply replace to write them back one by one. updateUnfinished updated = do let unfinished = filter (not . researchReady . entityVal) updated mapM (\x -> replace (entityKey x) (entityVal x)) unfinished Handling finished research starts by finding out which ones were actually completed by filtering with (researchReady . entityVal) and their research type with currentResearchType . entityVal. Rest of the function is all about database actions: creating entries into completed_research and adding news entries for each completed research, then removing entries from current_research and available_research. handleCompleted date updated fId = do let finished = filter (researchReady . entityVal) updated let finishedTech = currentResearchType . entityVal <$> finished insertMany_ $ currentToCompleted date . entityVal <$> finished insertMany_ $ researchCompleted date fId . (currentResearchType . entityVal) <$> finished deleteWhere [ CurrentResearchId <-. fmap entityKey finished ] deleteWhere [ AvailableResearchType <-. finishedTech , AvailableResearchFactionId ==. fId ] Available research Figuring out what researches will be available for the next turn takes several steps. I won’t be covering random numbers in detail, they’re interesting enough for an episode on their own. It’s enough to know that g <- liftIO getStdGen gets us a new random number generator that is seeded by current time. updateAvailableResearch starts by loading available research and current research for the faction and initializing a new random number generator. g can be used multiple times, but it’ll always return same sequence of numbers. Here it doesn’t matter, but in some cases it might. getR is helper function I wrote that uses random number generator to pick n entries from a given list. n in our case is hard coded to 3, but later on I’ll add possibility for player to research technologies that raise this limit. newAvailableResearch (we’ll look into its implementation closer just in a bit) produces a list of available research for specific research category. These lists are combined with <> operator and written into database with rewriteAvailableResearch. updateAvailableResearch fId = do available <- selectList [ AvailableResearchFactionId ==. fId ] [] completed <- selectList [ CompletedResearchFactionId ==. fId ] [] g <- liftIO getStdGen let maxAvailable = ResearchLimit 3 -- reusing same g should not have adverse effect here let engCand = getR g (unResearchLimit maxAvailable) $ newAvailableResearch isEngineering maxAvailable available completed let natCand = getR g (unResearchLimit maxAvailable) $ newAvailableResearch isNaturalScience maxAvailable available completed let socCand = getR g (unResearchLimit maxAvailable) $ newAvailableResearch isSocialScience maxAvailable available completed rewriteAvailableResearch fId $ engCand <> natCand <> socCand newAvailableResearch is in charge of figuring out what, if any, new research should be available in the next turn. In case where amount of currently available research is same or greater than research limit, empty list is returned, otherwise function calculates candidates and returns them. Logic for that is following: candidates are research of specific category of those that has been unlock and unresearched unlocked and unresearched are unlocked ones that are in list of known technology unlocked research are ones with antecedents available in tech tree known technology are ones in list of completed research and complete definition of the function is shown below: newAvailableResearch selector limit available completed = if ResearchLimit (length specificCategory) >= limit then [] else candidates where specificCategory = filter (availableResearchFilter selector) available candidates = filter (selector . researchCategory) unlockedAndUnresearched unlockedAndUnresearched = filter (\x -> researchType x `notElem` knownTech) unlockedResearch unlockedResearch = filter (antecedentsAvailable knownTech) $ unTechTree techTree knownTech = completedResearchType . entityVal <$> completed availableResearchFilter f x = maybe False (f . researchCategory) res where res = Map.lookup (availableResearchType $ entityVal x) techMap Final step of the simulation of research is to update database with new available research. mkUniq is helper function that removes duplicate elements from a list. It’s used in rewriteAvailableResearch function to make a list that contains all unique top research categories (engineering, natural sciences and social sciences). If the resulting list isn’t empty, we’ll use it to remove all available research for those top categories and insert new available research. rewriteAvailableResearch fId res = do let cats = mkUniq $ fmap (topCategory . researchCategory) res unless (null cats) $ do deleteWhere [ AvailableResearchFactionId ==. fId , AvailableResearchCategory <-. cats ] insertMany_ $ researchToAvailable fId <$> res Now everything is ready for next round of simulation. View the full article
  1. Load more activity