an

These Birds Eat Fire, or Close to It, to Live Another Day

A willingness to experiment with new foods and ways of foraging may make some birds less vulnerable to extinction.




an

A Bit of Relief: Tea and Toast

“Quite honestly, one of the most disheartening things about American life is not the politics, not the incredible social division — it’s the way you make tea.”




an

Top Kashmiri Militant Is Killed, Sparking Protests and Rage

Over years of fighting, Riyaz Ahmad Naikoo recruited scores of young Kashmiris in an armed quest for independence from India. His death has set off a fresh wave of unrest.




an

Gas Leak in India at LG Factory Kills 11 and Sickens Hundreds

Residents in eastern India woke up in the middle of the night surrounded by a cloud of styrene vapor. Many couldn’t breathe.




an

BCI Outraged by Planned Kill of Endangered Bats

BCI condemns the decision of the government of Mauritius to kill 13,000 individuals of the endangered Mauritius fruit bat (Pteropus niger). ....




an

Protecting Homes and Food Sources of Two Critical Bat Species

 Lesser Long-Nosed and Mexican Long-Nosed Bats Receiving Support from Bat Conservation International’s New Program Supported by XTO Energy 




an

Fat Bats Withstand Effects of White-nose Syndrome

 BCI announced today that two of its esteemed scientists, Tina Cheng and Winifred Frick, published a paper in the Journal of Animal Ecology 




an

Global Bat Populations Need Research and Conservation Action

New Paper from Bat Conservation International Scientists Underscores the Need for Expanded Research and Data Collection to Better Protect Bat Species 




an

Helping Migratory Bats with Agave Planting Event

BCI announced today the launch of an agave planting initiative throughout Southwest, Tucson area, and Mexico to support the lesser long-nosed bat




an

Fungus that causes bat-killing disease White-nose Syndrome is expanding in Texas

BCI announced today that early signs of the fungus Pseudogymnoascus destructans (Pd) have been detected at one of the world’s premier bat conservation sites, Bracken Cave Preserve




an

Research Links Bats to Growth of Durian, the “World’s Stinkiest Fruit”




an

Disney Conservation Fund Helps Bat Conservation International Support Wildlife and the Environment

Press Release:

Disney Conservation Fund Helps Bat Conservation International Support Wildlife and the Environment

[Austin, Texas, November 26, 2019] – Bat Conservation International (BCI) has been awarded a grant by the Disney Conservation Fund (DCF) to stop the rapid population decline of the endangered Mexican long-nosed bat in northern Mexico. As part of this work, BCI’s bi-national team of experts will lead a series of community-based conservation activities aimed at identifying, protecting, and restoring agave habitat – the key food source for this nectar feeding bat. By harnessing community support, this large-scale initiative will help save the Mexican long-nosed bat by establishing robust ‘nectar corridors’ that the bats can use during their annual migration from Central Mexico to the southwestern U.S.

The fund has been supporting local efforts around the world aimed at saving wildlife, inspiring action and protecting the planet with nearly $86 million distributed to nonprofit organizations since 1995.

Dr. Jon Flanders, Director, BCI’s Endangered Species Intervention Project explains the importance of this work: “This initiative builds on the success of previous work aimed at protecting important cave roosts for this endangered species of bat. Focusing our efforts on protecting and restoring agave habitat in northern Mexico marks a significant step in our conservation efforts to save this species from extinction, none of which would have been possible without the ongoing support of the Disney Conservation Fund.”

DCF grant recipients are selected based on their efforts to implement comprehensive community wildlife conservation programs, stabilize and increase populations of at-risk animals and engage communities in conservation in critical ecosystems around the world.

For information on Disney’s commitment to conserve nature and a complete list of grant recipients, visit www.disney.com/conservation.

About Bat Conservation International

The mission of Bat Conservation International is to conserve the world’s bats and their ecosystems to ensure a healthy planet. For more information visit batcon.org.

Media Contact: Javier Folgar
Bat Conservation International
Tel: 512.327.9721 ext. 410
Email: jfolgar@batcon.org

###




an

Coronavirus and changes to BCI’s Operations

We're thinking a lot about our community and hope you are staying safe.

