How significant is UKIP's Clacton success?
On the 9th of October, UKIP won its first seat in the House of Commons as Douglas Carswell swept to victory in the Clacton by-election. Like it or lump it, this changes everything and the Westminster establishment must wake up to the very real threat posed by Nigel Farage's leadership.
One seat in parliament may seem insignificant in the greater scheme of things but it matters a great deal to UKIP. They now have the chance to quiz David Cameron in the weekly Prime Minister's questions, instigate debates and table amendments in parliament. The party will also get access to state funding. MPs are paid by the state to run offices and staff while political parties with a proven electoral record are due more funds than those without. Carswell's victory in Clacton is therefore a political and financial coup for UKIP.
Electoral success has given UKIP a platform within the inner sanctums of British politics. It has provided an opportunity to challenge the three main parties and accrue some much-needed funds. Perhaps more importantly, the party has moved into the political mainstream. The idea that a UKIP vote is a wasted protest vote has been one of the biggest challenges to the success of the party. David Cameron's jibe that Tory voters tempted to vote UKIP might risk 'going to bed with Nigel Farage and waking up with Ed Miliband' is certainly punchy. It could still prove to be savvy electioneering on the part of the Prime Minister but Farage now has a concrete example of a constituency where the party's voters have got what they voted for.
Nigel Farage has even been invited to take part in a TV debate alongside the three main party leaders ahead of next year's general election. Amid criticism of the proposals from The Green Party, broadcasters explained that UKIP's inclusion was due to 'changes in the political landscape' since the last televised debates. This is a fair point but the omission of The Green Party does seem unfair considering they have occupied a seat in Westminster for over four years rather than just a few weeks. This level of inconsistency is, unfortunately, something to be expected in the modern political climate but UKIP's inclusion does highlight how much ground has been gained. Farage has rattled the right cages at the right time.
A lot of UKIP's success recently has come as a result of its alternative image. Nigel Farage has very deliberately portrayed himself as a Westminster outsider, brilliantly playing on the public disillusionment towards the three main parties. With electoral success this position immediately becomes harder to maintain. Every step UKIP takes towards the political mainstream is a step away from its status as the insurgent outsider. Additionally, UKIP is now big enough to become divided. The potential for disagreement over policy between Douglas Carswell as a local MP and his nationally minded party is huge and could undermine the leadership.
Nevertheless, the Clacton result is immensely significant. It is an opportunity for the party to portray itself as a legitimate alternative to the mainstream, not a protest vote but a genuine contender in the struggle for political power. The result is also a continuation of the momentum gained after their European election successes earlier in the year. With the Rochester and Strood by-election looming and another Tory defector, Mark Reckless, standing for UKIP, the party could have two MPs before next year's election. Political momentum is hugely important at this stage in the electoral cycle and no-one can deny that, right now, UKIP has it.
Despite appearing final, Scotland's 'no' vote poses more questions than answers.
The Scottish referendum saw a level of political participation unrivalled in recent years. The population was energised not just in Scotland but throughout the United Kingdom and it has sparked an unanticipated constitutional debate.
The same logic was not applied to Scotland and, in a constitutional sense, England has been under-represented ever since the devolution bills of 1997. The West Lothian question is no longer a question, it is an ignored reality. In the wake of a referendum deciding Scotland's future, attention has shifted towards England.
There is one fundamental problem. The West Lothian question is easy to ask but it is another matter entirely to answer it. A separate English parliament seems unlikely due to the additional cost and bureaucracy yet change, it seems, is on its way and so is heated debate. The three main parties are already bickering about reform despite weeks of apparent unity during the referendum campaign.
Federalism is one option. We could devolve powers to regional assemblies to vote on local issues, thereby answering the West Lothian question. The electorate could also vote for MPs to sit in the Westminster parliament in the same way that the Scottish are represented by MSPs and MPs. There are many options and the preferred system can be debated and perfected with time. The fact that we are having this debate at all is the important thing.
Alex Salmond, despite his obvious disappointment, gracefully accepted Scotland's decision to reject independence. He is a divisive figure and will continue to be so as he looks to hold Westminster to its promises. However, as Tony Blair once said: "when you decide you divide and that's just the way of it." Salmond decided. It wouldn't be surprising if he goes down in history for engineering more change than even he suspects.
The Scottish referendum campaign has prompted the British electorate to ask questions that have long been ignored. Constitutional change is overdue but it is on its way and in this climate of reform perhaps we can finally review the state of The House of Lords too. Whatever the outcome, it is wonderful to see these questions finally being raised and fascinating to anticipate the results. We are on the cusp of witnessing historic change. Thank you Alex Salmond, thank you Scotland.
Is the British relationship with the United States really so "special"?
In Britain today, we are constantly reminded of the special relationship that unites politicians in London and Washington. Yet, on wider consideration, it appears to be an exaggerated myth put together by British diplomats rather than a fully-fledged transatlantic alliance. This is particularly apparent when we consider that the special relationship is relatively unheard of on the other side of the Atlantic.
The Second World War is arguably a shining light in the history of the special relationship as the Allies eventually overcame the might of Nazi Germany and Imperial Japan. However, American suspicion of British attempts to gain assistance in the fight against fascism tells a different story. The America First movement, supported by future presidents John F Kennedy and Gerald Ford, was immensely popular and claimed that European Wars were none of their concern. After Blitzkrieg had obliterated Western Europe, Britain was left alone in the fight against Hitler. Yet, desperate requests for support were met by cold indifference from Britain's North Atlantic ally. What followed was the transfer of the British Empire's entire life savings to North America in a series of secret and desperate convoys. The British gave away state secrets, scientific innovation and, of course, vast sums of money to entice the reluctant Americans into fighting fascism. Churchill raged privately that Roosevelt was acting like a bailiff seizing the goods of a bankrupt, made worse by the fact that this was a time of war. By 1940 prices, estimates suggest that £500,000,000 went to the USA prior to 1942 (an immense sum when we consider inflation) and the exchange completely changed the balance of global wealth and authority, making the United States a superpower in the process. In many respects the United States crippled the British economy in exchange for military support and even then, in December 1941 it was Hitler who declared war on the United States, not the other way round.
After the war, this unsentimentality continued as Britain was shut out of the Bretton Woods conference of 1944, a conference that has shaped the global economic system as we know it. Britain's representative was legendary economist John Maynard Keynes and it is staggering that a man of that stature and intellect had no say in the rebuilding of the post-war global economy. During the Suez crisis of 1956, Britain and the United States came extremely close to open conflict. America's sixth fleet stalked the Royal Navy and President Eisenhower discussed the possibility of "being ready to shoot" at the British fleet amongst his closest White House advisers. Underhand suspicion has continued throughout the 20th and 21st century. Another more recent example is in 1994 when President Clinton granted Gerry Adams a visa to the United States, effectively handing him the respectability to move into mainstream politics. This was at a time when the IRA posed a genuine threat to British security. Adams was leader of Sinn Fein, an alleged terrorist and at the very least a vocal critic of the United Kingdom. Can you imagine the fallout if the British government granted a visa to an individual on the FBI's "Most Wanted" list?
In reality there is no special relationship between Britain and the United States. This piece has not by any means attempted to portray the two nations as enemies, merely point out the several occasions where there has been genuine conflict. Conflict has occurred politically, economically and sometimes militarily far more recently than is widely recognized. The War on Terror in the early 21st century arguably brought the two nations closer together, particularly considering the close relationship between Tony Blair and George W Bush. Yet, in times of warfare this is necessary and cannot be cited as a sign of a transatlantic alliance. The more distant and often frosty relationship between current President Barrack Obama and Prime Minister David Cameron is far more normal than the bond between Bush and Blair. In truth, the term "special relationship" is used as a political tool, used far more in London than Washington as a vain form of legitimising British foreign policy. The United States relationship with Britain is no more "special" than with France, Germany or Spain and we, as Britons, should not be so naïve as to think that we stand on a higher pedestal.


