an These Birds Eat Fire, or Close to It, to Live Another Day By www.nytimes.com Published On :: Tue, 28 Apr 2020 16:00:23 GMT A willingness to experiment with new foods and ways of foraging may make some birds less vulnerable to extinction. Full Article
an A Bit of Relief: Tea and Toast By www.nytimes.com Published On :: Fri, 01 May 2020 19:35:15 GMT “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.” Full Article
an Top Kashmiri Militant Is Killed, Sparking Protests and Rage By www.nytimes.com Published On :: Wed, 06 May 2020 17:18:06 GMT 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. Full Article
an Gas Leak in India at LG Factory Kills 11 and Sickens Hundreds By www.nytimes.com Published On :: Thu, 07 May 2020 04:01:32 GMT Residents in eastern India woke up in the middle of the night surrounded by a cloud of styrene vapor. Many couldn’t breathe. Full Article
an BCI Outraged by Planned Kill of Endangered Bats By www.batcon.org Published On :: Fri, 21 Dec 2018 13:39:07 -0600 BCI condemns the decision of the government of Mauritius to kill 13,000 individuals of the endangered Mauritius fruit bat (Pteropus niger). .... Full Article Latest News
an Protecting Homes and Food Sources of Two Critical Bat Species By www.batcon.org Published On :: Wed, 30 Jan 2019 04:36:00 -0600 Lesser Long-Nosed and Mexican Long-Nosed Bats Receiving Support from Bat Conservation International’s New Program Supported by XTO Energy Full Article Press Release
an Fat Bats Withstand Effects of White-nose Syndrome By www.batcon.org Published On :: Wed, 20 Feb 2019 10:36:00 -0600 BCI announced today that two of its esteemed scientists, Tina Cheng and Winifred Frick, published a paper in the Journal of Animal Ecology Full Article Press Release
an Global Bat Populations Need Research and Conservation Action By www.batcon.org Published On :: Mon, 08 Apr 2019 10:36:00 -0500 New Paper from Bat Conservation International Scientists Underscores the Need for Expanded Research and Data Collection to Better Protect Bat Species Full Article Press Release
an Helping Migratory Bats with Agave Planting Event By www.batcon.org Published On :: Thu, 18 Apr 2019 10:36:00 -0500 BCI announced today the launch of an agave planting initiative throughout Southwest, Tucson area, and Mexico to support the lesser long-nosed bat Full Article Press Release
an Fungus that causes bat-killing disease White-nose Syndrome is expanding in Texas By www.batcon.org Published On :: Wed, 08 May 2019 08:36:00 -0500 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 Full Article Press Release
an Research Links Bats to Growth of Durian, the “World’s Stinkiest Fruit” By www.batcon.org Published On :: Thu, 21 Nov 2019 14:40:22 -0600 Full Article Press Release
an Disney Conservation Fund Helps Bat Conservation International Support Wildlife and the Environment By www.batcon.org Published On :: Tue, 26 Nov 2019 10:58:06 -0600 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 FolgarBat Conservation InternationalTel: 512.327.9721 ext. 410Email: jfolgar@batcon.org ### Full Article Press Release
an Coronavirus and changes to BCI’s Operations By www.batcon.org Published On :: Wed, 08 Apr 2020 11:02:11 -0500 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. Full Article Latest News
an BCI’s FAQ on Bats and Covid-19 By www.batcon.org Published On :: Fri, 24 Apr 2020 07:40:00 -0500 Bat Conservation International is monitoring the news and information about the spreading novel coronavirus (nCoV-2019) Full Article Latest News
an Rivers in the Landscape, 2nd Edition By www.wiley.com Published On :: 2020-02-10T05:00:00Z 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... Full Article
an Beaches and Coasts, 2nd Edition By www.wiley.com Published On :: 2020-02-10T05:00:00Z A new edition of a unique textbook that provides an exhaustive treatment of the world's different coastswith 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... Full Article
an Industrial Environmental Management: Engineering, Science, and Policy By www.wiley.com Published On :: 2020-02-26T05:00:00Z Provides aspiring engineers with pertinent information and technological methodologies on how best to manage industry's modern-day environment concernsThis 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... Full Article
an The World Today: Concepts and Regions in Geography, 8th Edition By www.wiley.com Published On :: 2020-03-24T04:00:00Z 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... Full Article
an Social Movements: An Introduction, 3rd Edition By www.wiley.com Published On :: 2020-04-06T04:00:00Z 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... Full Article
an Biogeochemical Cycles: Ecological Drivers and Environmental Impact By www.wiley.com Published On :: 2020-04-14T04:00:00Z 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... Full Article
an Encyclopedia of Water: Science, Technology, and Society, 5 Volume Set By www.wiley.com Published On :: 2020-04-14T04:00:00Z A peer reviewed, comprehensive encyclopedia that reflects the current state of water science and engineering from multidisciplinary global viewpointsWater 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... Full Article
an Gas Injection into Geological Formations and Related Topics, Volume 8 By www.wiley.com Published On :: 2020-04-21T04:00:00Z 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... Full Article
an The Mediterranean Sea in the Era of Global Change 2: 30 Years of Multidisciplinary Study of the Ligurian Sea By www.wiley.com Published On :: 2020-04-28T04:00:00Z 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... Full Article
an The Mediterranean Sea in the Era of Global Change 1: 30 Years of Multidisciplinary Study of the Ligurian Sea By www.wiley.com Published On :: 2020-04-28T04:00:00Z 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... Full Article
an Companion to Women's and Gender Studies By www.wiley.com Published On :: 2020-05-04T04:00:00Z A comprehensive overview of the interdisciplinary field of Women's and Gender Studies, featuring original contributions from leading experts from around the worldThe 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... Full Article
an ArchLinux UEFI and Dell XPS 2015 By webreflection.blogspot.com Published On :: Fri, 31 Jul 2015 14:56:00 +0000 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 EditionSo 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 managerIf 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 By webreflection.blogspot.com Published On :: Sat, 15 Aug 2015 19:39:00 +0000 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. Full Article
an On Cancelable Promises By webreflection.blogspot.com Published On :: Thu, 03 Sep 2015 21:45:00 +0000 UpdateThe 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 fineWe'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: 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" subclassit's widely agreed that cancellation should be rather synonymous of a rejection, there's no forever pending issue there, just a plain simple rejectionone 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?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 ignoredthe 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 codeIn 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 promisevar 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 happensvar 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 exposedconsole.log( derived.resolve, derived.reject, derived.abort); Moaaar liesIf 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 outchainedLie.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 SummaryPromises 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? Full Article
an On Ignored Users Spoken Language By webreflection.blogspot.com Published On :: Fri, 02 Oct 2015 09:43:00 +0000 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 MoneyCompanies paying for Online AdvertisementCompanies selling onlineCompanies providing online services Who Is Responsibleevery 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 languageevery 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 wayUsing 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 RightI 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. GoogleBefore 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 By webreflection.blogspot.com Published On :: Tue, 06 Oct 2015 13:35:00 +0000 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. Full Article
an The missing analysis in JavaScript "Real" Mixins By webreflection.blogspot.com Published On :: Wed, 13 Jan 2016 17:44:00 +0000 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 inheritanceIt 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 ES2015class 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 caseThe 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 constructorlet super = (...args) => A.apply(this, arguments);// used within any other methodsuper.method = (...args) => A.prototype.method.apply(this, args);// used as accessorObject.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: With JavaScript finally supporting super, so should mixinssuper.foo property access works within mixins and subclasses.super() calls work in constructors.One of the biggest benefits is that super works inside methods of the subclass and the mixins.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 surfacea geographical regionany section reserved for a specific functionextent, range, or scopefield of study, or a branch of a field of studya piece of unoccupied ground; an open spacethe space or site on which a building standsNow 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 abilityNo 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 classclass 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** CompositionIn 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: Mixins are added to the prototype chain.Mixins are applied without modifying existing objects.Mixins do no magic, and don't define new semantics on top of the core language.super.foo property access won't hopefully work within mixins but it will with subclasses methods.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.Mixins are able to extend other mixins.instanceof has no reason to be even considered in this scenario since we are composing objects.Mixin definitions do not require library support - they can be written in a universal style and be compatible with non classes based engines too.bonus: less memory consumption overall, there's no runtime duplication for the same logic each timeI 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! Full Article
an Playing with Sockets and Geolocation By webreflection.blogspot.com Published On :: Thu, 21 Jan 2016 13:16:00 +0000 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 AppFull Article
an JS Glossary On Demand: Now Paperback! By webreflection.blogspot.com Published On :: Fri, 26 Feb 2016 11:24:00 +0000 the A5 paperback version of my `JS glosary on demand` book is now live on lulu o/ https://t.co/4cUd2w1pnn pic.twitter.com/rXxek3TeAp— Andrea Giammarchi (@WebReflection) February 25, 2016 Updated and Hand Crafted for A5Imagine 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 By webreflection.blogspot.com Published On :: Wed, 31 Aug 2016 19:50:00 +0000 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. Full Article
an Meanwhile ... By webreflection.blogspot.com Published On :: Sun, 15 Jan 2017 10:07:00 +0000 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) Full Article
an Mapping the country of regions: the Chorographic Commission of nineteenth-century Colombia / Nancy P. Appelbaum, the University of North Carolina Press, Chapel Hill By library.mit.edu Published On :: Sun, 16 Jul 2017 06:32:31 EDT Hayden Library - GA693.7.A1 A77 2016 Full Article
an The world and all the things upon it: native Hawaiian geographies of exploration / David A. Chang By library.mit.edu Published On :: Sun, 16 Jul 2017 06:32:31 EDT Hayden Library - G222.C53 2016 Full Article
an Wildlife tourism, environmental learning and ethical encounters: ecological and conservation aspects / edited by Ismar Borges de Lima, Ronda J. Green By library.mit.edu Published On :: Sun, 23 Jul 2017 06:33:28 EDT Online Resource Full Article
an Frederick de Wit and the first concise reference atlas / George Carhart By library.mit.edu Published On :: Sun, 23 Jul 2017 06:33:28 EDT Hayden Library - GA923.6.W57 C37 2016 Full Article
an Springer handbook of global navigation satellite systems / Peter J.G. Teunissen, Oliver Montenbruck (Eds.) By library.mit.edu Published On :: Sun, 23 Jul 2017 06:33:28 EDT Online Resource Full Article
an GIS and environmental monitoring: applications in the marine, atmospheric and geomagnetic fields / Stavros Kolios, Andrei V. Vorobev, Gulnara R. Vorobeva, Chrysostomos Stylios By library.mit.edu Published On :: Sun, 23 Jul 2017 06:33:28 EDT Online Resource Full Article
an Voyager: travel writings / Russell Banks By library.mit.edu Published On :: Sun, 30 Jul 2017 06:29:46 EDT Hayden Library - G465.B369 2016 Full Article
an The ArcGIS book: 10 big ideas about applying geography to your world / Christian Harder, editor By library.mit.edu Published On :: Sun, 20 Aug 2017 06:38:02 EDT Rotch Library - G70.212.A7352 2015 Full Article
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.) By library.mit.edu Published On :: Sun, 27 Aug 2017 06:34:53 EDT Online Resource Full Article
an Spatial big data science: classification techniques for Earth observation imagery / Zhe Jiang, Shashi Shekhar By library.mit.edu Published On :: Sun, 27 Aug 2017 06:34:53 EDT Online Resource Full Article
an Placing empire: travel and the social imagination in imperial Japan / Kate McDonald By library.mit.edu Published On :: Sun, 1 Oct 2017 06:31:59 EDT Online Resource Full Article
an Placing names: enriching and integrating gazetteers / edited by Merrick Lex Berman, Ruth Mostern, and Humphrey Southall By library.mit.edu Published On :: Sun, 8 Oct 2017 06:33:37 EDT Hayden Library - G103.5.P53 2016 Full Article
an Hyperspectral remote sensing: fundamentals and practices / Ruiliang Pu By library.mit.edu Published On :: Sun, 29 Oct 2017 06:34:15 EDT Online Resource Full Article
an Integrating scale in remote sensing and GIS / [edited by] Dale A. Quattrochi, Elizabeth A. Wentz, Nina Siu-Ngan Lam, Charles W. Emerson By library.mit.edu Published On :: Sun, 5 Nov 2017 06:36:29 EST Rotch Library - G70.212.I565 2017 Full Article
an Ecotourism's promise and peril: a biological evaluation / Daniel T. Blumstein, Benjamin Geffroy, Diogo S. M. Samia, Eduardo Bessa, editors By library.mit.edu Published On :: Sun, 19 Nov 2017 06:29:25 EST Online Resource Full Article