As we confront the challenge of the coronavirus pandemic, we're making the health and safety of our staff and our supporters our top priority. In line with CDC guidance and Federal & state orders, we are taking several important steps to our operations:

  • Public Events
    In response to CDC guidance regarding avoidance of large public gatherings, we are postponing the Bracken bat flight season. We will resume bat flight events when public health experts determine that large public gatherings are again safe.

Similarly, we have postponed or canceled all upcoming bat walk events at this time.

  • Merchandise & Gift Fulfillments
    Our Austin, Texas headquarters is currently subject to a city-wide “Stay Home, Work Safe” order. With our Austin-based employees working from home, please allow several weeks for delivery of merchandise and adopt-a-bat purchases ordered after March 24. Please also allow extra time for the processing of gifts made through U.S. mail. We are grateful for your patience and ask you to consider making your contribution to BCI online via credit card on our website or through PayPal.

  • Staff Operations & Field Work
    We’re taking the necessary steps to protect our staff while minimizing any disruptions to our mission. These precautions include:
    • Adhering to all state “stay-at-home” orders. At this time, most state orders consider BCI’s work as non-essential.
    • Adhering to Federal CDC guidance including:
      • Avoiding large gatherings such as events, trainings, and conferences
      • Avoiding/postponing non-essential domestic and international travel
      • Working remotely
    • Adhering to National Wildlife Health Center and U.S. Fish and Wildlife Service guidance to avoid contact with bats to prevent a potential spillback of the novel coronavirus from humans to wildlife

As a result of these precautions, we have postponed all fieldwork during the coronavirus pandemic to comply with public policies. Also, due to the global shortage of PPE supplies, we have suspended bat survey activities that require PPE.

We will continue to do all we can to respond to expert public health guidance, take the actions necessary to keep our staff and supporters safe and healthy, and update you on any changes.

Thank you for your patience and understanding as we confront this shared challenge.

 

 

 




an

BCI’s FAQ on Bats and Covid-19

Bat Conservation International is monitoring the news and information about the spreading novel coronavirus (nCoV-2019)




an

Rivers in the Landscape, 2nd Edition


 

Rivers are the great shapers of terrestrial landscapes. Very few points on Earth above sea level do not lie within a drainage basin. Even points distant from the nearest channel are likely to be influenced by that channel. Tectonic uplift raises rock thousands of meters above sea level. Precipitation falling on the uplifted terrain concentrates into channels that carry sediment downward to the oceans and influence the steepness of adjacent hill slopes



Read More...




an

Beaches and Coasts, 2nd Edition


 

A new edition of a unique textbook that provides an exhaustive treatment of the world's different coasts—with focus on climate change sea-level rise 

Coastlines of the world are as diverse and complex as any geological setting on Earth, and understanding them is extremely important. Beaches and Coasts, Second Edition is an exciting and unique textbook that covers the world’s different coasts and details the highly varied processes that have shaped



Read More...




an

Industrial Environmental Management: Engineering, Science, and Policy


 

Provides aspiring engineers with pertinent information and technological methodologies on how best to manage industry's modern-day environment concerns

This book explains why industrial environmental management is important to human environmental interactions and describes what the physical, economic, social, and technological constraints to achieving the goal of a sustainable environment are. It emphasizes recent progress in life-cycle sustainable



Read More...




an

The World Today: Concepts and Regions in Geography, 8th Edition


 

In the 8th edition of this market-leading title, The World Today continues to break new ground in the interpretation and teaching of world regional geography. The text explains the contemporary world’s geographic realms in terms of their natural environments and human dimensions in a clear and concise fashion. The authors look at the ways people have organized their living space, adapted to changing social as well as environmental circumstances, and



Read More...




an

Social Movements: An Introduction, 3rd Edition


 

A new, fully-revised and updated edition of the leading introduction to social movements and collective action –covers a broad range of approaches in the social sciences.

Now in its third edition, Social Movements is the market-leading introductory text on collective action in contemporary society. The text draws from theory-driven, systematic empirical research from across the social sciences to address central questions and concepts in the field.



Read More...




an

Biogeochemical Cycles: Ecological Drivers and Environmental Impact


 

Biogeochemical Cycles: Ecological Drivers and Environmental Impact is a collection of the latest information on the techniques and methods currently used in this field, focusing on biological and/or ecological effects of biogeochemical elemental cycles including carbon, nitrogen, major and trace elements, chemical weathering on multiple scales of nanometers to watersheds, and advances in technology of studying these processes.

Volume highlights include



Read More...




an