Falling down a lot in life, and picking myself up and getting going again. Surviving paralysis and creating a wonderful new life for myself. Completing a lot of expeditions I previously thought would be impossible. Winning silver at the London Paralympics in 2012.
Found alternative ways to adventure around the world, learn, and share it with others.
Handbiked across Japan, Tibet and Cuba. Sit-skied across Greenland. Climbed El Capitan. Kayaked the Inside Passage from Canada to Alaska. Won the 2012 World Paratriathlon Championships.
That my body won't always be able to keep up with my mind and dreams - I'm reliant on small parts of it, like my shoulders and arms.
Trying to win gold in the Rio Paralympic time trial. After that I have an idea to do some epic handbike rides around the world. Starting in November I'll be doing an off-road handbike ride along the Carretera Austral with some of my Paralympic team mates. After that - who knows...?


text:
Q: Reference counting & GC in LISP What is the main method for reclaiming the memory in LISP? Does LISP really need garbage collection? Would not reference counts suffice?

I just wanted to know whether reference counts are enough or not for
  memory management in LISP, since I am not much familiar with LISP
  language and other functional languages either.

Thanks.

A: Reference counting is basically never sufficient for managing memory due to cycles. If a language has mutation we can essentially create a structure like
  -------------------
  |        |        |
  |  Head  |  Tail  |
  |        |        |
  -------------------
     |  |       |
     |  +-------+
     |
  1 <+

