What's the difference between Swift's Dispatchqueue and Flutter's Future? - ios

First of all please don't laugh at my question I am still a newbie.
Recently I have started learning iOS development and found about Dispatchqueue (documentation link).
After reading the documentation, I had a question on my mind.
Is it similar like Flutter's Future(documentation link)? Or are there any differences between them? If yes, then what are the differences?
I searched a lot but couldn't find a proper answer which would clear my confusion. Thanks in advance.

DispatchQueue is for parallelization your tasks. It works according to the first in first out principle, means the first tasks will be done first etc.
A Future sounds for me like a "delayed" task, means your task will be done in the future but not in the background like in a DispatchQueue.
Some good information for DispatchQueue are here Appropriately-using-dispatchqueue-main :-)

Related

New to Z3 - Some little guidance is needed

I am new to Z3 and haven't exposed to it before.
I am so interested in this filed and my research work requires me to be familiar with Z3.
unfortunately I am facing some issues as I need a little push/guidance at the beginning from an experts.
I am a quick learner and eager to get the info
Please let me know if by any chance you think you can give a little guidance/help that would be great.
Thank you
Start with https://theory.stanford.edu/~nikolaj/programmingz3.html
Stack-overflow is much more suitable for specific programming questions, as opposed to general advice. However, reading through the above document will get you started in the right direction.

Looking for old Assembler-like bot language on C64

In a discussion with a friend I was recently reminded of a fascinating idea from the days of Commodore C64. Unfortunately, googling brought no results, which might be due to the fact that I don't even know what to google for. So, I would like to ask for help here...
In a nutshell, I remember there once was a very simple, almost Assembler-like programming language that was used exclusively for programs that were battling each other in computer memory by overwriting each other. Personally, I played around with it on a C64, but it might have been ported to other systems, as well. It might have been called "program war" or something like that and for a while there were big communities running competitions and championships.
Is anyone old enough to know, what I'm talking about, and could help me with some info? :)
Thanks in advance.
Maybe you are remembering Core War where the assembly language was called Redcode and specifically Core Wars Pro for C64 (see mobygames.com, corewar.co.uk)

Is it possible to run AFNetworking and Alamofire at the same time in the same app?

I'd like to migrate from AFNetworking to Alamofire in a grown app. Since the app is quite big we think a step by step migration would contain less risk.
Nevertheless we have some concerns regarding:
Sessions
Security (Pinning etc.)
Observers / Listeners
Queues
Caching
...
Does anyone has experience with mixing AFN and Alamofire in Swift apps? I am also grateful for reports of problems you faced running both frameworks in parallel.
Thanks
It's possible and I've done so many times. You should try it and see what issues you run into and ask specific questions about them.
May I suggest you should stick with AFNetworking. Having two frameworks that do the same thing isn't always desired event in short term. AlamoFire is better if we in Swift only project. If you have 90% ObjC, it's just not ideally. And the result could be a lot of hidden bugs.

how to spawn a new Isolate in dart?

Is something going on wth Dart isolates at present? looking at a few past stackoverflow questions most people looked to be using spawnIsolate or spawnFunction to start a new isolate running, but those methods don't appear to exist any more, nor is there an obvious replacement for them in the current isolate library. Also when following links people have put in previous stackoverflow questions about isolates they seem to have been removed from the official documentation such as. How do you start up an isolate?
I wrote a small example on how to spawn isolates at http://www.roberthartung.de/spawning-isolates-in-dart/ . Does this help you?
At the bottom of the page you linked is this link dart:isolate library
I think this isolates are still work in progress.
I think some interesting details can be found in the discussions in the Google group Dart Misc or Dart Web Development and in the issues at dartbug.com
Where do you want to spawn isolates anyway, server or client?

General Development Notes [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
During a typical day programming, I implement functions in a way that I would like to remember. For instance, say I tuned a DB insert function that, when I come across the situation again, I want to find what I did to resuse.
I need a place to keep the solution(what I did), and I need to find it somehow, which may be months or a year later. Using a mind map sort of idea, I was thinking about a personal wiki, but then I heard the stackoverflow podcast mention using this site for such a reason. Does anybody else keep track of slick things they've done so that they may find it sometime in the future. If so, what did you use, and in general, how do you use it?
i like to personal blog idea and using the stack for it. i'll try the idea of posting at the stack and then answering it myself, with the benefit of other people potentially giving their opinion.
As long a the stack will be around for a while :)
Jeff Atwood recommends using Stack Overflow for this kind of thing. Post a question (your problem) and then post an answer (the solution you found). This lets you share the information with the world, and maybe get some valuable feedback or better solutions.
(Wow, I got downvoted for repeating what Jeff Atwood said. I won't do that again, I promise.)
I use neomem all the time. I write notes to myself. Then I can later search for it.
You may find these questions useful
Where do you store your code snippets?
Tracking useful information
What is you preferred site for code snippets?
I use a personal Wiki, my del.icio.us bookmarks and my own blog for that. Usually my blog: When I learn something that I know I might stumble on again I write a short post in my blog.
I use WikiDPad or Wiki-On-A-Stick. It works not only for code snippets but also to take notes, record typical problems you get and how to solve them and documentation. Take my word for it, it makes your job a LOT more easier if you have proper notes... and add the power of interlinking to it and you have a killer resource. I have very bad memory and taking notes has improved my performance by an order of magnitude. It also saves you from having to ask someone the same question twice or thrice. Also, if anyone asks the same question, you can just helpfully point them to the wiki and they can read it and add to it if they need to.
The technical term for what you are thinking of is "code snippets", and googling for that will find you many programs designed to store them for a variety of platforms, including entirely web-based ones such as this one.
I set up dekiwiki on a server at work that my coworkers and I use for company specifics stuff but also for general programming tips that arise as well.
A simple wiki, may be useful. SeeTiki Wiki
I always put it on my blog. Not only am I able to get back to it later, there is also a chance that it can help someone else as well.
It's oldschool, but I keep notes in a notebook. Makes remembering solutions (or the problems that caused them) a bit easier. Usually I make 1-2 pages of notes a day.
The digital equivalent of this would be keeping a private blog or journal. Easy enough to add a search program to help you find stuff.
Worthwhile things that my boss might be interested in, like bugs and user calls all get entered into bug tracking software where it is more formally handled.
I use the excellent Trac project management system for my personal projects, and I use it's wiki as a brainstorming and note-taking tool. And, because it also hooks into the Subversion repository and the bug tracking system, I can link from my notes right to a particular section of code or a bug report.
I keep my personal projects on assembla. Wiki, Issue Tracking, Source Control... very useful.
Check to see if your editor has some kind of annotations feature. Ideally you could link a particular location in code with a small note, and store it in a centralized place. If it doesn't, that kind of plugin wouldn't be too hard to build, your biggest hurdle is going to be how to link the piece of code to a file (due to the volatile nature of code) and even that one isn't insurmountable.

Resources