Encyclopedia of Water: Science, Technology, and Society, 5 Volume Set


 

A peer reviewed, comprehensive encyclopedia that reflects the current state of water science and engineering from multidisciplinary global viewpoints

Water quantity and quality are becoming increasingly urgent environmental issues. To meet the growing water demands of our expanding global population, professionals are turning to nontraditional sources and technologies. This expansive, multidisciplinary reference work contains hundreds of articles that



Read More...




an

Gas Injection into Geological Formations and Related Topics, Volume 8


 
This is the eighth volume in the series, Advances in Natural Gas Engineering, focusing on gas injection into geological formations and other related topics, very important areas of natural gas engineering. This volume includes information for both upstream and downstream operations, including chapters detailing the most cutting-edge techniques in acid gas injection, carbon capture, chemical and thermodynamic models, and much more.


Read More...




an

The Mediterranean Sea in the Era of Global Change 2: 30 Years of Multidisciplinary Study of the Ligurian Sea


 

Due to its particular characteristics, the Mediterranean Sea is often viewed as a microcosm of the World Ocean. Its proportionally-reduced dimensions and peculiar hydrological circulation render it susceptible to environmental and climatic constraints, which are rapidly evolving. The Mediterranean is therefore an ideal site to examine, in order to better understand a number of key oceanographic phenomena. This is especially true of the Ligurian Sea



Read More...




an

The Mediterranean Sea in the Era of Global Change 1: 30 Years of Multidisciplinary Study of the Ligurian Sea


 

Due to its particular characteristics, the Mediterranean Sea is often viewed as a microcosm of the World Ocean. Its proportionally-reduced dimensions and peculiar hydrological circulation render it susceptible to environmental and climatic constraints, which are rapidly evolving. The Mediterranean is therefore an ideal site to examine, in order to better understand a number of key oceanographic phenomena. This is especially true of the Ligurian Sea



Read More...




an

Companion to Women's and Gender Studies


 

A comprehensive overview of the interdisciplinary field of Women's and Gender Studies, featuring original contributions from leading experts from around the world

The Companion to Women's and Gender Studies is a comprehensive resource for students and scholars alike, exploring the central concepts, theories, themes, debates, and events in this dynamic field. Contributions from leading scholars and researchers cover a wide range of topics while providing



Read More...




an

ArchLinux UEFI and Dell XPS 2015

unrelated important thing first: I am blogging on my own website too, you can read my very first public entry in there!
I will keep posting here less web-centric related issues, or mostly rants, and will post there interesting stuff about HTML5, JavaScript, client/server and Mobile Web development ... now, back to the topic ...

archibold and my Dell XPS Developer Edition

So they changed my motherboard today, it suddenly stopped recognizing the Hard Drive, and even trying other drives didn't work at all.
Kudos to Dell for their assistance: the day after a person with already all necessary pieces arrived at my door and substituted the Motherboard with a very quiet and professional attitude.
... when I've asked assistance for a Lenovo Yoga Pro 3 they never even come back ...

If you've never heard about archibold, it's an installer which aim is to simplify ArchLinux and, optionally, GNOME configuration. Since I already backed up my Dell, and even if it was working like a charm, I've decided to erase it and see if I could make it work via UEFI.
Apparently this BIOS could be quite problematic and while efibootmgr seems to work without problems, it actually doesn't: it puts the EFI label into the list of Legacy boot-able devices so it won't work!

Not only the boot manager

If you have tried my installer before, I suggested to use UEFI=NO and enable Legacy mode on the bios. This was because not only I couldn't figure out how to install via UEFI, but I was using genfstab generated /etc/fstab during the installation and it was storing wrong UUIDs.

Finally Managed to install with UEFI boot!

The TL;DR story is that if you have an EFI partition created through gparted, and you have Syslinux on it, you should go in the part of the bios where you can add UEFI partitions manually, selecting syslinux/syslinux.efi file to boot from.
Full Article


an

The line between Events and Promises

In this post I will talk about Events and Promise limits, trying to fill all gaps with a 498 bytes sized library called notify-js.




an

On Cancelable Promises

Update
The awesome Lie function got improved and became an official module (yet 30 lines of code thought). Its name is Dodgy, and it's tested and even more awesome!


Ifeverydevelopertalksaboutsimilarissues with Promises, maybe we should just drop our "religion" for an instant and meditate about it ...