I put way too much effort into this lousy diagram
Now that the head is pointed at the tail the counter for the object will never dip to 0, meaning it'll lie around forever. This is a persistant issue for Perl and is the reason for the contortions with weak_prt in C++.
Also frankly a good GC is orders of magnitude faster than reference counting. Bumping those counters constantly (particularly when you need to ensure thread safety) is actually not free. Clever things with generational/parallel garbage collection can give essentially pause free high performance code!
It's a natural question to wonder why we couldn't just start with malloc and free in Lisp and see where that takes us. In a language with closures, however, using manual memory management is a constant perilous battle. You are constantly in grave danger of closing over something with a slightly different lifetime and having things slowly pear-shaped. This complexity is noticeable in C++ with the fine grained notions of capturing and moving in and out of closures, even this destroys the time honored series of tricks in Lisp for simulating objects and other useful creatures.
TLDR: Garbage collection is actually pretty fast and reference counting is just too naive.

A: Naive reference counting cannot deal with cyclic data structures, since parts of the data structure will cause other parts to have a reference count higher than zero.
On the trivial end, Lisp (in general and Common Lisp in particular) allows you to create read-time cyclic "lists": #1#=(red green blue . #1#) is a never-ending list. They're even useful, in their right place.
Less obvious, if you have a family tree with each person represented as a node with references to parents and children, you suddenly have a graph that cannot be cleaned up using only reference counting. Is it useful? To some extent, yes. It makes looking up both children and parents from a single node effectively O(1) instead of having one of them being effectively O(1) and the other being effectively O(population) (or, admittedly, you can use weak references).
Even less obvious, updating the reference count must by necessity happen at every time a reference is made or unmade and either requires a Read-Copy-Update or a lock acquisition and release. With a periodic GC policy, this is amortised across the whole interval.

A: Environment fragments in Lisp have an undetermined lifetime, most of the LISP implementations need garbage collection to reclaim free run-time store.

redpajama_set_name: RedPajamaStackExchange


Multiple Sclerosis (MS) is called the "silent disease" and affects 2 million people worldwide.
Supporting MS research efforts are near and dear to retro co's heart as our CEO/Co-founder Yvonne von Berg's mother has battled with the disease for decades. Yvonne has always known her mother as living with MS and she is passionate about supporting the cause for a cure.
retro co has chosen to partner with the National MS Society because they have had a huge inpact with the quest for a cure and support for those who live with MS.
Find an event near you and get involved! Send us your request about your involvement and we'll send you a free retro gives back t-shirt.