Not today though, today is just fine

We've been demanding from JS and Web standards to give us lower level APIs and "cut the crap", but we can do even more than that: simply solve our own problems whenever we need, and "cut our own crap" by ourselves and for our own profit, instead of keep moaning without an outcome.
Today, after reading yet another rant about what's missing in current Promise specification, I've decided to write a very simple gist:


After so many discussions and bikeshead about this topic, I believe above gist simply packs in its simplicity all good and eventually bad intents from any voice of the chorus I've heard so far:
  1. if we are in charge of creating the Promise, we are the only one that could possibly make it abortable and only if we want to, it's an opt in rather than a default or a "boring to write" subclass
  2. it's widely agreed that cancellation should be rather synonymous of a rejection, there's no forever pending issue there, just a plain simple rejection
  3. one of the Promise strength is its private scope callback, which is inevitably the only place where defining abortability would make sense. Take a request, a timer, an event handler defined inside that callback, where else would you provide the ability to explicitly abort and cleanup the behavior if not there?
  4. being the callback the best pace to resolve, reject, and optionally to abort, that's also the very same place we want to be sure that if there was a reason to abort we can pass it along the rejection, so that we could simply ignore it in our optionally abort aware Promises, and yet drop out from any other in the chain whenever the rejection occurs or it's simply ignored
  5. the moment we make the promise malleable from the outer world through a p.abort() ability, is also the very same moment we could just decide to resolve, or fully fail the promise via p.resolve(value) or p.reject(error)
As example, and shown in the gist itself, this is how we could opt in:

var p = new Lie(function (resolve, reject, onAbort) {
var timeout = setTimeout(resolve, 1000, 'OK');
// invoking onAbort will explicit our intent to opt-in
onAbort(function () {
clearTimeout(timeout);
return 'aborted'; // will be used as rejected error
// it could even be undefined
// so it's easier to distinguish
// between real errors and aborts
});
});
After that, we can p.abort() or try other resolve or reject options with that p instance and track it's faith:

p.then(
console.log.bind(console),
console.warn.bind(console)
).catch(
console.error.bind(console)
);
Cool, uh? We have full control as developers who created that promise, and we can rule it as much as we like when it's needed ... evil-laugh-meme-here

Cooperative code

In case you are wondering what's the main reason I've called it Lie in the first place, it's not because a rejected Promise can be considered a lie, simply because its behavior is not actually the one defined by default per each Promise.
Fair enough for the name I hope, the problem might appear when we'd like to ensure our special abortable, resolvable, rejectable own Promise, shouldn't be passed around as such. Here the infinite amount of logic needed in order to solve this problem once for all:

var toTheOuterWorld = p.then(
function (data) {return data},
function (error) {return error}
);
// or even ...
var toTheOuterWorld = Promise.resolve(p);
That's absolutely it, really! The moment we'd like to pass our special Promise around and we don't want any other code to be able to mess with our abortability, we can simply pass a chained Promise, 'cause that's what every Promise is about: how cool is that?

// abortable promise
var cancelable = new Lie(function (r, e, a) {
var t = setTimeout(r, 5000, 'all good');
a(function () { clearTimeout(t); });
});

// testing purpose, will it resolve or not?
setTimeout(cancelable.reject, 1000, 'nope');
// and what if we abort before?
setTimeout(cancelable.abort, 750);



// generic promise, let's log what happens
var derived = cancelable.then(
function (result) { console.log('resolved', result); },
function (error) { error ?
console.warn('rejected', error) :
console.log('ignoring the .abort() call');
}
).catch(
function (error) { console.error('cought', error); }
);

// being just a Promise, no method will be exposed
console.log(
derived.resolve,
derived.reject,
derived.abort
);

Moaaar lies

If your hands are so dirty that you're trying to solve abort-ability down the chain, don't worry, I've got you covered!

Lie.more = function more(lie) {
function wrap(previous) {
return function () {
var l = previous.apply(lie, arguments);
l.resolve = lie.resolve; // optional bonus
l.reject = lie.reject; // optional bonus
l.abort = lie.abort;
return Lie.more(l);
};
}
if (lie.abort) {
lie.then = wrap(lie.then);
lie.catch = wrap(lie.catch);
}
return lie;
};
We can now chain any lie we want and abort them at any point in time, how cool is that?

var chainedLie = new Lie(function (res, rej, onAbort) {
var t = setTimeout(res, 1000, 'OK');
onAbort(function (why) {
clearTimeout(t);
return why;
});
})
.then(
console.log.bind(console),
console.warn.bind(console)
)
.catch(
console.error.bind(console)
);

// check this out
chainedLie.abort('because');
Good, if you need anything else you know where to find me ;-)
How to opt out from lies again?

var justPromise = Promise.resolve(chainedLie);
OK then, we've really solved our day, isn't it?!

As Summary

Promises are by definition the returned or failed value from the future, and there's no room for any abort or manually resolved or rejected operation in there.
... and suddenly we remind ourselves we use software to solve our problems, not to create more, so if we can actually move on with this issue that doesn't really block anyone from creating the very same simple logic I've put in place in about 20 well indented standard lines, plus extra optional 16 for the chainable thingy ... so what are we complaining about or why do even call ourselves developers if we get stuck for such little effort?
Let's fell and be free and pick wisely our own footgun once we've understood how bad it could be, and let's try to never let some standard block our daily job: we are all hackers, after all, aren't we?




an

On Ignored Users Spoken Language

I think I've talked already few times about this problems but I don't see anything happening ... actually, it's getting worst and worst.

Who Is Directly Affected And Is Wasting Money

  • Companies paying for Online Advertisement
  • Companies selling online
  • Companies providing online services

Who Is Responsible

  • every service that is addressing users through their current IP address, without asking permission, and assuming if you travel to any country in this world you automatically speak that country language
  • every service that completely ignores Accept-Language on the server side, and navigator.language on the client side
This is an extract from the Accept-Language used for locale setting post directly from W3C website:
For a first contact, using the Accept-Language value to infer regional settings may be a good starting point, but be sure to allow them to change the language as needed and specify their cultural settings more exactly if necessary. Store the results in a database or a cookie for later visits.
...
By the way
Using the Accept-Language header is also a good starting point for determining the language of the user, rather than the locale ...
Accordingly, instead using users IP location to define their language, I'd rather prefer them to use my daily language of choice, which comes most likely from the fact that my entire Operating System speaks English, as example, so PLEASE, give me English content whenever I am!

It feels so straightforward simple thing, right? Wondering who is doing it right?

Nobody Is Doing It Right

I am in Germany these days, and suddenly I don't understand anything. I cannot even be "victim" of Ads, I'm rather disturbed by them.

Google

Before even asking to use my detailed location provided through the browser, if I type google.com in the URL bar I'm redirected to google.de. Why does that happen? Simple, they know by my IP I am in Germany ^_^.
If I choose the English language and I search for O2 DSL, imagining I'd like to sign for a contract, or need some help, this is the result:
Full Article


an

Object.assign Side Effects and How To Copy

In How To Copy Objects post I'll explain the difference between various native ways to copy own keys and properties, describing also the fact that Object.assign is full of surprises and side effects.

As example, assigning to an object something like {get next() {return ++this.i}, i:0} instead of {i:0, get next() {return ++this.i}} will result in different values copied over: next === 1 and i === 1 in the first case, next === 1 and i === 0 in the second one.




an

The missing analysis in JavaScript "Real" Mixins

I love hacks and unusual patterns! As logical consequence, I loved this post about "Real" Mixins!!!
The only hitch about that post is that I believe there are few points closer to a "gonna sell you my idea" discussion than a non disillusioned one.
Let's start this counter analysis remembering what are actually classes in latest JavaScript standard, so that we can move on explaining what's missing in there.

JavaScript embraces prototypal inheritance

It doesn't matter if ES6 made the previously reserved class keyword usable; at the end of the day we're dealing with a special syntactical shortcut to enrich a generic prototype object.

// class in ES2015
class A {
constructor() {}
method() {}
get accessor() {}
set accessor(value) {}
}

// where are those methods and properties defined?
console.log(
Object.getOwnPropertyNames(A.prototype)
// ["constructor", "method", "accessor"]
);
Accordingly, declaring a generic class consists in bypassing the following procedure:

function A() {}
Object.defineProperties(
A.prototype,
{
// constructor is implicitly defined
method: {
configurable: true,
writable: true,
value: function method() {}
},
accessor: {
configurable: true,
get: function get() {},
set: function set(value) {}
}
}
);
If you don't trust me, trust what a transpiler would do, summarized in the following code:

var A = (function () {
// the constructor
function A() {
_classCallCheck(this, _temporalAssertDefined(A, "A", _temporalUndefined) && A);
}
// the enriched prototype
_createClass(_temporalAssertDefined(A, "A", _temporalUndefined) && A, [{
key: "method",
value: function method() {}
}, {
key: "accessor",
get: function get() {},
set: function set(value) {}
}]);

return _temporalAssertDefined(A, "A", _temporalUndefined) && A;
})();
If there is some public static property in the definition, its assignment to the constructor would be the second bypassed part.

The super case

The extra bit in terms of syntax that makes ES6 special is the special keyword super. Being multiple inheritance not possible in JavaScript, we could think about super as the static reference to the directly extended prototype. In case of the previous B class, which extends A, we can think about super variable like if it was defined as such:

// used within the constructor
let super = (...args) => A.apply(this, arguments);

// used within any other method
super.method = (...args) => A.prototype.method.apply(this, args);

// used as accessor
Object.defineProperty(super, 'accessor', {
get: () => Object.getOwnPropertyDescriptor(
A.prototype, 'accessor'
).get.call(this),
set: (value) => Object.getOwnPropertyDescriptor(
A.prototype, 'accessor'
).set.call(this, value)
});
Now that we have a decent understanding on how inheritance works in JavaScript and what it means to declare a class, let's talk about few misleading points sold as pros or cons in the mentioned article.

Prototypes are always modified anyway!

We've just seen that defining a class technically means enriching its prototype object. This already invalidates somehow Justin point but there's more to consider.
When Justin exposes his idea on why current solutions are bad, he says that:
When using mixin libraries against prototype objects, the prototypes are directly mutated. This is a problem if the prototype is used anywhere else that the mixed-in properties are not wanted.
The way Justin describes this issue is quite misleading because mutating prototypes at runtime is a well known bad practice.
Indeed, I believe every single library he mentioned in that post, and he also forgot mine, is not designed to mutate classes prototypes at runtime ... like: not at all!
Every single mixin proposal that is capable of implementing mixins via classes is indeed designed to define these classes at definition time, not at runtime!
Moreover, whatever solution Justin proposed will not guard any class from being modified at runtime later on!
The same way he's defining his final classes during their definitions, mixins-for-classes oriented libraries have exactly the same goal: you define your class and its mixins during the class definition time!
The fact mixins add properties to a prototype is a completely hidden matter that at class definition time is everything but bad.
Also, no property is modified in place, because mixins are there to enrich, not to modify ... and having a prototype enriched means also that it's easier to spot name clashing and methods or properties conflicts ... but I'll come back to that later ...

super actually should NOT work!

The main bummer about the article is that it starts in a very reasonable way, describing mixins and classes, and also analyzing their role in a program.
The real, and only, difference between a mixin and normal subclass is that a normal subclass has a fixed superclass, while a mixin definition doesn't yet have a superclass.
Justin started right at the very beginning, and then degenerated with all sort of contradictions such:
Then finally he's back to Sanity Village with the following sentence:
super calls can be a little unintuitive for those new to mixins because the superclass isn't known at mixin definition, and sometimes developers expect super to point to the declared superclass (the parameter to the mixin), not the mixin application.
And on top of that, Justin talks about constructors too:
Constructors are a potential source of confusion with mixins. They essentially behave like methods, except that overriden methods tend to have the same signature, while constructors in a inheritance hierarchy often have different signatures.
In case you're not convinced yet how much messed up could be the situation, I'd like to add extra examples to the plate.
Let's consider the word area and its multiple meanings:
  • any particular extent of space or surface
  • a geographical region
  • any section reserved for a specific function
  • extent, range, or scope
  • field of study, or a branch of a field of study
  • a piece of unoccupied ground; an open space
  • the space or site on which a building stands
Now you really have to tell me in case you implement a basic Shape mixin with an area() method what the hack would you expect when invoking super. Moreoever, you should tell me if for every single method you are going to write within a mixin, you are also going to blindly invoke super with arbitrary amount of arguments in there ...

So here my quick advice about calling blindly a super: NO, followed by DON'T and eventually NEVER!

Oversold super ability