text:
Indiana: 10 judges should rule on gay marriage ban
Updated: 6:42 PM EDT Jul 12, 2014
Indiana's attorney general wants more than three appellate judges to decide the fate of the state's gay marriage ban.The office said in a statement issued Saturday that it filed a motion late Friday asking the entire 10-judge 7th Circuit Court of Appeals to hear Indiana's appeal of a judge's order that struck down the ban. Cases are ordinarily heard by a panel of three judges.In a separate move Friday, the 7th Circuit combined Indiana and Wisconsin's gay marriage cases and put them on the fast track. Wisconsin had filed a similar appeal earlier this week.Indiana Attorney General Greg Zoeller said moving the case before the full court would speed the process even more.
Indiana's attorney general wants more than three appellate judges to decide the fate of the state's gay marriage ban.
The office said in a statement issued Saturday that it filed a motion late Friday asking the entire 10-judge 7th Circuit Court of Appeals to hear Indiana's appeal of a judge's order that struck down the ban. Cases are ordinarily heard by a panel of three judges.
In a separate move Friday, the 7th Circuit combined Indiana and Wisconsin's gay marriage cases and put them on the fast track. Wisconsin had filed a similar appeal earlier this week.
Indiana Attorney General Greg Zoeller said moving the case before the full court would speed the process even more.

redpajama_set_name: RedPajamaCommonCrawl


text:
Q: How to avoid the ambiguous overloaded operator problem when using list and numeric vector in Rcpp? Goal
The code below is a very simplified version of my original code for creating a reproducible example. In this code, I am trying to generate a vector that is filled up by using 2 values in each iteration from a for-loop. These values are first multiplied with a parameter p_BL that I provide in a parameters list. You can see that at the end of the code I multiply the parameter (from a list) to a integer in a NumericVector. That's where I get the overloaded operator error. How can I resolve this?
Code in the simple_function.cpp file
#include <Rcpp.h>
using namespace Rcpp;

// [[Rcpp::export]]
NumericVector my_func(List parameters, int number_simulations)
{

  NumericVector vector_trig_times (number_simulations);
  NumericVector vector_trig_times1 (number_simulations);
  NumericVector vector_trig_times2 (number_simulations);

  for (int i_simulation = 0; i_simulation < number_simulations; i_simulation++) {

    int vector_activation1 = i_simulation + 2;

    int vector_activation2 = i_simulation + 5;

    vector_trig_times1[i_simulation] = vector_activation1;

    vector_trig_times2[i_simulation] = vector_activation2;

    vector_trig_times[i_simulation] = (parameters["p_BL"] * vector_trig_times2[i_simulation]) + ((1-parameters["p_BL"]) * vector_trig_times1[i_simulation]);

  } // i_simulations for loop

    return vector_trig_times;
}

Compiling the file:
library(Rcpp)
sourceCpp("simple_function.cpp")

Error

Note: Line 28 refers to:
vector_trig_times[i_simulation] = (parameters["p_BL"] * vector_trig_times2[i_simulation]) + ((1-parameters["p_BL"]) * vector_trig_times1[i_simulation]);

Edit: Text of the error message
C:/RBuildTools/3.5/mingw_64/bin/g++  -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG   -I"C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/durraniu/GOOGLE~1/DISSER~1"        -O2 -Wall  -mtune=generic -c simple_function.cpp -o simple_function.o

simple_function.cpp: In function 'Rcpp::NumericVector my_func(Rcpp::List, int)':

simple_function.cpp:28:59: error: no match for 'operator*' (operand types are 'Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19, Rcpp::PreserveStorage>}' and 'Rcpp::traits::storage_type<14>::type {aka double}')

     vector_trig_times[i_simulation] = (parameters["p_BL"] * vector_trig_times2[i_simulation]) + ((1-parameters["p_BL"]) * vector_trig_times1[i_simulation]);

                                                           ^

simple_function.cpp:28:59: note: candidates are:

In file included from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/RcppCommon.h:136:0,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:27,

                 from simple_function.cpp:1:

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/complex.h:25:17: note: Rcomplex operator*(const Rcomplex&, const Rcomplex&)

 inline Rcomplex operator*( const Rcomplex& lhs, const Rcomplex& rhs) {

                 ^

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/complex.h:25:17: note:   no known conversion for argument 2 from 'Rcpp::traits::storage_type<14>::type {aka double}' to 'const Rcomplex&'

In file included from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/operators.h:33:0,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/sugar.h:30,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:74,

                 from simple_function.cpp:1:

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/times.h:473:1: note: template<int RTYPE, bool LHS_NA, class LHS_T, bool RHS_NA, class RHS_T> Rcpp::sugar::Times_Vector_Vector<RTYPE, LHS_NA, LHS_T, RHS_NA, RHS_T> Rcpp::operator*(const Rcpp::VectorBase<RHS_RTYPE, RHS_NA, RHS_T>&, const Rcpp::VectorBase<RTYPE, RHS_NA, RHS_T>&)

 operator*(

 ^

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/times.h:473:1: note:   template argument deduction/substitution failed:

simple_function.cpp:28:92: note:   'Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19, Rcpp::PreserveStorage>}' is not derived from 'const Rcpp::VectorBase<RHS_RTYPE, RHS_NA, RHS_T>'

     vector_trig_times[i_simulation] = (parameters["p_BL"] * vector_trig_times2[i_simulation]) + ((1-parameters["p_BL"]) * vector_trig_times1[i_simulation]);

                                                                                ^

In file included from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/operators.h:33:0,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/sugar.h:30,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:74,

                 from simple_function.cpp:1:

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/times.h:459:1: note: template<int RTYPE, bool NA, class T, class U> typename Rcpp::traits::enable_if<Rcpp::traits::is_convertible<typename Rcpp::traits::remove_const_and_reference<U>::type, typename Rcpp::traits::storage_type<RTYPE>::type>::value, Rcpp::sugar::Times_Vector_Primitive_nona<RTYPE, NA, T> >::type Rcpp::operator*(const Rcpp::sugar::NonaPrimitive<U>&, const Rcpp::VectorBase<RHS_RTYPE, RHS_NA, RHS_T>&)

 operator*(

 ^

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/times.h:459:1: note:   template argument deduction/substitution failed:

simple_function.cpp:28:92: note:   'Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19, Rcpp::PreserveStorage>}' is not derived from 'const Rcpp::sugar::NonaPrimitive<U>'

     vector_trig_times[i_simulation] = (parameters["p_BL"] * vector_trig_times2[i_simulation]) + ((1-parameters["p_BL"]) * vector_trig_times1[i_simulation]);

                                                                                ^

In file included from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/operators.h:33:0,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/sugar.h:30,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:74,

                 from simple_function.cpp:1:

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/times.h:450:1: note: template<int RTYPE, bool NA, class T, class U> typename Rcpp::traits::enable_if<Rcpp::traits::is_convertible<typename Rcpp::traits::remove_const_and_reference<U>::type, typename Rcpp::traits::storage_type<RTYPE>::type>::value, Rcpp::sugar::Times_Vector_Primitive_nona<RTYPE, NA, T> >::type Rcpp::operator*(const Rcpp::VectorBase<RHS_RTYPE, RHS_NA, RHS_T>&, const Rcpp::sugar::NonaPrimitive<U>&)

 operator*(

 ^

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/times.h:450:1: note:   template argument deduction/substitution failed:

simple_function.cpp:28:92: note:   'Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19, Rcpp::PreserveStorage>}' is not derived from 'const Rcpp::VectorBase<RHS_RTYPE, RHS_NA, RHS_T>'

     vector_trig_times[i_simulation] = (parameters["p_BL"] * vector_trig_times2[i_simulation]) + ((1-parameters["p_BL"]) * vector_trig_times1[i_simulation]);

                                                                                ^

In file included from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/operators.h:33:0,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/sugar.h:30,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:74,

                 from simple_function.cpp:1:

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/times.h:439:1: note: template<int RTYPE, bool NA, class T, class U> typename Rcpp::traits::enable_if<Rcpp::traits::is_convertible<typename Rcpp::traits::remove_const_and_reference<U>::type, typename Rcpp::traits::storage_type<RTYPE>::type>::value, Rcpp::sugar::Times_Vector_Primitive<RTYPE, NA, T> >::type Rcpp::operator*(const U&, const Rcpp::VectorBase<RHS_RTYPE, RHS_NA, RHS_T>&)

 operator*(

 ^

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/times.h:439:1: note:   template argument deduction/substitution failed:

simple_function.cpp:28:92: note:   mismatched types 'const Rcpp::VectorBase<RHS_RTYPE, RHS_NA, RHS_T>' and 'Rcpp::traits::storage_type<14>::type {aka double}'

     vector_trig_times[i_simulation] = (parameters["p_BL"] * vector_trig_times2[i_simulation]) + ((1-parameters["p_BL"]) * vector_trig_times1[i_simulation]);

                                                                                ^

In file included from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/operators.h:33:0,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/sugar.h:30,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:74,

                 from simple_function.cpp:1:

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/times.h:429:1: note: template<int RTYPE, bool NA, class T, class U> typename Rcpp::traits::enable_if<Rcpp::traits::is_convertible<typename Rcpp::traits::remove_const_and_reference<U>::type, typename Rcpp::traits::storage_type<RTYPE>::type>::value, Rcpp::sugar::Times_Vector_Primitive<RTYPE, NA, T> >::type Rcpp::operator*(const Rcpp::VectorBase<RHS_RTYPE, RHS_NA, RHS_T>&, const U&)

 operator*(

 ^

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/sugar/operators/times.h:429:1: note:   template argument deduction/substitution failed:

simple_function.cpp:28:92: note:   'Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19, Rcpp::PreserveStorage>}' is not derived from 'const Rcpp::VectorBase<RHS_RTYPE, RHS_NA, RHS_T>'

     vector_trig_times[i_simulation] = (parameters["p_BL"] * vector_trig_times2[i_simulation]) + ((1-parameters["p_BL"]) * vector_trig_times1[i_simulation]);

                                                                                ^

In file included from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/Vector.h:58:0,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:40,

                 from simple_function.cpp:1:

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/vector/Matrix.h:271:14: note: template<int RTYPE, template<class> class StoragePolicy, class T> typename Rcpp::traits::enable_if<Rcpp::traits::is_convertible<typename Rcpp::traits::remove_const_and_reference<T>::type, typename Rcpp::Matrix<RTYPE, StoragePolicy>::stored_type>::value, Rcpp::Matrix<RTYPE, StoragePolicy> >::type Rcpp::operator*(const T&, const Rcpp::Matrix<RTYPE, StoragePolicy>&)

              operator __OPERATOR__ (const T &lhs, const Matrix<RTYPE, StoragePolicy> &rhs) {                                  \

              ^

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/vector/Matrix.h:280:1: note: in expansion of macro 'RCPP_GENERATE_SCALAR_MATRIX_OPERATOR'

 RCPP_GENERATE_SCALAR_MATRIX_OPERATOR(*)

 ^

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/vector/Matrix.h:271:14: note:   template argument deduction/substitution failed:

              operator __OPERATOR__ (const T &lhs, const Matrix<RTYPE, StoragePolicy> &rhs) {                                  \

              ^

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/vector/Matrix.h:280:1: note: in expansion of macro 'RCPP_GENERATE_SCALAR_MATRIX_OPERATOR'

 RCPP_GENERATE_SCALAR_MATRIX_OPERATOR(*)

 ^

simple_function.cpp:28:92: note:   mismatched types 'const Rcpp::Matrix<RTYPE, StoragePolicy>' and 'Rcpp::traits::storage_type<14>::type {aka double}'

     vector_trig_times[i_simulation] = (parameters["p_BL"] * vector_trig_times2[i_simulation]) + ((1-parameters["p_BL"]) * vector_trig_times1[i_simulation]);

                                                                                ^

In file included from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/Vector.h:58:0,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:40,

                 from simple_function.cpp:1:

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/vector/Matrix.h:254:14: note: template<int RTYPE, template<class> class StoragePolicy, class T> typename Rcpp::traits::enable_if<Rcpp::traits::is_convertible<typename Rcpp::traits::remove_const_and_reference<T>::type, typename Rcpp::Matrix<RTYPE, StoragePolicy>::stored_type>::value, Rcpp::Matrix<RTYPE, StoragePolicy> >::type Rcpp::operator*(const Rcpp::Matrix<RTYPE, StoragePolicy>&, const T&)

              operator __OPERATOR__ (const Matrix<RTYPE, StoragePolicy> &lhs, const T &rhs) {                                  \

              ^

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/vector/Matrix.h:262:1: note: in expansion of macro 'RCPP_GENERATE_MATRIX_SCALAR_OPERATOR'

 RCPP_GENERATE_MATRIX_SCALAR_OPERATOR(*)

 ^

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/vector/Matrix.h:254:14: note:   template argument deduction/substitution failed:

              operator __OPERATOR__ (const Matrix<RTYPE, StoragePolicy> &lhs, const T &rhs) {                                  \

              ^

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/vector/Matrix.h:262:1: note: in expansion of macro 'RCPP_GENERATE_MATRIX_SCALAR_OPERATOR'

 RCPP_GENERATE_MATRIX_SCALAR_OPERATOR(*)

 ^

simple_function.cpp:28:92: note:   'Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19, Rcpp::PreserveStorage>}' is not derived from 'const Rcpp::Matrix<RTYPE, StoragePolicy>'

     vector_trig_times[i_simulation] = (parameters["p_BL"] * vector_trig_times2[i_simulation]) + ((1-parameters["p_BL"]) * vector_trig_times1[i_simulation]);

                                                                                ^

simple_function.cpp:28:100: error: ambiguous overload for 'operator-' (operand types are 'int' and 'Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19, Rcpp::PreserveStorage>}')

     vector_trig_times[i_simulation] = (parameters["p_BL"] * vector_trig_times2[i_simulation]) + ((1-parameters["p_BL"]) * vector_trig_times1[i_simulation]);

                                                                                ^

simple_function.cpp:28:100: note: candidates are:

In file included from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/date_datetime/date_datetime.h:29:0,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:62,

                 from simple_function.cpp:1:

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/date_datetime/Datetime.h:158:20: note: double Rcpp::operator-(const Rcpp::Datetime&, const Rcpp::Datetime&)

     inline double  operator-(const Datetime& d1, const Datetime& d2) { return d1.m_dt - d2.m_dt; }

                    ^

In file included from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/date_datetime/date_datetime.h:25:0,

                 from C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:62,

                 from simple_function.cpp:1:

C:/Users/durraniu/Documents/R/win-library/3.6/Rcpp/include/Rcpp/date_datetime/Date.h:164:19: note: double Rcpp::operator-(const Rcpp::Date&, const Rcpp::Date&)

     inline double operator-( const Date& d1, const Date& d2) { return d1.m_d -  d2.m_d; }

                   ^

make: *** [C:/PROGRA~1/R/R-36~1.1/etc/x64/Makeconf:215: simple_function.o] Error 1

Error in sourceCpp("simple_function.cpp") :
  Error 1 occurred building shared library.

A: Here's how you could implement the spot-on suggestions of Roland and Ralf; notice I've also cut out the unnecessary vector creation and assignment for your i+2 and i+5 values (I also used i as a counter because I don't think i_simulation is more informative, so it makes your code less readable as the line either has to go way over 80 characters or you have to split the calculation over two lines):
#include <Rcpp.h>

// [[Rcpp::export]]
NumericVector my_func2(List parameters, int number_simulations)
{

    NumericVector vector_trig_times (number_simulations);
    double p_BL = as<NumericVector>(parameters["p_BL"])[0];

    for ( int i = 0; i < number_simulations; ++i ) {
        vector_trig_times[i] = (p_BL * (i + 5)) + ((1 - p_BL) * (i + 2));
    }

    return vector_trig_times;
}

This compiles just fine, and the result is as expected:
Rcpp::sourceCpp("so.cpp")
my_func2(list(p_BL = 0.5), 10)
# [1]  3.5  4.5  5.5  6.5  7.5  8.5  9.5 10.5 11.5 12.5


AMA Mayfield Mermaid Statue unveiled May 14 in Seoul.
She was created by french sculptor Amaryllis. With the Ama statue sculpted by Amaryllis, the Amaryllis Art for Charity project was created by Thomas Noor. Through this project these statues are placed in prominent and beautiful locations near the ocean, and are for sale with approximately one third of the sales price going to a local charity.
There are unique touches to each of the statues, such as the patina chosen, the inscription with the name and the coordinates, and in some cases a unique item at Ama's feet.
It is a message of preservation that is shared by mermaid enthusiasts all over the world.
See more photos and information on the AMA Mayfield page.