No kidding, and I can't stress this enough ... I've never ever in my life wrote a single mixin that was blindly trusting on a super call. That would be eventually an application based on mixins but that's a completely different story.
My feeling is that Justin tried to combine at all cost different concepts, probably mislead by his Dart background, since mentioned as reference, where composition in Dart was indeed classes based and the lang itself exposes native mixins as classes ... but here again we are in JavaScript!

instanceof what?

Another oversold point in Justin's article is that instanceof works.
This one was easy to spot ... I mean, if you create a class at runtime everytime the mixin is invoked, what exactly are you capable of "instanceoffing" and why would that benefit anyone about anything?
I'm writing down his very same examples here that will obviously all fail:

// a new anonymous class is created each time
// who's gonna benefit about the instanceof?
let MyMixin = (superclass) => class extends superclass {
foo() {
console.log('foo from MyMixin');
}
};

// let's try this class
class MyClass extends MyMixin(MyBaseClass) {
/* ... */
}

// Justin says it's cool that instanceof works ...
(new MyClass) instanceof MyMixin; // false
// false ... really, it can't be an instance of
// an arrow function prototype, isn't it?!
Accordingly, and unless I've misunderstood Justin point in which case I apologies in advance, I'm not sure what's the exact point in having instanceof working. Yes, sure the intermediate class is there, but every time the mixin is used it will create a different class so there's absolutely no advantage in having instanceof working there ... am I right?

Improving **Objects** Composition

In his Improving the Syntax paragraph, Justin exposes a very nice API summarized as such:

let mix = (superclass) => new MixinBuilder(superclass);

class MixinBuilder {
constructor(superclass) {
this.superclass = superclass;
}

with(...mixins) {
return mixins.reduce((c, mixin) => mixin(c), this.superclass);
}
}
Well, this was actually the part I've liked the most about his article, it's a very simple and semantic API, and it also doesn't need classes at all to be implemented for any kind of JS object!
How? Well, simply creating objects from objects instead:

let mix = (object) => ({
with: (...mixins) => mixins.reduce(
(c, mixin) => Object.create(
c, Object.getOwnPropertyDescriptors(mixin)
), object)
});
It could surely be improved in order to deal with classes too but you get the idea:

let a = {a: 'a'};
let b = {b: 'b'};
let c = {c: 'c'};
let d = mix(c).with(a, b);
console.log(d);
Since the main trick in Justin proposal is to place an intermediate class in the inheritance chain, defining at runtime each time the same class and its prototype, I've done something different here that doesn't need to create a new class with its own prototype or object each time, while preserving original functionalities without affecting them.

Less RAM to use, a hopefully coming soon native Object.getOwnPropertyDescriptors that should land in ES7 and make extraction faster, and the ability to use the pattern with pretty much everything out there, modern or old.
The gist is here, feel free to reuse.

As Summary ...

Wrapping up this post, with latter proposal we can actually achieve whatever Justin did with his intermediate classes approach but following different goals:
  1. Mixins are added to the prototype chain.
  2. Mixins are applied without modifying existing objects.
  3. Mixins do no magic, and don't define new semantics on top of the core language.
  4. super.foo property access won't hopefully work within mixins but it will with subclasses methods.
  5. super() calls won't hopefully work in mixins constructors because you've no idea what kind of arguments you are going to receive. Subclasses still work as expected.
  6. Mixins are able to extend other mixins.
  7. instanceof has no reason to be even considered in this scenario since we are composing objects.
  8. Mixin definitions do not require library support - they can be written in a universal style and be compatible with non classes based engines too.
  9. bonus: less memory consumption overall, there's no runtime duplication for the same logic each time
I still want to thanks Justin because he made it quite clear that still not everyone fully understands mixins but there's surely a real-world need, or better demand, in the current JavaScript community.

Let's hope the next version of ECMAScript will let all of us compose in a standard way that doesn't include a footgun like super through intermediate classes definition could do.
Thanks for your patience reading through this!




an

Playing with Sockets and Geolocation

There is a little experiment I've created more than a year ago. It's incomplete and I never got time to make it an official product and finalize it. However, somebody told me it's a freaking cool idea so I've decided to share it with you.

A Dragon Ball Z Spirit Bomb like social App

Full Article


an

JS Glossary On Demand: Now Paperback!

Updated and Hand Crafted for A5

Imagine you are trying to learn something about Art and images are split between different pages ... that's what I feel every time I read a technical book with code examples split and very hard to follow.
It's embarrassing how much work it takes to have a proper pagination that never breaks for both paragraphs and code examples but I've finally did it in here!
The Leanpub E-Book, specially the PDF version, is also well formatted but it's for US letter.
I've ordered a proof of copy for both formats but there's no competition: the Lulu.com A5 paperback version is too handy and kinda cute!

Full Article


an

A Transpiled JS Limbo

When I've updated my Custom Elements polyfill to reflect latest V1 specifications, I've realized modern JavaScript has a super problem that transpilers are incapable to fix.
Ideally, we should serve native to native capable browsers, and transpiled, to incapable one ... nobody is doing it though, and this is an issue.




an

Meanwhile ...

I know most followers still have this RSS feed subscription, and they might have missed some of the later updates so here a recap:

  • I've brough Markdown easiness to JS console, it lets you write better logs such console.log('this *is* #green(awesome)!')
  • I've explained how to manage states and diff them, or perform other common operations, through prototypal inheritance. This concept works so well, Netflix reduced its merging performance from 500ms to 60ms.
  • I've talked about my new VR ready, game-centric PC that made me very happy in on a budget as low (for a gaming PC) as £600
  • I've also used latest archibold.io installer to bring Arch Linux from scratch on such PC, and on VirtualBox too for a spin
  • I've finally uninstalled Here Maps from my phone, and discovered the same day the awesome maps.me which is already a great replacement
  • last, but not least, I've created a 100 LOC utility that lets you opt out Babel class transformation, using object literals to define actually native ES2015 classes. The reason is here, while the utility is on GitHub.
Am I forgetting anything? Oh yes, I've soldered together a Raspberry Pi Zero and a WaveShare 3.5" Touch Screen LCD, booting Web Kiosk in seconds, for a device that could be sold with the size of an i-clip and with battery and wifi included for like $35, but nobody gave a damn heck about it so my Kickstarter won't even be proposed.
P.S. I am using Medium more and more, follow me there too (at least until Medium lasts)




an

Mapping the country of regions: the Chorographic Commission of nineteenth-century Colombia / Nancy P. Appelbaum, the University of North Carolina Press, Chapel Hill

Hayden Library - GA693.7.A1 A77 2016




an

The world and all the things upon it: native Hawaiian geographies of exploration / David A. Chang

Hayden Library - G222.C53 2016




an

Wildlife tourism, environmental learning and ethical encounters: ecological and conservation aspects / edited by Ismar Borges de Lima, Ronda J. Green

Online Resource




an

Frederick de Wit and the first concise reference atlas / George Carhart

Hayden Library - GA923.6.W57 C37 2016




an

Springer handbook of global navigation satellite systems / Peter J.G. Teunissen, Oliver Montenbruck (Eds.)

Online Resource




an

GIS and environmental monitoring: applications in the marine, atmospheric and geomagnetic fields / Stavros Kolios, Andrei V. Vorobev, Gulnara R. Vorobeva, Chrysostomos Stylios

Online Resource




an

Voyager: travel writings / Russell Banks

Hayden Library - G465.B369 2016




an

The ArcGIS book: 10 big ideas about applying geography to your world / Christian Harder, editor

Rotch Library - G70.212.A7352 2015




an

Geographical information systems theory, applications and management: second International Conference, GISTAM 2016, Rome, Italy, April 26-27, 2016, Revised selected papers / Cédric Grueau, Robert Laurini, Jorge Gustavo Rocha (eds.)

Online Resource




an

Spatial big data science: classification techniques for Earth observation imagery / Zhe Jiang, Shashi Shekhar

Online Resource




an

Placing empire: travel and the social imagination in imperial Japan / Kate McDonald

Online Resource




an

Placing names: enriching and integrating gazetteers / edited by Merrick Lex Berman, Ruth Mostern, and Humphrey Southall

Hayden Library - G103.5.P53 2016




an

Hyperspectral remote sensing: fundamentals and practices / Ruiliang Pu

Online Resource




an

Integrating scale in remote sensing and GIS / [edited by] Dale A. Quattrochi, Elizabeth A. Wentz, Nina Siu-Ngan Lam, Charles W. Emerson

Rotch Library - G70.212.I565 2017




an

Ecotourism's promise and peril: a biological evaluation / Daniel T. Blumstein, Benjamin Geffroy, Diogo S. M. Samia, Eduardo Bessa, editors

Online Resource