POPULARITY
An old friend is back: Luke Sylvia joins the show and gives his thoughts on the season. RSVP for the Watch Party: https://www.opentable.com/booking/experiences-availability?rid=1334158&restref=1334158&experienceId=443435&dateTime=2025-03-14T19%3A00%3A00&partySize=2&modal=false&source= Court of Dreams experience tickets: https://fevo-enterprise.com/event/Sixthman2 Join our Patreon: https://www.patreon.com/thesixthmanshow Follow Us: https://www.thesixthmanshow.com/ IG: https://www.instagram.com/sixthmanshow Twitter: https://twitter.com/SixthManShow YouTube: https://twitter.com/SixthManShow Facebook: https://www.facebook.com/TheSixthManShow Twitch: https://www.twitch.tv/sixthmanshow Hosts: @j_osborne21 & @kevin_tucker_ Music: Prod. by Tantu Beats If you enjoyed the show please LIKE & SUBSCRIBE!
This show has been flagged as Clean by the host. I have set up some LoRaWAN temperature and humidity sensors, and am using the Things Stack to collect the data. This gets processed via a web-hook and rendered as a graph. The LoRaWAN Alliance - https://lora-alliance.org Mastering LoRaWAN - https://www.amazon.com/Mastering-LoRaWAN-Comprehensive-Communication-Connectivity-ebook/dp/B0CTRH6MV6 The Things Industries - https://thethingsindustries.com server.py import json import sqlite3 import logging from http.server import BaseHTTPRequestHandler, HTTPServer rooms = { 'eui-24e12*********07': 'living-room', 'eui-24e12*********54': 'hall', 'eui-24e12*********42': 'downstairs-office', 'eui-24e12*********35': 'kitchen', 'eui-24e12*********29': 'conservatory', 'eui-24e12*********87': 'landing', 'eui-24e12*********45': 'main-bedroom', 'eui-24e12*********89': 'upstairs-office', 'eui-24e12*********38': 'spare-bedroom', 'eui-24e12*********37': 'playroom' }; # Configure logging logging.basicConfig(filename="server_log.txt", level=logging.INFO, format="%(asctime)s - %(message)s") # Define the web server handler class MyServerHandler(BaseHTTPRequestHandler): # Handle POST requests def do_POST(self): length = int(self.headers.get('Content-Length')) data = self.rfile.read(length).decode('utf-8') try: # Validate and parse JSON data json_data = json.loads(data) logging.info(f"Received valid JSON data: {json_data}") # Write the data to database id = json_data["end_device_ids"]["device_id"] room = rooms.get(id) readat = json_data["uplink_message"]["rx_metadata"][0]["time"] temp = json_data["uplink_message"]["decoded_payload"]["temperature"] hum = json_data["uplink_message"]["decoded_payload"]["humidity"] conn = sqlite3.connect('data.db') sql = """CREATE TABLE IF NOT EXISTS data ( id INTEGER PRIMARY KEY AUTOINCREMENT, room TEXT, readat DATETIME, temp DECIMAL(4,1), hum DECIMAL(4,1) );""" conn.execute(sql) sql = "INSERT INTO data (room, readat, temp, hum) VALUES (?, ?, ?, ?)" conn.execute(sql, (room, readat, temp, hum)) conn.commit() conn.close() self.send_response(200) self.send_header("Content-type", "text/html") self.end_headers() self.wfile.write(bytes("Data received and logged!", "utf-8")) except json.JSONDecodeError: logging.error("Invalid JSON data received.") self.send_response(400) # Bad Request self.send_header("Content-type", "text/html") self.end_headers() self.wfile.write(bytes("Invalid JSON format.", "utf-8")) except PermissionError: logging.error("File write permission denied.") self.send_response(500) # Internal Server Error self.send_header("Content-type", "text/html") self.end_headers() self.wfile.write(bytes("Server error: Unable to write data to file.", "utf-8")) # Start the server server_address = ('0.0.0.0', 12345) # Customize host and port if needed httpd = HTTPServer(server_address, MyServerHandler) print("Server started on http://localhost:12345") httpd.serve_forever() process.php const data1 = { datasets: [ ], labels: [] }; const ctx1 = document.getElementById("temp").getContext("2d"); const options1 = { type: "line", data: data1, options: { elements: { point:{ radius: 0 } } } }; const chart1 = new Chart(ctx1, options1); const data2 = { datasets: [ ], labels: [] }; const ctx2 = document.getElementById("hum").getContext("2d"); const options2 = { type: "line", data: data2, options: { elements: { point:{ radius: 0 } } } }; const chart2 = new Chart(ctx2, options2); Temperature Chart Humidity Chart Provide feedback on this episode.
This week we are covering the Astro charts of important events and how to choose the best time for that event. Here is the link to Vivian's book https://ia904708.us.archive.org/30/items/in.ernet.dli.2015.128090/2015.128090.Electional-Astrology.pdf *The Modern Text Book of Astrology https://amzn.to/3Wv00LB *As an Amazon Associate, I earn commission from qualifying purchases. Our Wedding Libra Asc, ruled by Venus, Venus in 9th conjunct Sun Laying Foundation Stone of the Greenwich Observatory Sagittarius Asc, ruler to Sag = Jupiter, Jupiter conjunct Asc EXACT! 'President' Trump Being Sworn-in NOTE: This is an event chart, NOT an Election(al) 'Map' Chart Taurus Asc, Uranus retrograde conjuct Asc References Time Foundation stone laid for Greenwich Observatory https://www.rmg.co.uk/royal-observatory/history#:~:text=At%203.14pm%20on%2010,of%20the%20new%20Royal%20Observatory. John Flamsteed https://www.astro.com/astro-databank/Flamsteed,_John Vivian Robson natal chart: https://www.astro.com/astro-databank/Robson,_Vivian
In this episode of “613 Books” podcast, producer and host Heather Dean welcomes back esteemed authors Riva Pomerantz, Lesley Kaplan, and Chaya Baila Leiber who were Heather's featured guests over the course of Season 2 to tell us about the inspiring and practical books that are on their reading table. Subscribe to “613 Books Podcast” and discover new books every week! = = = Show notes: Featured Guest, 1st Segment: Riva Pomerantz, author of many bestselling books including “Take 2” To contact Riva about writing, mentoring, speaking engagements and more, drop her a line though her website: www.RivaPomerantz.com For content and details about Skill Nosh, visit: www.skillnosh.com Riva's Reading Table Selection: “The Other Side of the Story” by (Rebbetzin) Yehudis Samet To Purchase from Artscroll's website: https://www.artscroll.com/Books/9780899065199.html To Purchase on Amazon: https://www.amazon.com/Other-Side-Story-Artscroll/dp/0899065198 = = = Featured Guest, 2nd Segment: Lesley Kaplan author of SMALL BUSINESS SUCCESS TOOLBOX & GUIDE: HOW TO “BUILD & BRAND YOUR BIZ” For Tickets and Information for the 3rd Jerusalem Business Conference | #JLMBIZCON: https://lesleykaplan.com/jerusalem-business-conference/ DATE/TIME of the 3rd Jerusalem Business Conference: Monday, November 18th, 2024 | 9.00 a.m. – 17.00 p.m. To Purchase “SMALL BUSINESS SUCCESS TOOLBOX & GUIDE: HOW TO “BUILD & BRAND YOUR BIZ”” on Amazon: https://www.amazon.com/SMALL-BUSINESS-SUCCESS-TOOLBOX-GUIDE-ebook/dp/B0CH5YBD1C To Purchase on Amazon in Paperback and E-book formats https://www.amazon.com/gp/aw/d/B0CTCXDC2W/ref=tmm_pap_swatch_0?ie=UTF8&qid=1706421929&sr=8-1 ISRAEL ORDERS – Paperback – Delivery to your door: https://lesleykaplan.com/product/small-business-success-toolbox-guide/ Lesley's website: https://lesleykaplan.com/ To contact Lesley through her website: https://lesleykaplan.com/lesley-kaplan-contact/ Lesley's Reading Table Selection: “Profit First” by Mike Michalowicz To Purchase on Amazon: https://www.amazon.com/Profit-First-Transform-Cash-Eating-Money-Making-ebook/dp/B01HCGYTH4 Mike Michalowicz's website: https://mikemichalowicz.com/profit-first/ = = = Featured Guest, 3rd Segment: Chaya Baila Leiber, author of “Who Wears a Yarmulke?” (Menucha Publishers) To Purchase your copy of “Who Wears a Yarmulke?” https://menuchapublishers.com/products/who-wears-a-yarmulke Write to Chaya Baila Leiber: cbaylieber@gmail.com Chaya Baila's Reading Table Selection: “Even if I'm Not” by Devorie Kreiman To purchase “Even if I'm Not” from the publisher, Israel Bookshop: https://israelbookshoppublications.com/products/even-if-im-not = = = Show Announcer for 613 Books Podcast: Michael Doniger Michael's contact info, voice-over samples, and demo: https://michaeldoniger.com/
Jake and Michael discuss all the latest Laravel releases, tutorials, and happenings in the community.This episode is sponsored by Mailtrap, an Email Delivery Platform that developers love. An email-sending solution with industry-best analytics, SMTP, and email API, SDKs for major programming languages, and 24/7 human support. Try for Free at MAILTRAP.IOShow linksView Third-party Relations in model:show - Now Available in Laravel 11.11 Sentry and Laravel announce a new partnership Laravel Herd v1.7 is out with updates to the dump UI Create a DateTime from a Timestamp With this New Method Coming to PHP 8.4 Manage Events, Feature Flags, and More with PostHog for Laravel Randomize Command Execution Time with the Chaotic Schedule Package for Laravel Share Error Package for Laravel's New Exception Page Neovim Plugin to for Navigating Laravel and Livewire Components Asserting a JSON Response Structure in Laravel
In this episode, we delve into the latest developments including the release of Elixir 1.17-rc0, featuring significant type system improvements and new functions like DateTime.shift. We also discuss some unexpected compiler and JIT advancements in OTP 27, which are already showing performance boosts. Elixir celebrated its 12th birthday and the Erlang docs completed their migration to ExDoc, enhancing accessibility and integration. Tune in for these insightful updates and more! Show Notes online - http://podcast.thinkingelixir.com/205 (http://podcast.thinkingelixir.com/205) Elixir Community News - https://stackoverflow.az1.qualtrics.com/jfe/form/SV_6rJVT6XXsfTo1JI?site=stackoverflow.com (https://stackoverflow.az1.qualtrics.com/jfe/form/SV_6rJVT6XXsfTo1JI?site=stackoverflow.com?utm_source=thinkingelixir&utm_medium=shownotes) – StackOverflow Developer Survey link. - https://github.com/elixir-lang/elixir/releases/tag/v1.17.0-rc.0 (https://github.com/elixir-lang/elixir/releases/tag/v1.17.0-rc.0?utm_source=thinkingelixir&utm_medium=shownotes) – Release tag for Elixir 1.17-rc0. - https://github.com/elixir-lang/elixir/blob/v1.17.0-rc.0/CHANGELOG.md (https://github.com/elixir-lang/elixir/blob/v1.17.0-rc.0/CHANGELOG.md?utm_source=thinkingelixir&utm_medium=shownotes) – Changelog for Elixir 1.17-rc0. - https://x.com/marpo60/status/1793993127939969361 (https://x.com/marpo60/status/1793993127939969361?utm_source=thinkingelixir&utm_medium=shownotes) – Marcelo Dominguez highlights advantages of the new type system in Elixir 1.17. - https://hexdocs.pm/elixir/main/DateTime.html#shift/3 (https://hexdocs.pm/elixir/main/DateTime.html#shift/3?utm_source=thinkingelixir&utm_medium=shownotes) – Documentation for the DateTime.shift function in Elixir. - https://hexdocs.pm/elixir/1.17.0-rc.0/Kernel.html#to_timeout/1 (https://hexdocs.pm/elixir/1.17.0-rc.0/Kernel.html#to_timeout/1?utm_source=thinkingelixir&utm_medium=shownotes) – Documentation to convert durations to milliseconds in Elixir 1.17-rc0. - https://www.erlang.org/news/170#compiler-and-jit-improvements (https://www.erlang.org/news/170#compiler-and-jit-improvements?utm_source=thinkingelixir&utm_medium=shownotes) – News about OTP 27 compiler and JIT improvements. - https://x.com/sorentwo/status/1795044358850298343 (https://x.com/sorentwo/status/1795044358850298343?utm_source=thinkingelixir&utm_medium=shownotes) – Discussion about a 12.5% speed improvement in the Oban test suite. - https://github.com/erlang/otp/issues/8469 (https://github.com/erlang/otp/issues/8469?utm_source=thinkingelixir&utm_medium=shownotes) – Regression of :ets.select in OTP 27 mentioned. - https://www.erlang.org/doc/readme.html (https://www.erlang.org/doc/readme.html?utm_source=thinkingelixir&utm_medium=shownotes) – New home for Erlang documentation. - Get clear on old Elixir Mix episodes being released as new. - https://www.imdb.com/title/tt29816472/ (https://www.imdb.com/title/tt29816472/?utm_source=thinkingelixir&utm_medium=shownotes) – The Thinking Elixir Podcast on IMDB?? - https://dashbit.co/blog/req-v0.5 (https://dashbit.co/blog/req-v0.5?utm_source=thinkingelixir&utm_medium=shownotes) – Announcement of Req v0.5 with improved testing support and error handling. - https://gleam.run/news/fault-tolerant-gleam/ (https://gleam.run/news/fault-tolerant-gleam/?utm_source=thinkingelixir&utm_medium=shownotes) – Release notes for Gleam v1.2.0, focusing on fault-tolerant compilation. - https://x.com/jacob_luetzow/status/1794075125202956353 (https://x.com/jacob_luetzow/status/1794075125202956353?utm_source=thinkingelixir&utm_medium=shownotes) – José Valim celebrating Elixir's 12th Birthday. - https://www.youtube.com/live/epKeT8-hafE (https://www.youtube.com/live/epKeT8-hafE?utm_source=thinkingelixir&utm_medium=shownotes) – Video of José Valim discussing Elixir on its 12th Birthday. Do you have some Elixir news to share? Tell us at @ThinkingElixir (https://twitter.com/ThinkingElixir) or email at show@thinkingelixir.com (mailto:show@thinkingelixir.com) Find us online - Message the show - @ThinkingElixir (https://twitter.com/ThinkingElixir) - Message the show on Fediverse - @ThinkingElixir@genserver.social (https://genserver.social/ThinkingElixir) - Email the show - show@thinkingelixir.com (mailto:show@thinkingelixir.com) - Mark Ericksen - @brainlid (https://twitter.com/brainlid) - Mark Ericksen on Fediverse - @brainlid@genserver.social (https://genserver.social/brainlid) - David Bernheisel - @bernheisel (https://twitter.com/bernheisel) - David Bernheisel on Fediverse - @dbern@genserver.social (https://genserver.social/dbern) - Tyler Young - @TylerAYoung (https://twitter.com/TylerAYoung) - Tyler Young on Fediverse - @tylerayoung@fosstodon.org (https://fosstodon.org/@tylerayoung)
What are real-life examples of using Python decorators? How can you harness their power in your code? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder's Weekly articles and projects.
#caneloalvarez #canelo #canelocharlo ️️️☎️Canelo Alvarez vs Jermell Charlo: It's Fight Week, Date, Time, and where To Watch ❗️
Hello Angels!!!!! Today's episode is a HIGHLY informative and juicy one because we are talking about Relationship science!!! I talk about why you should wait when dating and entering into relationships. Have ever wondered why you feel so attached to that guy? Why you cant leave that relationship??? Why that guy may have lost interest? Here are some key takeaways from the episode. ~ Oxytocin is often referred to as the "love hormone" or "bonding hormone." It is released during physical touch, emotional connections, and sexual activity. Oxytocin is responsible for promoting attachment, social bonding, and nurturing behaviors. It plays a vital role in forming emotional connections between partners.~ Vasopressin is a hormone closely associated with monogamous behavior and pair bonding. Research suggests that vasopressin plays a role in promoting long-term commitment and territorial behaviors. In male mammals, including humans, vasopressin influences protective and nurturing behaviors towards partners and offspring.~ Oxytocin and vasopressin often work together to strengthen social and emotional bonds. Oxytocin's effects are amplified when partnered with vasopressin, leading to increased feelings of attachment, empathy, and trust between individuals.Understanding the role of oxytocin and vasopressin in human bonding highlights the biochemical foundation that supports strong connections. By waiting, individuals give these hormones the opportunity to work their magic, deepening their understanding of each other and enhancing the potential for a meaningful, long-term relationship.Click the link to access my other platforms and you can book a 1:1 consult with me! All My Platforms! If you have enjoyed this episode, please be sure to rate and review this podcast! Thank you for your time, thank you for listening and thank you for your support! And remember to always stay Kind! xo AThis show is part of the Spreaker Prime Network, if you are interested in advertising on this podcast, contact us at https://www.spreaker.com/show/5482848/advertisement
Owning and operating a business is a continual streak of tests that ultimately prove the trustworthiness of the business that built. The business of scammers and hucksters fall apart over time forcing them to be in a state of constant reinvention and re-huckstering. Traveling various parts of our historic world over the past few months has reminded me of the longevity and duration of things. Walking the streets of Rome flanked by artifacts from late B.C. and early A.D. eras has a way of sobering the hardships of your time. Walking through the carved caves of the Cappadocia region of modern Turkey sobers you to the challenges and hardships of previous cultures. Every culture endures testing. Every generation is put on trial so as to mark the trustworthiness and endurance of that generation. Endurance allows for longevity and the hope of seeing the days that are hoped for. Without endurance, life is short and hope is fleeting. The ingredients of our words fuel much of the cocktail of what is continually being tested through the swishing and swashing of the minds of those around. Each word that comes from the mouth of a leader is filtered through the taste buds of life's mental truth machine and filed away in the vaults of our minds. “But you said” has caught many a leader in moments of double-speak not realizing that a mere fit of external processing was being received by all others as gospel truth. In your strategy to be more decisive, more creative, more inventive, or more direct, always remember that “a fool who keeps his mouth shut is considered wise” (Proverbs 17:28). Your words enter the world with the longevitous ink of a tattoo. Once out, your words are nearly impossible to cram back in and the surfaced emotions are floating for all to sense and respond. If you are a leader or an owner who uses words (ahem, all of us) then here are a few devices that will bode well for you to adopt and deploy. First, be slow to speak and quick to listen. This was wisdom provided to a group of Jewish citizens who had been thrown out of their homeland and were living a scattered lot in unfamiliar territories. Their house was not their home, their streets were not their domain, and the people were not their people. Look, see, listen. Very rarely has a winning strategy been speak then think. The fire of anger is stoked by the sparks of unfiltered words. Want to throw a small group into a frenzied rage? Make a habit of speaking the first thing that comes to your mind and you too will have created a remarkable and unfortunate riot, or at least a really frustrating place to work. Speak slowly. Listen quickly. Second, place a timeline on your ideas. An idea is often birthed into an assumption of perpetuity meaning it never ends. Want to start meeting in a small group? What happens when you are tired of meeting? Want to start volunteering? What happens when it is clear that your voluntary role has run it course? There is no shame in running ideas through a test period of limited time. Take an idea and declare, “We will try this and monitor the results for the next 3 months and then decide on DATE/TIME whether to extend or extinguish.” The boundary of a start and stop timeline will allow everyone involved to feel a sense of urgency, and also a sense of freedom knowing that if the idea does not provide its intended outcome, then we mustn't be married to a bad idea for life. Third, remind yourself that your words are sticky. The words that come out of your mouth as a leader carry a volume and camera-like photograph that burns itself into the emotional landscape of the people with ears to hear. Your words tend to stick longer and with greater weight than other because they directly impact the day to day lives of the people you work with. Be careful with “just spitballing”. It is probably best to remember that spitballing can be construed as truth-telling and there is not much you can do to change that. We can say, “Well it's not my fault that is what they heard!” The RPMs of great leadership can guide us in how we should speak. Repetition ensures that what we say has fidelity over time. Predictability ensures that what we say will remain consistent over time. Meaning built into our words will ensure that we have baked in the mission and the values that we hold dear to our decision-making over time. Your words matter, and the matter of your words stick.
2023-08-08 Weekly News - Episode 201Watch the video version on YouTube at https://youtube.com/live/HJHCDA-UbV8?feature=shareHosts: Eric Peterson - Senior Developer at Ortus Solutions Daniel Garcia - Senior Developer at Ortus Solutions Thanks to our Sponsor - Ortus SolutionsThe makers of ColdBox, CommandBox, ForgeBox, TestBox and all your favorite box-es out there. A few ways to say thanks back to Ortus Solutions: Like and subscribe to our videos on YouTube. Help ORTUS reach for the Stars - Star and Fork our Repos Star all of your Github Box Dependencies from CommandBox with https://www.forgebox.io/view/commandbox-github Subscribe to our Podcast on your Podcast Apps and leave us a review Sign up for a free or paid account on CFCasts, which is releasing new content every week BOXLife store: https://www.ortussolutions.com/about-us/shop Buy Ortus's Books 102 ColdBox HMVC Quick Tips and Tricks on GumRoad (http://gum.co/coldbox-tips) Learn Modern ColdFusion (CFML) in 100+ Minutes - Free online https://modern-cfml.ortusbooks.com/ or buy an EBook or Paper copy https://www.ortussolutions.com/learn/books/coldfusion-in-100-minutes Patreon Support (Amazing)We have 40 patreons: https://www.patreon.com/ortussolutions. News and AnnouncementsPassing the Baton: Lucee 5.4 and Hibernate ORMAs of Lucee 5.4.1.8, new Lucee builds will no longer bundle the (Lucee) Hibernate extension. This means that if you rely on Hibernate ORM in your CFML application, you will need to manually bundle the Hibernate extension into your Lucee server. Let's read on for more info.The NewsFirst, let's start with the official note from the Lucee 5.4.1.8 Stable Release notes (courtesy of Zac Spitzer):Lucee ORM is no longer being developed or bundled by the Lucee Team, Ortus have forked and taken over the development of ORM for Lucee, see Introducing: The Ortus ORM Extension.It seems that Lucee has made the decision to 1) trim the Lucee installation size by no longer bundling the Hibernate extension with new Lucee installations, and to 2) halt further development on the Lucee Hibernate extension. It is unclear whether "no longer being developed" is referring to new features only, or whether that includes bug fixes and security patches as well.This news means that Micha and the LAS team can focus on the Lucee server platform, bringing you speed and stability, while Ortus provides the Hibernate integration for a powerful database ORM layer.https://www.ortussolutions.com/blog/passing-the-baton-lucee-6-and-hibernate-ormNew Releases and UpdatesColdBox v7.1.0ColdBox 7.1 introduces several new features that expand the capabilities of the framework and facilitate better development practices:Scheduled Tasks DebuggingYou can now add a debug argument to your task definitions, and your console will add tons of debugging for your tasks:`task( name : "My Task", debug : true )`toRedirectTo() MatcherYou can now use this matcher to test relocations in a nice fluent expectation:`expect( event ).toRedirectTo( "main.index" )`REST on{errorType}Exception() ConventionThanks to our very own Gavin Pickin you can now create exception handlers in your REST Handlers that follow the on{type}Exception() convention and you can listen to specific error type exceptions:`function onTypeMismatchException( event, rc, prc )`https://www.ortussolutions.com/blog/coldbox-710-releasedTestBox v5.2.0 and v5.3.0v5.2.0New FeaturesFaster Performance with Updated MixerUtilTESTBOX-375Introduces enhancements to the MixerUtil module, resulting in faster performance during dynamic mixins and enhancing the flexibility of your test suites.More Control with bundlesPattern in TestBox InitTESTBOX-376Adds the bundlesPattern parameter to testbox.system.TestBox's init method. This new addition gives you greater control over defining the pattern for your test bundles, making test organization a breeze.Introducing TestBox ModulesTESTBOX-377Brings a game-changing feature to TestBox - Modules support! Now you can create and utilize modules to extend TestBox's capabilities, opening up endless possibilities for tailored testing workflows. Check out our docs: https://testbox.ortusbooks.com/in-depth/modulesBug FixesQuery Compatibility in ExpectationTESTBOX-346Addresses an issue where using expect(sut).toBeInstanceOf("something")) with a query could cause unexpected behavior. This has been resolved, ensuring a smoother testing experience with query objects.Improved cbstreams FunctionalityTESTBOX-374Fixes issues related to cbstreams outside of ColdBox, ensuring seamless functionality in various environments.ImprovementsEnhanced toBeInstanceOf() HandlingTESTBOX-20Improves the handling of toBeInstanceOf() expectations for Java classes, making it even easier to write precise and robust tests for Java objects.v5.3.0New FeaturestoBeIn() and toBeInWithCase() ExpectationsTESTBOX-379These new expectations allow you to verify the presence of a needle within a string or an array target. With the toBeIn() expectation, you can easily check if the expected needle exists in the target. Additionally, toBeInWithCase() performs a case-sensitive check for the needle in the target. These powerful expectations enhance your testing capabilities and streamline the validation of data within your tests.New Matchers and Assertions for String StartTESTBOX-380With these new matchers and assertions, namely toStartWith(), toStartWithCase(), startsWith(), and startsWithCase(), you can validate whether a string begins with an expected prefix. These matchers come with their appropriate negations, allowing you to easily test and verify the starting points of strings in your application.New Matchers and Assertions for String EndTESTBOX-381TestBox v5.3 introduces powerful matchers for checking the end of strings. The new matchers include toEndWith(), toEndWithCase(), endsWith(), and endsWithCase(). These matchers enable you to confirm the presence of an expected suffix in a given string, making it convenient to test the endings of strings during your test suite executions.Bug FixesonSpecError suiteSpecs CorrectionTESTBOX-378In previous versions, there was a minor issue with onSpecError, where the suiteSpecs attribute was mistakenly referred to as suiteStats. With TestBox v5.3, we have fixed this bug, and the attribute is now correctly recognized as suiteSpecs. This ensures that error reporting and handling in your test suites function as expected, providing you with accurate and helpful feedback during testing.https://www.ortussolutions.com/blog/testbox-v52-release-embracing-performance-and-extensibilityhttps://www.ortussolutions.com/blog/testbox-v53-releaseOrtus Redis Extension v3.0.0We are very excited to bring you another release for our Redis Lucee Extension. This release: Updates the underlying Redis java driver from v2.9.3 to v4.4.3 Added SSL and username support to RedisClusterCache configuration Added username support to RedisCache ( non-cluster ) configuration These enhancements have been made to ensure full compatibility with both standalone Redis implementations, as well as AWS Elasticache configurations and authentication mechanisms.https://www.ortussolutions.com/blog/ortus-redis-extension-v300-releasedLucee Script Runner UpdatedThe Lucee Script Runner has been updated with some additional features:luceeVersionQueryYou can now specify a query string to run with the following syntax to select which version of Lucee you want to run, it overrides `luceeVersion`.CompilePassing in `-Dcompile=true` on the command line or compile: true will compile all the code under specified webrootThis is great for catching any invalid CFML during CI before it hits production, also great for checking your code against the latest 6 snapshot to catch any errors introduced which causes errors with your codebaseWindows Runner support for Github actionsThe `action.yml` has been updated to use Windows syntax for running script-runner. You can see examples in the image extension repo: https://github.com/lucee/extension-image/actionshttps://dev.lucee.org/t/lucee-script-runner-version-query-compile-github-actions-windows-support/12865https://github.com/lucee/script-runnerWebinar / Meetups and WorkshopsICYMI — Hawaii ColdFusion Meetup Group — CF Scheduled Tasks: more than you may know, and shouldSpeaker: Charlie ArehartFriday July 28th, 2023 at 3pm PTIf folks were asked to discuss CF scheduled tasks, I suspect most would feel "there's not much 'to say", but there really is a lot more to working with them simply "setting a given url to run on a given schedule" (did you know it could be a CFC, for instance?).There are both more features than most realize, as well as solutions to common problems people can face when running them, and a lot of myths regarding old limitations that have since been lifted. In this talk, veteran CF troubleshooter Charlie Arehart will address all these and more, starting with a focus on tools and techniques for solving common problems with them, then showing several ways to create them (yes, even more than just cfschedule and the CF Admin UI).He'll then review several features of using tasks that you may have missed—to include distinguishing which few are NOT available in CF Standard.He'll also discuss briefly the underlying quartz open source framework that powers them (and offers still more extensibility), as well as the underlying neo-cron.xml file and tips for protecting that, and he'll even identify ways to control/allow access to managing tasks that may surprise many. He'll conclude with alternatives when the base features don't suit you.https://hawaiicoldfusionusergroup.adobeconnect.com/p6izv4ia43a7/Hawaii ColdFusion Meetup Group — Graph QL & ColdFusionSpeaker: Mark TakataFriday, August 25, 2023 @ 12 PM HAST (Hawaii Standard Time)GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.GraphQL is a query language for APIs and a runtime for executing those queries with your existing data. It provides a more efficient, powerful, and flexible alternative to REST.In ColdFusion 2023 we are providing a native method of consuming and sending data across GraphQL using GQL. This includes support for fragments, variables, aliases, queries, mutations, subscriptions and more.Also, this talk will go over on why to use Graph QL over REST APIs.https://www.meetup.com/hawaii-coldfusion-meetup-group/events/294631289/Adobe Upcoming EventsAdobe ColdFusion Workshop WEDNESDAY, AUGUST 9, 20239:00 AM EDTOnline EventBrian Sappeyhttps://adobecf-1day-workshop.meetus.adobeevents.com/Join the Adobe ColdFusion Workshop to learn how you and your agency can leverage ColdFusion to create amazing web content. This one-day training will cover all facets of Adobe ColdFusion that developers need to build applications that can run across multiple cloud providers or on-premise.The workshop will explore: The major features in the latest release of Adobe ColdFusion How to use CFML to develop, test, and deploy web applications Adobe ColdFusion constructs and functions How to reuse code in Adobe ColdFusion The Adobe ColdFusion application framework and basic database operations Object-oriented programming and object-relational mapping Basic error handling in Adobe ColdFusion PDF, forms, and spreadsheet support in Adobe ColdFusion Webinar - Road to Fortuna Series: Exploring the New Google Cloud Platform Features FRIDAY, AUGUST 25, 202310:00 AM PDTOnline EventMark Takatahttps://google-cloud-platform-adobe-coldfusion.meetus.adobeevents.com/ During the Road to Fortuna Series: Exploring the New Google Cloud Platform Features webinar, Mark Takata will explore the new native hooks that Adobe ColdFusion is adding to work with the Google Cloud Platform. He will focus on features related to the GCP FireStore document database, Storage capabilities, and PubSub messaging features, providing attendees with valuable insights into how these features can be leveraged to optimize application development and delivery on the Google Cloud Platform. The session will be highly technical and will provide attendees with practical examples and use cases.CFCasts Content Updateshttps://www.cfcasts.comRecent Releases Into the Box 2023 Videos is available for purchase as an EXCLUSIVE PREMIUM package. https://cfcasts.com/series/itb-2023 Subscribers will get access to premium packages after a 6 month exclusive window. Into the Box Attendees should have their coupon code in the email already!!!! 2023 ForgeBox Module of the Week Series - 1 new Video https://cfcasts.com/series/2023-forgebox-modules-of-the-week 2023 VS Code Hint tip and Trick of the Week Series - 1 new Video https://cfcasts.com/series/2023-vs-code-hint-tip-and-trick-of-the-week Coming Soon More ForgeBox and VS Code Podcast snippet videos ColdBox Elixir from Eric Getting Started with Inertia.js from Eric Conferences and TrainingAdobe CF Summit WestLas Vegas 2-4th of October.Get your early bird passes now. Session passes @ $199 Professional passes @ $299. First round of speakers has been announced - with some great sessionshttps://cfsummit.adobeevents.com/ STUDENTS can get a free pass if they are enrolled at tertiary level educational institutionsOrtus CF Summit Training - ColdBox 7 Zero to HeroDate: October 4th - 5th, 2023 | Right after Adobe CFSummit, 2023Speakers: Luis Majano & Gavin PickinLocation: Las Vegas, NevadaVenue: Regus - Las Vegas - 3960 Howard Hughes Parkway Paradise #Suite 500 Las Vegas, NV 89169 United StatesTicket Price Early Bird Price: $499 (Available until August 18th, 2023) Regular Price Tickets: $699 25% Discount today: https://www.eventbrite.com/e/659169262007/?discount=modernize Spotlight Less than 2 miles from the Mirage - 30 mins walk Next to Marriot hotel - 2 min walk 1 mile to Top Golf - 20 min walk 5 min walk to Fogo de Chão Brazilian Steakhouse 5 min walk to starbucks 5 min walk to Lo-los chicken and waffles WIN WIN WIN WINhttps://www.eventbrite.com/e/workshop-coldbox-from-zero-to-hero-tickets-659169262007?aff=oddtdtcreator Into the Box LATAMNovember 30th - more details to followUniversity of Business in El Salvador.ITB 2024 Locations: Washington, DC Dates: May 15-17, 2024 More conferencesNeed more conferences, this site has a huge list of conferences for almost any language/community.https://confs.tech/Blogs, Tweets, and Videos of the Week07/26/2023 - Blog - Ben Nadel - Considering UTC And Recording Activity Streak Data In ColdFusionFor as long as I can remember, I've been storing Date/Time values in UTC (Coordinated Universal Time) within my ColdFusion applications. UTC is "the primary time standard by which the world regulates clocks and time" (source). Date/Time values get stored in UTC and then - as needed - translated back into a given user's timezone during the rendering process. This is why, when I added the concept of "workout streaks" in Dig Deep Fitness (my ColdFusion fitness tracker), my initial instinct was to use UTC. Unfortunately, this approach quickly broke down.https://www.bennadel.com/blog/4492-considering-utc-and-recording-activity-streak-data-in-coldfusion.htm07/27/2023 - Tweet X Post(?) - Brad Wood - Automated CommandBox Server TestsI've fully automated the tests in my CommandBox Server Tests repo. Now, with a single Task Runner, I can fire off hundreds of tests across dozens of servers to check for regressions. https://github.com/Ortus-Solutions/commandbox-tests 07/31/2023 - Blog - Ben Nadel - Auto-Saving Form Data In The Background Using The fetch() APIIn Dig Deep Fitness, my ColdFusion fitness tracker, the main gesture of the app is the "Perform Exercise" view. In this view, the user is presented with a series of inputs for resistance weights, reps, and notes. Depending on how fast a user is moving through their workout, they may be on this one view for several minutes without submitting the form back to the ColdFusion server. This "pending data" makes me nervous. As such, I've started auto-saving the form data in the background using JavaScript's fetch() API.https://www.bennadel.com/blog/4494-auto-saving-form-data-in-the-background-using-the-fetch-api.htmBeacons : https://developer.mozilla.org/en-US/docs/Web/API/Beacon_APILocalStorage: https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API08/02/2023 - Blog - Ben Nadel - My ColdFusion "Controller" Layer Is Just A Bunch Of Switch Statements And CFIncludesThe more experience I get, the more I appreciate using an appropriate amount of complexity when solving a problem. This is a big part of why I love ColdFusion so much: it allows one to easily scale-up in complexity if and when the requirements grow to warrant it. When I'm working on my own, I don't need a robust framework with all the bells-and-whistles. All I need is a simple dependency-injection strategy and a series of CFSwtich and CFInclude statements.https://www.bennadel.com/blog/4497-my-coldfusion-controller-layer-is-just-a-bunch-of-switch-statements-and-cfincludes.htmCFML JobsSeveral positions available on https://www.getcfmljobs.com/Listing over 85 ColdFusion positions from 56 companies across 39 locations in 5 Countries.2 new jobs listed in the last two weeksFull-Time - SIS New ColdFusion C1 - Pune, Maharashtra, IndiaPosted: July 26, 2023https://www.getcfmljobs.com/jobs/index.cfm/india/SIS-New-ColdFusion-C1-at-Pune-Maharashtra/11592Full-Time - ColdFusion Developer - Washington, DC, United StatesPosted: August 01, 2023https://www.getcfmljobs.com/jobs/index.cfm/united-states/CFDeveloper-Washington-DC/11593Other Job LinksThere is a jobs channel in the CFML slack team, and in the Box team slack now tooForgeBox Module of the WeekColdBox Vite & ColdBox Vite Helpers by Eric PetersonThis module provides a `vite` helper function in your views for loading files generated byVite and the coldbox-vite-plugin in your ColdBox applications.https://www.forgebox.io/view/vite-helpershttps://www.npmjs.com/package/coldbox-vite-pluginVS Code Hint Tips and Tricks of the WeekHeadwindBy Ryan HeybournHeadwind is an opinionated Tailwind CSS class sorter for Visual Studio Code. It enforces consistent ordering of classes by parsing your code and reprinting class tags to follow a given order.Headwind runs on save, will remove duplicate classes and can even sort entire workspaces.https://marketplace.visualstudio.com/items?itemName=heybourn.headwindThank you to all of our Patreon SupportersThese individuals are personally supporting our open source initiatives to ensure the great toolings like CommandBox, ForgeBox, ColdBox, ContentBox, TestBox and all the other boxes keep getting the continuous development they need, and funds the cloud infrastructure at our community relies on like ForgeBox for our Package Management with CommandBox. You can support us on Patreon here https://www.patreon.com/ortussolutionsDon't forget, we have Annual Memberships, pay for the year and save 10% - great for businesses everyone. Bronze Packages and up, now get a ForgeBox Pro and CFCasts subscriptions as a perk for their Patreon Subscription. All Patreon supporters have a Profile badge on the Community Website All Patreon supporters have their own Private Forum access on the Community Website All Patreon supporters have their own Private Channel access BoxTeam Slack https://community.ortussolutions.com/Top Patreons (amazing) John Wilson - Synaptrix Tomorrows Guides Jordan Clark Gary Knight Giancarlo Gomez David Belanger Dan Card Jeffry McGee - Sunstar Media Dean Maunder Kevin Wright Doug Cain Nolan Erck Abdul Raheen And many more PatreonsYou can see an up to date list of all sponsors on Ortus Solutions' Websitehttps://ortussolutions.com/about-us/sponsors Thanks everyone!!! ★ Support this podcast on Patreon ★
Language Servers underpin the language specific support we rely on in modern code editors. Lately, there have been new efforts in this area in the Elixir community. We talk with Steve Cohen about his project Lexical LS to learn about his new Elixir Language Server, how long he's been at it, and what it can do today. We learn about some of the technical challenges when creating a tool like this, and why there's still room for new projects in this area. Steve explains how Lexical LS is architected and that it is a goal to be easy to contribute to and work on the Lexical project itself. Time to give it a try! Show Notes online - http://podcast.thinkingelixir.com/161 (http://podcast.thinkingelixir.com/161) Elixir Community News - https://github.com/elixir-lang/elixir/releases/tag/v1.15.4 (https://github.com/elixir-lang/elixir/releases/tag/v1.15.4?utm_source=thinkingelixir&utm_medium=shownotes) – Elixir v1.15.3 and v1.15.4 were released. v1.15.4 includes fixes for running on Erlang/OTP 26. - https://github.com/elixir-lang/elixir/releases/tag/v1.15.3 (https://github.com/elixir-lang/elixir/releases/tag/v1.15.3?utm_source=thinkingelixir&utm_medium=shownotes) – Elixir v1.15.3 release notes - https://gleam.run/news/v0.30-local-dependencies-and-enhanced-externals/ (https://gleam.run/news/v0.30-local-dependencies-and-enhanced-externals/?utm_source=thinkingelixir&utm_medium=shownotes) – Gleam v0.30 was released - https://news.livebook.dev/whats-new-in-livebook-0.10---introducing-multi-session-livebook-apps-3Dbpss (https://news.livebook.dev/whats-new-in-livebook-0.10---introducing-multi-session-livebook-apps-3Dbpss?utm_source=thinkingelixir&utm_medium=shownotes) – The Livebook v0.10 was released - https://gitlab.com/MachinesAreUs/archeometer (https://gitlab.com/MachinesAreUs/archeometer?utm_source=thinkingelixir&utm_medium=shownotes) – Archeometer analyzes your project and now supports a --format livemd - https://twitter.com/MachinesAreUs/status/1676127531840204800 (https://twitter.com/MachinesAreUs/status/1676127531840204800?utm_source=thinkingelixir&utm_medium=shownotes) – Archeometer Twitter share with Livebook demo - https://gitlab.com/MachinesAreUs/archeometer/-/merge_requests/205 (https://gitlab.com/MachinesAreUs/archeometer/-/merge_requests/205?utm_source=thinkingelixir&utm_medium=shownotes) – MR for the new feature - https://twitter.com/wojtekmach/status/1679919717648138241 (https://twitter.com/wojtekmach/status/1679919717648138241?utm_source=thinkingelixir&utm_medium=shownotes) – Learned about "repotransact" as an alternative to Ecto.Multi - https://tomkonidas.com/repo-transact/ (https://tomkonidas.com/repo-transact/?utm_source=thinkingelixir&utm_medium=shownotes) – Blog post about repotransact with the code - https://twitter.com/germsvel/status/1678721797561131012 (https://twitter.com/germsvel/status/1678721797561131012?utm_source=thinkingelixir&utm_medium=shownotes) – German Valesco highlighted the new DateTime comparison functions added in Elixir 1.15. - https://github.com/phoenixframework/dns_cluster (https://github.com/phoenixframework/dns_cluster?utm_source=thinkingelixir&utm_medium=shownotes) – DNS Cluster - Simple DNS clustering for distributed Elixir nodes - https://twitter.com/DNAutics/status/1679902629000880128 (https://twitter.com/DNAutics/status/1679902629000880128?utm_source=thinkingelixir&utm_medium=shownotes) – Apical 0.2.0 released - an OpenAPI schema builder - https://0x7f.dev/post/ntp-implementation-in-elixir (https://0x7f.dev/post/ntp-implementation-in-elixir?utm_source=thinkingelixir&utm_medium=shownotes) – Post about implementing a Network Time Protocol in Elixir. - https://erikarow.land/articles/mix-completions (https://erikarow.land/articles/mix-completions?utm_source=thinkingelixir&utm_medium=shownotes) – Post about implementing shell completions for mix tasks - https://www.youtube.com/playlist?list=PLKBMoE8mCkXijPYoLCKtWeHa-q69EYwDf (https://www.youtube.com/playlist?list=PLKBMoE8mCkXijPYoLCKtWeHa-q69EYwDf?utm_source=thinkingelixir&utm_medium=shownotes) – Youtube playlist for published GigCityElixir conference talks Do you have some Elixir news to share? Tell us at @ThinkingElixir (https://twitter.com/ThinkingElixir) or email at show@thinkingelixir.com (mailto:show@thinkingelixir.com) Discussion Resources - https://github.com/lexical-lsp/lexical (https://github.com/lexical-lsp/lexical?utm_source=thinkingelixir&utm_medium=shownotes) – Lexical LS Github project - https://github.com/lexical-lsp/vscode-lexical (https://github.com/lexical-lsp/vscode-lexical?utm_source=thinkingelixir&utm_medium=shownotes) – Lexical VS Code project - https://github.com/lexical-lsp/vscode-lexical#known-issues (https://github.com/lexical-lsp/vscode-lexical#known-issues?utm_source=thinkingelixir&utm_medium=shownotes) – Currently need to using Erlang 25.2 - https://marketplace.visualstudio.com/items?itemName=lexical-lsp.lexical (https://marketplace.visualstudio.com/items?itemName=lexical-lsp.lexical?utm_source=thinkingelixir&utm_medium=shownotes) – VS Marketplace Link for Lexical LS extension - https://venturebeat.com/dev/pinterest-elixir/ (https://venturebeat.com/dev/pinterest-elixir/?utm_source=thinkingelixir&utm_medium=shownotes) - https://discord.com/invite/elixir (https://discord.com/invite/elixir?utm_source=thinkingelixir&utm_medium=shownotes) – Join the Elixir Discord - https://github.com/elixir-lsp/elixir_sense (https://github.com/elixir-lsp/elixir_sense?utm_source=thinkingelixir&utm_medium=shownotes) - https://en.wikipedia.org/wiki/ComparisonofUnicode_encodings (https://en.wikipedia.org/wiki/Comparison_of_Unicode_encodings?utm_source=thinkingelixir&utm_medium=shownotes) Guest Information - https://twitter.com/icecreamcohen (https://twitter.com/icecreamcohen?utm_source=thinkingelixir&utm_medium=shownotes) – on Twitter - https://github.com/scohen/ (https://github.com/scohen/?utm_source=thinkingelixir&utm_medium=shownotes) – on Github Find us online - Message the show - @ThinkingElixir (https://twitter.com/ThinkingElixir) - Message the show on Fediverse - @ThinkingElixir@genserver.social (https://genserver.social/ThinkingElixir) - Email the show - show@thinkingelixir.com (mailto:show@thinkingelixir.com) - Mark Ericksen - @brainlid (https://twitter.com/brainlid) - Mark Ericksen on Fediverse - @brainlid@genserver.social (https://genserver.social/brainlid) - David Bernheisel - @bernheisel (https://twitter.com/bernheisel) - David Bernheisel on Fediverse - @dbern@genserver.social (https://genserver.social/dbern) - Cade Ward - @cadebward (https://twitter.com/cadebward) - Cade Ward on Fediverse - @cadebward@genserver.social (https://genserver.social/cadebward)
In this episode, I talk about what a person should do if they keep swinging and missing in their romantic life. Sources: https://www.reddit.com/r/dating_advice/comments/g13e6x/i_cant_get_a_date_for_the_life_of_me_i_tried/ --- Support this podcast: https://podcasters.spotify.com/pod/show/1morethingwsologreen/support
Here are links to a few things we mentioned: Date/Time Types (docs) Don't use timestamp without time zone (wiki) Date/Time functions and operators (docs) Postgres AT TIME ZONE explained (blog post by Bruce Momjian) Our episode on BRIN indexes RUM indexes allballs (mailing list thread) ------------------------What did you like or not like? What should we discuss next time? Let us know by tweeting us on @samokhvalov / @michristofides / @PostgresFM, or by commenting on our Google doc.If you would like to share this episode, here's a good link (and thank you!)Postgres FM is brought to you by:Nikolay Samokhvalov, founder of Postgres.aiMichael Christofides, founder of pgMustardWith special thanks to:Jessie Draws for the amazing artwork
John explains that Web3 is about the convergence of technology, economics, and social trends.He elaborates that foundations begin with service-based architecture (SOA), the notion of how to design loosely coupled systems that consist of economic services and components.He goes on to explain how DeFi represents this thinking of a loose composition of services.With all of this, blockchain brings together technology and economic incentives into a holistic equation—people contribute because they want to contribute.Nonsense it is not, says baby Yoda.Crypto isn't the end game. It's a segue along the way.Follow Ben, Matt, and John.Learn more about the Global Blockchain Business Council and John's company, ngEnterprise.Speaking of awesomeness, we'd like to give a shout out to Stellar Question Badge winner GateKiller for asking a question “How can I get the DateTime for the start of the week?” that has been bookmarked by a hundred people.
Today we're pleased to have the one and only Itzik Ben-Gan hosted at our show again! We talk about interesting SQL/T-SQL related topics, the experience of teaching, his new upcoming book edition of T-SQL Fundamentals, and more. Relevant links: Itzik's personal web page at tsql.lucient.com Itzik Ben-Gan's Blog posts at SQLPerformance.com SQL Server Central - Question of the Day Even more fun with DATETIME arithmetics (Eitan Blumin) The Itzik Ben-Gan Trick (batch processing hack)
Locked On Zags - Daily Podcast On Gonzaga Bulldogs Basketball
Mark Few and the Gonzaga Bulldogs coaching staff have their sights on a pair of 2024 prospects from Prolific Prep High School in Napa, guard Paul McNeil and center Yves Missi.Today's episode begins with Sports Illustrated's Jason Jordan discussing McNeil - who was the Gatorade Player of the Year in North Carolina as a sophomore, and Missi - a rim-running center with an intense motor and excellent footwork. It's too early for guesses as to where each guy is going to go, but Jordan explains why they would make a great fit at Gonzaga if Few and his staff can convince them to come up to Spokane.After that, Andy goes solo and discusses Kraziness in the Kennel, including date, time, and ticket information, as well as the men's basketball roster release, with some new jersey numbers and a new walk-on, guard Kellen Mitchell.Finally, the show ends with discussion about Gary Bell, who landed a job as an assistant coach at Northern Arizona University at the recommendation of both Few and Arizona coach Tommy Lloyd. Bell is now the fourth former Zag player with a D-1 assistant coach gig, along with Stephen Gentry, Brian Michaelson, and former guest of the show Kyle Bankhead.Link to my new website all about Gonzaga: https://scorezagsscore.com/Danny Evans GoFundMe: https://www.gofundme.com/f/support-coach-danny-evans-his-childrenJeremy Eaton GoFundMe: https://www.gofundme.com/f/r8yj3-jeremys-cancer-fundhttps://linktr.ee/LockedOnZagsLocked on Zags - Part of the Locked on Podcast Network.Support Us By Supporting Our Sponsors!Built BarBuilt Bar is a protein bar that tastes like a candy bar. Go to builtbar.com and use promo code “LOCKED15,” and you'll get 15% off your next order.BetOnline AGThere is only 1 place that has you covered and 1 place we trust. Betonline.ag! Sign up today for a free account at betonline.ag and use that promocode: LOCKEDON for your 50% welcome bonus.PrizePicksDon't hesitate, check out PrizePicks.com and use promo code: “LOCKEDON” or go to your app store and download the app today. PrizePicks is daily fantasy made easy!NetSuiteOver twenty-seven thousand businesses already use NetSuite and RIGHT NOW through the end of the year NetSuite is offering a one-of-a-kind financing program to those ready to upgrade at NetSuite.com/LOCKEDONNCAA. C3fXiHupJDC9byuRc45r Learn more about your ad choices. Visit podcastchoices.com/adchoices
Locked On Zags - Daily Podcast On Gonzaga Bulldogs Basketball
Mark Few and the Gonzaga Bulldogs coaching staff have their sights on a pair of 2024 prospects from Prolific Prep High School in Napa, guard Paul McNeil and center Yves Missi. Today's episode begins with Sports Illustrated's Jason Jordan discussing McNeil - who was the Gatorade Player of the Year in North Carolina as a sophomore, and Missi - a rim-running center with an intense motor and excellent footwork. It's too early for guesses as to where each guy is going to go, but Jordan explains why they would make a great fit at Gonzaga if Few and his staff can convince them to come up to Spokane. After that, Andy goes solo and discusses Kraziness in the Kennel, including date, time, and ticket information, as well as the men's basketball roster release, with some new jersey numbers and a new walk-on, guard Kellen Mitchell. Finally, the show ends with discussion about Gary Bell, who landed a job as an assistant coach at Northern Arizona University at the recommendation of both Few and Arizona coach Tommy Lloyd. Bell is now the fourth former Zag player with a D-1 assistant coach gig, along with Stephen Gentry, Brian Michaelson, and former guest of the show Kyle Bankhead. Link to my new website all about Gonzaga: https://scorezagsscore.com/ Danny Evans GoFundMe: https://www.gofundme.com/f/support-coach-danny-evans-his-children Jeremy Eaton GoFundMe: https://www.gofundme.com/f/r8yj3-jeremys-cancer-fund https://linktr.ee/LockedOnZags Locked on Zags - Part of the Locked on Podcast Network. Support Us By Supporting Our Sponsors! Built Bar Built Bar is a protein bar that tastes like a candy bar. Go to builtbar.com and use promo code “LOCKED15,” and you'll get 15% off your next order. BetOnline AG There is only 1 place that has you covered and 1 place we trust. Betonline.ag! Sign up today for a free account at betonline.ag and use that promocode: LOCKEDON for your 50% welcome bonus. PrizePicks Don't hesitate, check out PrizePicks.com and use promo code: “LOCKEDON” or go to your app store and download the app today. PrizePicks is daily fantasy made easy! NetSuite Over twenty-seven thousand businesses already use NetSuite and RIGHT NOW through the end of the year NetSuite is offering a one-of-a-kind financing program to those ready to upgrade at NetSuite.com/LOCKEDONNCAA. C3fXiHupJDC9byuRc45r Learn more about your ad choices. Visit podcastchoices.com/adchoices
Join the Wait List for "Introvert Dating Success Membership Academy" launching Tuesday, November 1 and get a free PDF: http://www.IntrovertDatingSuccess.com Harry answers a question from a guy whose long-distance girlfriend asked to Skype him, but when he asked her to let him know a time, she stopped responding, and he doesn't know why! Get date coaching from me: http://www.IntrovertDatingSuccess.com/Coaching ***Show Your Support*** Cash App: https://cash.app/$harrywilmington PayPal: https://www.e-junkie.com/i/zk94?single Social Media: YouTube - https://www.YouTube.com/HarryWilmington Facebook - https://www.facebook.com/introvertdatingsuccess/ Instagram - https://www.instagram.com/introvertdatingsuccess/ Tik Tok - https://www.tiktok.com/harrywilmington
ElixirConf US 2022 just finished! We cover the big announcements, talk highlights, and other relevant tech news. We discuss what some of these big announcements and projects represent and what they might mean for the Elixir community going forward. We talk about the Elixir 1.14 release, Livebook advances, Phoenix 1.7, machine learning progress, and the surprise announcement of Phoenix LiveView Native! Show Notes online - http://podcast.thinkingelixir.com/115 (http://podcast.thinkingelixir.com/115) Elixir Community News - https://elixir-lang.org/blog/2022/09/01/elixir-v1-14-0-released/ (https://elixir-lang.org/blog/2022/09/01/elixir-v1-14-0-released/) – Elixir v1.14 officially released - https://github.com/elixir-lang/elixir/blob/v1.14.0/CHANGELOG.md#changelog-for-elixir-v114 (https://github.com/elixir-lang/elixir/blob/v1.14.0/CHANGELOG.md#changelog-for-elixir-v114) – Elixir 1.14 changelog - https://github.com/elixir-lang/elixir/blob/v1.14.0/CHANGELOG.md#changelog-for-elixir-v114 (https://github.com/elixir-lang/elixir/blob/v1.14.0/CHANGELOG.md#changelog-for-elixir-v114) – Nerves v1.9.0 fixed Elixir 1.14 warnings - Phoenix 1.7 upcoming release discussed - Phoenix 1.7 generators will use Tailwind CSS - New phx.gen.auth --live option - https://github.com/liveviewnative/liveview-client-swiftui (https://github.com/liveviewnative/liveview-client-swiftui) – Phoenix LiveView Native was announced - https://github.com/liveviewnative/elixirconf_chat (https://github.com/liveviewnative/elixirconf_chat) – ElixirConf Chat project created using Phoenix LiveView Native - https://getfirefly.org (https://getfirefly.org) – Lumen was renamed to Firefly - https://twitter.com/HoldenOullette/status/1565486046237921280 (https://twitter.com/HoldenOullette/status/1565486046237921280) – Podium released an OWASP security training LiveBook for Elixir developers. - https://github.com/podium/elixir-secure-coding (https://github.com/podium/elixir-secure-coding) – Elixir Secure Coding Training (ESCT) - https://www.ectoinproduction.com (https://www.ectoinproduction.com) – Ecto In Production future home - https://github.com/liveshowy/webauthnlivecomponent (https://github.com/liveshowy/webauthn_live_component) – SmartLogic released a LiveComponent to support WebAuthn authentication for your LiveView app - https://github.com/liveshowy/webauthnlivecomponent_demo (https://github.com/liveshowy/webauthn_live_component_demo) – WebAuthn authentication demo page - https://github.com/kipcole9/tempo (https://github.com/kipcole9/tempo) – Kip Cole released a new kind of DateTime library called Tempo - https://kipcole9.github.io/tempo/2021-01-04-its-about-time/ (https://kipcole9.github.io/tempo/2021-01-04-its-about-time/) – Temp blog post explains more about it. - https://twitter.com/steveschoger/status/1562117153591107586 (https://twitter.com/steveschoger/status/1562117153591107586) – Heroicons v2.0 released. Used in TailwindUI templates. - https://twitter.com/louispilfold/status/1564247740879609860 (https://twitter.com/louispilfold/status/1564247740879609860) – Louie Pilford showed a screenshot of Gleam compiling Elixir's Plug - https://blog.heroku.com/next-chapter (https://blog.heroku.com/next-chapter) – Heroku, a popular PaaS made significant policy changes. Ending free tier and more. - https://spectrum.ieee.org/top-programming-languages-2022 (https://spectrum.ieee.org/top-programming-languages-2022) – IEEE Top Programming Languages 2022 - https://twitter.com/josevalim/status/1565408635961884673 (https://twitter.com/josevalim/status/1565408635961884673) – José Valim shared they are porting non-neural algorithms to Elixir/Nx which runs on both CPU/GPU. Shared impressive performance comparisons. - Chris Grainger gave a keynote about how Elixir is ready for real, production machine learning work. - https://www.lambdadays.org/lambdadays2022 (https://www.lambdadays.org/lambdadays2022) – Lambda Days conference. 5-6 June 2023 in Krakow, Poland Do you have some Elixir news to share? Tell us at @ThinkingElixir (https://twitter.com/ThinkingElixir) or email at show@thinkingelixir.com (mailto:show@thinkingelixir.com) Find us online - Message the show - @ThinkingElixir (https://twitter.com/ThinkingElixir) - Email the show - show@thinkingelixir.com (mailto:show@thinkingelixir.com) - Mark Ericksen - @brainlid (https://twitter.com/brainlid) - David Bernheisel - @bernheisel (https://twitter.com/bernheisel) - Cade Ward - @cadebward (https://twitter.com/cadebward)
A great show of catching up with Cog and Travis and myself with what we have been up to. Then we get into the Season 18 Raid launch date and timing, and SHADOW joins us back on the show as we get into the idea of Loose SBMM in crucible Control next season. Enjoy the show cause we had fun. Travis Northup Twitter - https://twitter.com/TieGuyTravis Ebontis Twitter: https://twitter.com/Ebontis Twitch: https://www.twitch.tv/ebontis Youtube: https://www.youtube.com/channel/Ebontis LordCognito Twitter: https://twitter.com/LordCognito Youtube: https://www.youtube.com/channel/UCYiUhEbYWiuwRuWXzKZMBxQ You can support The Last Word Podcast right here https://anchor.fm/ebontis/support --- Send in a voice message: https://anchor.fm/ebontis/message Support this podcast: https://anchor.fm/ebontis/support
This week on the podcast, Eric, John, and Thomas talk about Amazon Codewhisper, New Features coming to PHP 8.2, Event Sourcing, and more...Links from the show:php - MYSQL incorrect DATETIME format - Stack Overflowweb dev has gotten notoriously complex and I dont see the ROI... : webdevDon't Let the Internet Dupe You, Event Sourcing is Hard - BlogomatanoBuy PhpStorm: Pricing and Licensing, Discounts - JetBrains Toolbox SubscriptionDeveloper Ecosystem Survey 2022Git - git-bisect Documentation[PHP 8.2] 30 days before feature freeze - ExternalsPHP Core Roundup #3 — The PHP Foundation — Supporting, Advancing, and Developing the PHP LanguageCopilot works so well because it steals open source code and strips creditAmazon launches CodeWhisperer, a GitHub Copilot-like AI pair programming tool – TechCrunchFinally Obtaining the Triforce in Ocarina of Time: Triforce Percent Explained - YouTubeThis episode of PHPUgly was sponsored by:Honeybadger.io - https://www.honeybadger.io/PHPUgly streams the recording of this podcast live. Typically every Thursday night around 9 PM PT. Come and join us, and subscribe to our Youtube Channel, Twitch, or Periscope. Also, be sure to check out our Patreon Page.Twitter Account https://twitter.com/phpuglyHost:Eric Van JohnsonJohn CongdonTom RideoutStreams:Youtube ChannelTwitchPeriscopePowered by RestreamPatreon PagePHPUgly Anthem by Harry Mack / Harry Mack Youtube ChannelThanks to all of our Patreon Sponsors:Honeybadger ** This weeks Sponsor **ButteryCrumpetFrank WDavid QShawnKen FBoštjanMarcusShelby CS FergusonRodrigo CBillyDarryl HKnut Erik BDmitri GElgimboMikePageDevKenrick BKalen JR. C. S.Peter AClayton SRonny MBen RAlex BKevin YEnno RWayneJeroen FAndy HSeviChris CSteve MRobert SThorstenEmily JJoe FAndrew WulrikJohn CJames HEric MLaravel MagazineEd GRirielilHermitChampJeffrey D
In diesem Video wollen wir uns einmal anschauen, wie man messen kann, wie viel Zeit seit dem Start eines Expert Advisors vergangen ist. Dazu möchten wir hier diesen Timer programmieren. Also lassen Sie uns einmal schauen, wie man so etwas in MQL5 machen kann. Um das zu tun, klicken Sie im MetaTrader bitte auf dieses kleine Symbol hier oben oder drücken Sie die F4 Taste. Das ruft dann hier den MetaEditor auf. Und hier klicken wir auf Datei, neue Datei, Expert Advisor aus Vorlage, weiter. Ich vergebe hier mal den Namen Simpler Running Timer. Klicke auf weiter, weiter und fertigstellen. Jetzt kann alles oberhalb der On Tick Funktion gelöscht werden. Und auch die zwei Kommentar Zeilen hier werden entfernt. Wir starten damit, dass wir einige Variablen erstellen. Die sind vom Typ Date Time. Date Time ist ein Format, das Datum und Zeit seit dem 1. Januar 1970 bestimmen kann. Es gibt unterschiedliche Formate, wie man das darstellen kann. Wir haben hier eine Variable für die aktuelle Zeit, für die Startzeit und für die Zeit, die seitdem vergangen ist. In der OnTick Funktion starten wir damit, dass wir prüfen, ob die Startzeit keinen Wert enthält. Das wäre der Fall, wenn Start Time den Wert 0 hat. Und wenn das so ist, dann möchten wir für unsere Startzeit die Time Local Funktion nutzen. Die Time Local Funktion wird uns die lokale Zeit des Computers zurückgeben, auf dem unser Client läuft. Das funktioniert auch für den Strategie Tester, bei dem man ja auch andere Zeitspannen eingeben kann. Im nächsten Schritt nutzen wir Time Local wieder, um die aktuelle Zeit zu bestimmen. Die wird immer dann, wenn die Ontick Funktion aufgerufen wird, etwas anders sein, weil ja Zeit vergangen ist. Bitte behalten Sie im Hinterkopf, dass Ontick die Funktion ist, die nur dann gestartet wird, wenn sich der Preis ändert. Wir werden also nicht jede Sekunde eine Aktualisierung sehen. Es wird nur dann aktualisiert, wenn tatsächlich eine Preisänderungen stattgefunden hat. Als nächstes berechnen wir die Differenz, also die vergangene Zeit, indem wir von der aktuellen Zeit die Startzeit abziehen. Und um das Ganze für uns lesbar zu machen, nutzen wir MQL Date Time, um eine Struktur Variable zu erstellen. Wenn man das hier einmal markiert und die F1 Taste drückt, dann lernen wir, dass es hier unterschiedliche Rückgabewert gibt. Beispielsweise für Stunde, Minuten und Sekunden. Genau das benötigen wir. Und um die gewünschte Ausgabe zu erhalten, nutzen wir time to struct. Damit kann man eine Variable vom Typ Date Time in das gewünschte Format konvertieren. Um die Stunden zu erhalten erstellen wir uns hier eine Integer Variable und weisen ihr den Rückgabewert von date time structure hour zu. Die Minuten erhalten wir mit Date Time Structure min. Die Sekunden erhalten wir über date time structure sec. Bei Bedarf könnten wir hier noch den Tag, das Jahr, den Monat oder den Tag der Woche und sogar den Tag im laufenden Jahr berechnen. Und soll das aber für dieses einfache Beispiel so reichen? Damit wir davon auch was sehen, fügen wir zum Schluss hier noch eine Comment-Ausgabe hinzu. Die wird uns die Startzeit, die aktuelle Zeit und die vergangene Zeit in Stunden, Minuten und Sekunden anzeigen. Das war's auch schon soweit. Wenn Ihnen das hier zu schnell ging, oder wenn Sie keine Ahnung haben, was diese Codezeilen hier bewirken sollen, dann möchten Sie sich vielleicht zunächst einmal ein anderes Video aus der Grundlagen Serie anschauen. Vielleicht ist aber auch der Premium Kurs interessant für Sie. Den finden Sie auf unserer Webseite. Und da gibt es jetzt auch Links zum Shop, wo man solche Quellcodes hier herunterladen kann,
In this video we are going to create an Expert Advisor that is able to calculate the time that has passed since we have started the Expert Advisor. This can be useful for several things. Let’s find out how to do that with MQL Five. To get started, please click on a little icon here or Press F Four on your keyboard. Now you should see the Metaeditor window and here you want to click on File, new file, Expert Advisor from Template, continue I will call this file Simple Running Timer. Click on Continue, continue and finish. Now you can delete everything above the on tick function and let’s also remove the two comment lines here. We start by defining three datetime variables. Date time is the type of variable that we are going to use when we use something that contains a date or a time. And to get the time that the Expert Advisor is running, we want to check if the start time equals zero. That will be true the very first time we start the Expert Advisor. And if this is the case, we want to set the start time to time local. Time Local is a function that will return the local time of the computer where the client terminal is running. So this is the initial value for our counter and all the other times the current time will be set to time local because time is moving. So this value will change every time a tick comes in. Well the Ontick function will not run every second, it runs whenever the price changes, so keep that in mind. Now let’s calculate the past time. The past time will be the current time and we subtract the start time. Now let’s use MQL date Time. This is a date type structure and it makes it basically possible to get time based values in different formats. For example, we can calculate the hour, the minutes and the seconds. And that’s exactly what we are going to do now. To do that, we use Time to Struct. The first parameter is the past time. The second parameter is the date time structure that we have created here. To calculate the hour based value, we create an integer variable here and we assign Date Time structure dot hour for the minutes. We do the same, but this time we use date time structure dot min. And for the seconds we use Date Time structure dot SEC. If you would need something like days, this also would be possible because once you hit the dot you can pick one of these values here. The hour, the minute and the seconds will be enough for us. Now let’s create a chart output using the comment statement. This will output the start time, the current time, and the past time in hours, minutes and seconds. And that’s about it. Well if this was too fast for you, or if you have no idea what all the code here does, you maybe want to watch one of the other videos from the basic video series or maybe even the premium course might be interesting for you. You can find that one on our website where you can also find a link to the store where you can download source codes like this one in case you don’t want to type everything. By the way, this once again was a suggestion from a premium course member. And if you are a premium member and if you have an idea for a video like this one, please let me know. For now, please click on the compile button here or Press F seven on your keyboard. You shouldn’t get any errors here and if that is the case you can click the little button here or Press F four to go back to MetaTrader. And in MetaTrader please click on view, Strategy Tester or press Control and R. Please pick the new file simple runningtimer EX5. Mark the option for the visible mode here and start your test. Here we are, our expert advisor is running. It counts the hours, the minutes and the seconds. This might be useful if you want to do something that is time related. From now on you will find the first videos for this MQL five tutorial in 26 languages. We have created subtitles for YouTube. And in this little video you have learned how to create an expert advisor that is able to calculate hours, minutes and seconds and you have coded it yourself with a few lines of MQL5 code. Not sure what to do? Click on the automated trading assistant below MQL5 TUTORIAL BASICS - 56 SIMPLE CLOSE TIMER MQL5 TUTORIAL BASICS - 55 HOW TO CALCULATE THE DAY OF THE… MQL5 TUTORIAL BASICS - 50 SIMPLE RANDOM ENTRY EXPERT ADVISOR MQL5 TUTORIAL BASICS - 107 SIMPLE ARRAY REFERENCE MQL5 TUTORIAL BASICS - 63 SIMPLE CHECK FOR NEW BARS The post MQL5 TUTORIAL BASICS – 126 SIMPLE RUNNING TIMER appeared first on MQL5 Tutorial.
In this episode of Scaling Postgres, we discuss how to bin date times, search every field of a table, use JSON_TABLE and methods for a client to pick the primary database. Subscribe at https://www.scalingpostgres.com to get notified of new episodes. Links for this episode: https://www.cybertec-postgresql.com/en/postgresql-mapping-timestamps-date_bin/ https://www.depesz.com/2022/04/05/dba-tips-n-tricks-search-in-every-field-in-a-table/ https://www.depesz.com/2022/04/06/waiting-for-postgresql-15-json_table/ https://www.postgresql.org/docs/14/libpq-connect.html#LIBPQ-CONNECT-TARGET-SESSION-ATTRS https://www.cybertec-postgresql.com/en/new-target_session_attrs-settings-for-high-availability-and-scaling-in-postgresql-v14/ https://www.postgresql.fastware.com/blog/enhancement-to-target-session-attrs https://pganalyze.com/blog/5mins-postgres-tuning-vacuum-autovacuum https://www.endpointdev.com/blog/2022/04/shapefiles-postgis/ https://dev.to/yugabyte/how-to-enable-ssl-for-postgres-connections-5321 https://postgres.ai/blog/20220405-database-lab-engine-3-1-released https://postgresql.life/post/taras_kloba/ https://www.rubberduckdevshow.com/episodes/37-working-with-outside-teams/
Hey LISTeners. In this episode Chunk and Marty are off being Celebs, so the rest of the crew takes this time to deep dive into their lives over the past couple of weeks. Toxic Tev is... blocked. Bobby G has a big life change that will affect his relationship and Rock B passed a test with flying colors. Also, what's the Date-Time Continuum theory? Should you follow it? Also, the boys chime in on the Russell Wilson vs Future debate. All that and more in this week's episode! --- Send in a voice message: https://anchor.fm/tevin-everett/message
PHP Internals News: Episode 100: Sealed Classes London, UK Thursday, March 24th 2022, 09:04 GMT In this episode of "PHP Internals News" I talk with Saif Eddin Gmati (Website, Twitter, GitHub) about the "Sealed Classes" RFC that he has proposed. The RSS feed for this podcast is https://derickrethans.nl/feed-phpinternalsnews.xml, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news Transcript Derick Rethans 0:14 Hi, I'm Derick. Welcome to PHP internals news, the podcast dedicated to explaining the latest developments in the PHP language. This is episode 100. Today I'm talking with Saif Eddin Gmati about the sealed classes RFC that they're proposing. Saif, would you please introduce yourself? Saif Eddin Gmati 0:31 Hello, my name is Saif Eddin Gmati. I work as a Senior programmer at Les-Tilleuls.coop. I'm an open source enthusiast and contributor. Derick Rethans 0:39 Let's dive straight into this RFC. What is the problem that you're trying to solve with it? Saif Eddin Gmati 0:43 Sealed classes just like enums and tagged unions allow developers to define their data models in a way where invalid state becomes less likely. It also eliminates the need to handle unknown subtypes for a specific model, as using sealed classes to define models gives us an idea on what child types would be available at run time. Sealing also provides us with a way for restricting inheritance or the use of a specific trait. For example, if we look at logger trait from the PSR log package that could be sealed to logger interface. This way, we ensure that every use of this trait is coming from a logger not from any other class. Derick Rethans 1:24 I'm just reading through this RFC tomorrow, again, and something I didn't pick up on reading to it last time. It states that PHP already has sort of two sealed classes. Unknown Speaker 1:35 Yes, the throwable class in PHP can only be implemented by extending either error or exception. The same applies for DateTime interface, which can only be implemented by extending DateTime class or DateTime Immutable class. Derick Rethans 1:52 Because PHP itself doesn't allow you to implement either throwable or DateTimeInterface. I haven't quite realized that that these are also sealed classes really. What is sort of the motivation behind wanting to introduce sealed classes? Unknown Speaker 2:06 The main motivation for this feature comes from Hack the programming language. Hack contains a lot of interesting type concepts that I think personally, PHP could benefit from and sealed classes is one of those concepts. Derick Rethans 2:18 What kind of syntax are you proposing? Saif Eddin Gmati 2:21 The syntax I'm proposing actually there is three syntax options for the RFC currently, but the main syntax is inspired by both Hack and Java. It's more similar to the syntax used in Java as Hack uses attributes. Personally, I have been I guess, using attributes from the start as I personally see sealing and finalizing similar as both effects how inheritance work for a specific class. Having sealed implemented as an attribute while final uses a keyword brings more inconsistency into the language which is why I have decided not to include attributes as a syntax option. Derick Rethans 2:56 In my opinion, attributes shouldn't be used for any kind of syntax things. What they should be used for is attaching information to already existing things. And by using attributes again, to extend syntax, you sort of putting this syntax parsing in two different places , right? You're putting it both in the syntax as well as in attributes. I asked what the syntax is, but I don't think he actually mentioned what the syntax is. Saif Eddin Gmati 3:20 The syntax the main set next proposed for the RFC is using sealed and permit as keywords we first have the sealed modifier which is added in front of the class similar to how final or abstract modifiers are used. We also have the permit clause which is basically a list allows you to name a specific classes that are able to inherit from this specific type. Derick Rethans 3:43 So when you say type here, is that just interfaces and classes or something else as well? Saif Eddin Gmati 3:48 It's classes interfaces and traits. Traits are allowed to add sealing but they are not allowed to permit. Okay for example, an interface is not allowed to permit a trait because a trait cannot implement an interface Derick Rethans 4:03 In the language itself, when does this get enforced? Saif Eddin Gmati 4:06 This inheritance restriction gets enforced when loading a class. So let's say we are loading Class A currently if this class extends B, we check if B is sealed. And if it is we check if B allows A to extend it. But when loading a specific sealed class, nothing gets actually checked. We just take the permit clause classes and store them and move on. Derick Rethans 4:32 It only gets checks if you're trying to implement an interface. Saif Eddin Gmati 4:36 This gets enforced when trying to implement an interface, extend that class, or use it trait. Derick Rethans 4:41 Okay. What are general use cases for this feature? Saif Eddin Gmati 4:45 General use cases for a feature are for example, implementing programming concepts such as Option which is a type that can only have two subtypes. One is Some, other is None. Another concept is the Result where only two subtypes are possible, either success or failure. Another use case is to restrict inheritance. As I mentioned before, for example, logger trait from the PSR log package is a trait that implements some of the method methods in logger interface, and expects whoever is using that trait to implement the rest. However, there is no restriction by the language regarding this, we can seal this trait to a logger interface ensuring that only loggers are allowed use this trait. Derick Rethans 5:34 When you say that Option has like the value Some or None, just sound like an enum to me. How should I think differently about enums and sealed classes here? Saif Eddin Gmati 5:43 Enums cannot hold a dynamic value. You can have a value but you cannot have a dynamic value, however, tagged unions will allow you to implement option the same way. Tagged unions are that useful only for this specific case, there is some other cases such as the one I mentioned for traits that cannot actually be implemented using the tagged unions. There is also the I don't know how to say this. Let's say we have a type A that sealed and permitting only B and C. And this case A on itself, as long as it's not an abstract class, is by itself a type. Can be used as a normal class, you can create an instance and use it normally. However with tagged unions, the option itself would not be a type, you either have some or none. That's the main difference between tagged unions until classes Derick Rethans 6:37 A tagged union PHP doesn't have them. So how does a tagged union relate to enums? Saif Eddin Gmati 6:43 With tagged unions as the, there is an RFC that's still in draft, I suppose that uses actually it is built on top of enums that that's why. Derick Rethans 6:55 I reckon once that gets closer to completion, I'll end up talking to the author of that RFC. So something I'm wondering, can a sealed type permit only one other type? Or does it have to be more than one? Saif Eddin Gmati 7:10 No, it can permit only one type. Let's say we have class A that only permits B. However, another thing is class B does not actually have to extend A, like if A is permitting B, B does not actually have to implement A. It's still useful because another class called C can extend B and implement A, so an instance of A B can still exists. Derick Rethans 7:36 I'm not quite sure whether I understood that. If you have an interface that says A permits B, then B is not required to implement A, mostly because the moment you loads class B, you don't even know it exists, right? Because it doesn't refer to it. Saif Eddin Gmati 7:54 Yes. Derick Rethans 7:55 It's just going to break anything? Saif Eddin Gmati 7:57 Hopefully not. The only break would be in the new reserved keywords which are sealed and permits. So those cannot be used as identifiers any more, but depending on the syntax choice, if for example, the second syntax choice wins which that would only take the permits keyword. If the third syntax choice is chosen then no new reserved keywords will be introduced so there will be no breaks. Derick Rethans 8:29 From what I see in the RFC the first syntax is using both sealed in front of a as a marker and then using permits. With the second syntax, you don't use seal but you infer that it is sealed from the permits keyword I suppose. And then in the last option you use the for keyword instead of permits and also don't use sealed yet? Saif Eddin Gmati 8:51 The third syntax choice is will be the one with no breaks as we will not be introducing any new keywords; for is already a reserved keyword in PHP. Derick Rethans 9:02 What is your preference? Saif Eddin Gmati 9:03 Personally I prefer the first syntax choice as it's the most explicit. When you start reading the code you can tell from the start this is a sealed class without having to continue reading until you reach permits. Derick Rethans 9:15 I think I agree with you there. Beyond the syntax is there anything else that needs to be changed in PHP itself? Saif Eddin Gmati 9:22 The only other change that will be introduced in PHP is in reflection class. A new method called isSealed will be added to reflection method, which allow you to check if a class the class being reflected is sealed. Another method will be added called getPermittedClasses which returns the list of class names provided in the permits clause. Also a new constant should be added to reflection class that is is_sealed constant which exposes the bit flag used for sealed classes. Some changes will happen to the getModifiers method in reflection class. This method will return the bit flag is sealed set, if the class being reflected is sealed. The getModifierNames method will also return the string sealed if the bit is set, that should be about it. Derick Rethans 10:12 Basically everything that you need in reflection to find out whether it's a sealed class and other permits. Saif Eddin Gmati 10:18 Yes. Derick Rethans 10:20 See, I see the name of getPermittedClasses has to use, has the word classes in it. Does that mean that the types after permits have to be classes? Saif Eddin Gmati 10:32 No, they can be either classes or interfaces. But PHP refers to both classes and interfaces as classes in the reflection. So we have a reflection class, but that's actually a reflection trait class interface. And basically everything is class-ish. Derick Rethans 10:47 Class-ish. I like that. Did you look at some other alternatives to implementing the same feature or just the three syntax choices that you came up with? Saif Eddin Gmati 10:56 I did not consider any other alternatives precisely as the alternatives might be type aliases, tagged enums, package visibility. But I think each of these RFCs focused on a specific problem and expanding that area, while sealed classes focuses on all the problems mentioned on in this RFC tries to solve them in a minimal way. But only in relation to inheritance in classes, interfaces, and traits. Derick Rethans 11:24 Keeping it short and sweet. What has the feedback been so far? Saif Eddin Gmati 11:29 The feedback has been pretty mixed. Some people are against adding more restriction to types and inheritance. But in my opinion, this is not about adding restriction, but rather providing the user with the ability to add restrictions. And we already have final classes, which a lot of people seem to dislike. Derick Rethans 11:48 I don't understand why. But fair enough. Saif Eddin Gmati 11:51 I have created a community poll a couple of weeks ago to gather feedback on Twitter. The results were 60% for with over 150 participants. Another poll was created by Peter on Facebook ended with 54 of people voting yes. However, such polls that do vary depending on the audience. So it can be really an accurate representation of the PHP community. Derick Rethans 12:15 Polls on Twitter are never scientific, or they? I see that the RFC is in voting already. So for people listening to this, and if you have voting rights, then you have until when exactly? Saif Eddin Gmati 12:28 Until the end of the month. Derick Rethans 12:30 March 31. It says yes. Okay. Well, thank you very much for taking the time today Saif about sealed classes. Saif Eddin Gmati 12:37 Thank you for having me. Hopefully, I get to be here another time in the future. Derick Rethans 12:42 I hope so too. Thank you for listening to this installment of PHP internals news, a podcast dedicated to demystifying the development of the PHP language. I maintain a Patreon account for supporters of this podcast as well as the Xdebug debugging tool. You can sign up for Patreon at https://drck.me/patreon. If you have comments or suggestions, feel free to email them to derick@phpinternals.news. Thank you for listening, and I'll see you next time. Show Notes RFC: Sealed Classes Credits Music: Chipper Doodle v2 — Kevin MacLeod (incompetech.com) — Creative Commons: By Attribution 3.0
Tathasthu | Every thing you need to Know to get successful in life | Vastu | Astrology
होली पूर्णिमा शुभ योग 2022 | Holi 2022 | Holi 2022 Date Time | होलिका दहन पूजा विधि
PHP Internals News: Episode 98: Deprecating utf8_encode and utf8_decode London, UK Thursday, March 3rd 2022, 09:02 GMT In this episode of "PHP Internals News" I chat with Rowan Tommins (GitHub, Website, Twitter) about the "Deprecate and Remove utf8_encode and utf8_decode" RFC. The RSS feed for this podcast is https://derickrethans.nl/feed-phpinternalsnews.xml, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news Transcript Derick Rethans 0:14 Hi, I'm Derick. Welcome to PHP Internals News, a podcast dedicated to explaining the latest developments in the PHP language. This is episode 98. Today I'm talking with Rowan Tommins about the "Deprecate and remove UTF8_encode and UTF8_decode" RFC that he's proposing. Hi, Rowan, would you please introduce yourself? Rowan Tommins 0:38 Hi, I'm Rowan Tommins. I'm a PHP software architect by day and try and contribute back to the community and have been hanging around in the internals mailing list for about 10 years and contributed to make the language better, where I can. Derick Rethans 0:57 Excellent. Yeah, that's how I started out as well, many, many more years before that, to be honest. This RFC, what problem is this trying to solve? Rowan Tommins 1:08 PHP has these two functions, utf8_encode and utf8_decode, which, in themselves, they're not broken. They do what they are designed to do. But they are very frequently misunderstood. Mostly because of their name. And because Character Encodings in general, are not very well understood. People use them wrong, and end up getting in all sorts of pickles that are worse than if the functions weren't there in first place. Derick Rethans 1:37 What are you proposing with the RFC then? Rowan Tommins 1:39 Fundamentally, I'm proposing to remove the functions. As of PHP 8.2, there will be a deprecation notice whenever you use them, and then in 9.0, they would be gone forever, and you wouldn't be able to use them by mistake, because they just wouldn't be there. Derick Rethans 1:56 I reckon there's going to be a way to actually do what people originally intended to do with it at some point, right? Rowan Tommins 2:02 So yeah, there are alternatives to these functions, which are much clearer in what you're doing, and much more flexible in what you can do with them so that they cover the cases that these functions sound like they're going to do, but don't actually do when you understand what they're really doing. Derick Rethans 2:20 I think we'll get back to that a little bit later on. You're wanting to deprecate these functions. But what do these functions actually do? Rowan Tommins 2:27 What they actually do is convert between a character encoding called Latin-1, ISO 8859-1, and UTF-8. So utf8_encode converts from Latin-1 into UTF-8, utf8_decode does the opposite. And that's all they do. Their names make it sound like they're some kind of fix all the UTF 8 things in my text. But they are actually just these one very specific conversion, which is occasionally useful, but not clear from their names. Derick Rethans 3:01 It's certainly how I have seen it used in the past, where people just throw everything and the kitchen sink at it, and expecting it to be valid UTF 8, and then at the end, decode. I mean, the decoding was not even part much of this, right? It's just throw everything at it, and then magically it will all be UTF 8. But I reckon that's not really quite the case. When and how does that go wrong? Rowan Tommins 3:26 So what actually ends up happening is, because text doesn't know what encoding it's in. Something that people misunderstand about character encoding is they think it's like, the text is a certain colour, and the computer knows what colour it is. And if you tell the computer to make it a different colour, then it will work. But it's not like that. In the computer, there's just the sequence of binary. And the encoding is how to read that binary as text. And if you tell the computer to read it as Latin 1, it will read it as Latin 1. If you take to convert from Latin 1 to UTF 8, it will assume the input is Latin 1, it will convert to UTF 8 on that basis. If your text actually wasn't Latin 1 in the first place, you're just going to end up with garbage. And some of the worst cases of that is when you already have UTF 8, and then you run utf8_encode on it, because the language doesn't know that you've already got UTF 8, so it tries to read its Latin 1, write it out ass UTF 8 and you get this weird Mojibake. I don't know pronouncing that right. Derick Rethans 4:27 I think it's pronounced Mojibake. Rowan Tommins 4:30 Mojibake. Derick Rethans 4:31 It's a Japanese term, because clearly these things, these issues happened with Japanese text quite a lot because they have a lot more different and difficult characters and encodings as well. With which things often go wrong though? Rowan Tommins 4:44 Using an unco on text that's already UTF 8 is obviously a big one. Usually obvious, but occasionally people just getting a muddle with that. The other thing that often happens is confusing with similar encoding. Latin 1 is often mistaken for a different coding windows 1252. To the extent that web pages labelled as Latin 1, web browsers will assume that they're actually in Windows 1252. These PHP functions don't make that assumption. If your text is actually in Windows 1252, and it's been mislabelled Latin 1, you might still think you're doing the right thing. So I've got Latin 1 text, but you haven't. And then the characters that are different, are going to get mangled again. And there's a few other related encodings that often look the same. There are a few other encodings that look the same at a glance that again, will go wrong on any character that's different between the different encodings. Derick Rethans 5:43 How could a function tell which encoding a certain text was in? Rowan Tommins 5:49 It's tricky. There are libraries out there that try to do it. Some encodings that are sequences of bits that aren't a valid character. So if any of those appear, it's definitely not in that encoding. Unfortunately, a lot of encodings, every pattern of bits has a meaning. It's just not necessarily mean. So you can't look at the string and just tell at a glance. The only way I've seen that does it effectively, is trying to guess based on what language text it might be in. If your text suddenly has a load of symbols in the middle of sentences, you're probably using the wrong encoding. If it's suddenly got a load of capital letters, in the middle of words, you're probably using the wrong encoding. So you can make guesses like that, that ultimately, there are only ever guesses. Derick Rethans 6:38 It's only always going to be a guess, right? You can't really tell for certain what it it is, which I've seen people assume that she can just tell. We have concluded that utf8_encode and decode don't actually do what they say they don't magically encode everything to UTF 8. What if things go wrong? How are errors handled? Rowan Tommins 6:58 If you're converting from Latin 1 into UTF 8, there Latin 1 covers all 256 possible eight bit binary strings. Those will correspond directly to a single mapping in Unicode and therefore in UTF 8. So there are no errors as such, when that happens, but it might not be what you want. One of the most notable ones that's different between these encodings is Latin 1 was standardized in 1985, the Euro didn't exist, then. The euro symbol doesn't have an encoding in Latin 1. If you've got a euro sign, you haven't got Latin 1 text, but you might think you've got Latin 1 text, and it will just encode it to what to a control character, which is where the windows 1252 code page puts the euro symbol, it replaces some control characters in Latin 1. One of the reasons why these character encodings are so easily confused is they've all nicely built to being compatible on top of each other. Latin 1 is deliberately an extension of ASCII. Windows 1252 is deliberately an extension of Latin 1, replacing some control characters. UTF 8 is also based on Latin 1, the first section of Unicode is actually the Latin 1, characters UTF 8 will encode and slightly differently so that it can carry on above 256. So in that direction, you can't actually get an error, you could just get a string, that doesn't make sense. Going back the other way. Unicode has, I think, potentially 11 million or something, and actually, at least a million assigned code points. Latin 1 only has 256. So you can't map all those back. And this function, the utf8_decode just replaces any that it can't match with the question mark. Similarly, if the input string isn't valid UTF 8. Again, if you've just misunderstood what strings doing and you haven't actually got a UTF 8 string in the first place, any sequence that doesn't look like valid UTF 8, again, just gets replaced with a question mark. Completely silently you get no warnings in your logs or anything. So you'll just get a few question marks. And problem is, a lot of people are writing text, mostly in English. So it's mostly ASCII. And all of these encodings agree on those first 127 things including all the letters and digits, most of your text will look fine. But if you're using utf8_encode, some of the accented letters will just look a bit funny. If using utf8_decode some of the characters will just turn into question marks. And you might just not notice that for a while until your applications been in production. And now all your strings a messed up. Derick Rethans 9:48 And I reckon that there's no way to fix that? Rowan Tommins 9:52 No. If you've saved saved the text, particularly with the decode direction. Run utf8_encode wrong, if you're careful and tracked carefully where what you've used, you can retrace your steps back to the original string. But if you've not understood what it was doing in the first place, you might have run it more than once, or put it into a system and then re interpreted it in a different way. And it can sometimes be quite hard to trace back what the original string was. You'll sometimes just have to edit it by hand. And guess that, oh, that's probably any acute because that was the word that was trying to be there. That was probably a curly quote mark that somebody was trying to type and those kinds of things. Derick Rethans 10:35 Talking about curly quote marks, I just found out that those are actually are code points in the windows 1252 encoding. Because I just had to edit a document that had these things in there. But the file was set as... this is UTF 8, which was a lie. It was a lie to begin with. We've established that these functions are pretty much destructive to text potentially, as well as not really doing what they say they do: encode every random stuff to UTF 8 or the other way around. I saw any RFC that you've done some research into their usage, didn't bring up anything interesting to talk about? Rowan Tommins 11:13 Yes, so there's a few things. So what I downloaded, it was last year, actually, I kind of had to pause on this RFC for real life happened a bit to me. So last year, I downloaded the 1000, I think top packages on Packagist, I'm most popular downloads, and went through all the uses, I could say of these functions. There were a handful that were using them correctly, they were checking that their input was Latin 1, or the output they needed was Latin 1. And using these, there were a few of those that were questionable, where they might have mistaken Latin 1 for Windows 1252. And actually, they were going to mess up any Euro signs or any of those few extra things that Microsoft added over the top of those control characters. There were a few using strftime, which can do translated Date Time strings. Those it turns out that functions been deprecated itself now, that will become a non issue, some people will have to find a different solution to that anyway. One of the odder ones that I've seen, which technically works, but only accidentally is people use it for what I describe as armour, where they've got a system that wants UTF 8 text, often encoding as JSON or something like that, where it needs to be UTF 8, they've got some unknown encoding that's not UTF 8, they encode to UTF 8, transmitted through the system. And then on the other end, run utf8_decode and they'll get back the string that they put in, because it never errors, there will always be a mapping of any string of bits that this function will give in UTF 8, it just won't be a meaningful string. You could put a JPEG image through utf8_encode, and you will get a string that is valid UTF 8, it's just not going to be very useful UTF 8. It's kind of a bit of a weird way of doing the thing you might do with base 64, or quoted printable encoding or something like that almost something for transport, it technically works. But this probably isn't the function you want to be doing it with. It's not a very useful encoding. And then there were a good number, which just tried throwing all the functions they could. And I kind of I don't want to call out the people with this. I think they were genuine mistakes, they were genuinely trying to solve a problem. But some of them just in hindsight looking at them or kind of hilarious. I think the one that makes me laugh most is the person who raised the StackOverflow question because their CSV file, some of the fields had grown to 32 kilobytes long, because they'd repeatedly run the same string through utf8_encode so many times, that each time it was encoding a single byte to multiple bytes, and then single bytes of that to multiple bytes. And only when it got to 32 kilobytes in one field, did they question whether they were doing the right thing? By which time their text was probably irrevocably lost in whatever other processing they've done on this file. Derick Rethans 14:22 Excellent encryption. Rowan Tommins 14:24 Yes. Derick Rethans 14:25 The RFC talks about a few other approaches to instead of deprecating utf8_encode and decode. What are the things that you look at? And why did you reject them in the end? Rowan Tommins 14:36 One of the most obvious things you could do? The biggest problem is the name of the functions. Could you just rename them? The problem with that is you'd have to spend a long time doing it because you want to introduce the new name in one version of PHP, then deprecate in a later later version of PHP, and then finally remove. And then at the end of it, you'd have these very specific functions. We could call them latin1_to_utf8 and utf8_to_latin1. If we were designing those functions, if you put an RFC to, to add those functions to the language, it wouldn't pass. There's they're very why, why would we have these specific functions, and we'd still have this problem of Windows 1252, and other related encodings, like Latin 9, which is the official successor to Latin 1, and also has a few differences amongst it. They still wouldn't solve a lot of people's problems. A lot of the people that actually want Latin 1 are going to need the euro symbol. So they don't probably don't actually use Latin 1 any more. Because I guess Canadian French, and Mexican Spanish, need to probably that in one's probably still a decent encoding for but the Western European languages it was originally designed for, probably everyone's going to want a euro symbol. Changing the name just leaves us with these awkward functions still. You could instead or as well add options to them, you could add a parameter to them that indicated what the source or destination encoding was. That defaulted initially to Latin 1, and then you were forced to add it later. And then at least you'd be spelling out what encoding it was. The problem with that is, the more encodings, you add, there's actually quite a lot of code that would need to then be added to the function, and it will be duplicating functions we've already got. Derick Rethans 16:31 Such as? Rowan Tommins 16:32 So we've actually in PHP got three functions that can convert between any pair of encodings, including the ones that these functions do. They're all unfortunately in extensions, which are technically optional. Which is something that the way PHP is modular, means that a lot of things that you'd think were kind of just part of the language are technically optional, for one reason or another. But we've got mb_convert_encoding from the mbstring extension. We've got iconv, which uses an external library of the same name. Derick Rethans 17:09 Are you sure it just doesn't use a GCC function or the glib functionality in PHP? Rowan Tommins 17:14 The iconv function uses whatever iconv is available on the system, and seems to vary quite a lot between systems. Oddly, one online code running tool I tried, doesn't actually recognize 8859-1 as an encoding in the iconv function. I don't know why. Just something about the libraries, that version of PHP was built, built against. The most powerful one we've got but also the least documented is the intl extension, which is built on the ICU library, made by the Unicode Consortium. That has a lot of options around how you handle errors and missing characters and supports a lot of different character sets. Some was completely undocumented, I've tried to write a manual page for it, which will hopefully get merged and put live soon. So at least, there will be some documentation there's a, there's an object that you can use with lots of options. But there's a static method, which just takes a from and to encoding. So that's one option. The mb_convert_encoding is probably the most widely available. And maybe we should be looking at making that MB string, less optional. I don't know what that looks like, because of the way, unless you force people to compile it in a lot of the Linux distros. Distribute every module they can separately, they make optional. Derick Rethans 18:39 But they also make it easy for you to install them then. Rowan Tommins 18:42 They make it very easy to install. So I don't know how many people actually run PHP with just its minimal set of modules. And how many just install a default set. The default set is a bit vaguely defined, unfortunately. So that's one of the my main hesitation with this removal, that although we've got these alternatives, we've got these three alternatives. They've all got slight problems, and they're all optional. Derick Rethans 19:08 But considering that utf8_encode and decode don't actually really do well, they say they do, everybody that had to do character set conversions correctly, would have already been using these functions. Rowan Tommins 19:23 Indeed, yes. So I've seen people misuse all of these. Again, people do just generally misunderstand character encoding. MB string does have a function to guess character encoding. As you're saying earlier, people just kind of assume that that will work. A lot of the time, it can't really tell the difference between different character encodings. It can tell you whether a string is valid UTF 8, it can't tell you whether it's Latin 1 or Windows 1252, or any of these others that are single byte encodings. Derick Rethans 19:52 I think ICU actually as functionality for guessing an encoding as well, but it will give you back an array of possibilities and perhaps even with a confidence. But it's a long, long time since I've looked at that. So I'll have to revisit it. Rowan Tommins 20:08 Yeah, that would at least be a more kind of transparent way of doing it that. And that's I guess what I'm trying to do with removing these, is that if you're forced to specify a pair of encodings, as you do for these other functions, at least hopefully, somewhere in your mind, you're going to be thinking about what encodings you might have, rather than just reaching for the first function you find. Derick Rethans 20:31 Yep, exactly. What is the feedback being so far? Rowan Tommins 20:34 Generally positive. There hasn't been a lot of a lot of comments. But those that have been have generally been supportive. I liked somebody said: All the times they've seen it used, including when they've used it themselves, it's been a misunderstanding. I'd like to hear more feedback of anyone. Anyone does have quite. The main feedback I have had has been around making sure there are alternatives to recommend to people. So anyone who is using these correctly, or nearly correctly, what we tell them to use instead, how do we make sure that's clear, and clearly documented, and we're recommending the right thing. I'm going to think a bit more about that, whether we should be being more definite in recommending one of these options. Particularly I think iconv does seem to have these odd platform issues. They used to be a fourth option. While I was looking at this, they used to be another library called recode. That one seems to have been discontinued. Some references in the PHP manual still refer to recode as an optional option for doing this. But that's been long since shelved. So MB string has the benefit that it doesn't rely on any third party libraries. It's technically a third party library, but it's shipped with PHP, and I don't think anything other than PHP uses it any more. And there have been a lot of there's been a lot of work on that library recently, particularly somebody called Alex Douward, apologies, if you're listening to this, and I pronounce your surname wrong, has done a lot of great work. I've seen recently improving that extension, making sure the detection algorithm is doing as sensible results as it can and improving the test test coverage of that extension and things like that. So that gives me a bit more confidence in that extension, which initially was one of those PHP reinventing the wheel, it felt a bit like, so probably update the RFC to more explicitly say, that's the number one recommended path. Derick Rethans 22:27 And of course, you can link that from the utf8_encode and utf8_decode manual pages as well. Please don't use this instead, do this, right? Rowan Tommins 22:36 Yeah. And that's again, where it can be a nice clear drop in replacement, so that people are using it right. Here's exactly what to what to use instead. But hopefully, while they're replacing it, they may be at least think about whether it was doing what they what they were hoping for in the first place. Derick Rethans 22:55 When do you think you'll be bringing this up for a vote? Rowan Tommins 22:59 Unless I get more feedback, further changes? I'll probably tweak that wording in terms of the recommendation that we'll put to users. Otherwise, probably in the next couple of weeks, unless I hear any more, to see if any last minute criticism comes out the woodwork when people are asked to vote on it. Derick Rethans 23:18 Yeah that always happens, right? No comments when there isn't a request for comments. But loads of comments if people are voting on it, and it makes it to Twitter. Okay, Rowan, thank you for taking the time today then to talk about this RFC. Rowan Tommins 23:32 Thank you very much for having me. Derick Rethans 23:39 Thank you for listening to this installment of PHP internals news, a podcast dedicated to demystifying the development of the PHP language. I maintain a Patreon account for supporters of this podcast, as well as the Xdebug debugging tool. You can sign up for Patreon at https://drck.me/patreon. If you have comments or suggestions, feel free to email them to derick@phpinternals.news. Thank you for listening, and I'll see you next time. Show Notes RFC: Deprecate and Remove utf8_encode and utf8_decode Credits Music: Chipper Doodle v2 — Kevin MacLeod (incompetech.com) — Creative Commons: By Attribution 3.0
How often do you take your children on dates? Spending quality time with your children greatly impacts their development. Join Rev. Grace Bukachi as she teaches on the value of 'Parent-Child Date Time'. #CITAMChurchOnline #ChurchEveryday
With Valentines Day coming up, it's important to know how to talk with, date, and reel in cute guys and girls. As with anything in life, there's right and wrong ways to do this. Together, acclaimed dating experts Michael Moody, Rachel Corry, and Elaina Wright discuss the right ways to do all those things. New episodes drop soon, get ready for this unpredictable, hilarious ride! --- This episode is sponsored by · Anchor: The easiest way to make a podcast. https://anchor.fm/app
Today we are going to talk details about the Galaxy Unpacked Event and where to see it. AxTech YT Channel: https://www.youtube.com/c/AxTechAKR --- This episode is sponsored by · Anchor: The easiest way to make a podcast. https://anchor.fm/app --- Send in a voice message: https://anchor.fm/axtech-akr/message
Where we talk about the book Date & Time by Phil Kaye and talk about new things going on in our lives. ❤
Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian's book too! Special guest: Juan Pedro Araque Espinosa (Youtube Chanel: Commit that Line) Michael #1: State of the community (via Jet Brains) This report presents the combined results of the fifth annual Developer Ecosystem Survey conducted by JetBrains Not just Python, but all of us Python is more popular than Java in terms of overall usage, while Java is more popular than Python as a main language. The 5 fastest growing languages are Python, TypeScript, Kotlin, SQL, and Go. A majority of the respondents (71%) develop for web backend. Does fall into the trap of “Hi, I'm a CSS developer, nice to meet you” though Women are more likely than men to be involved in data analysis, machine learning, and UX/UI design or research. Women are less likely than men to be involved in infrastructure development and DevOps, system administration, or Deployment. Brian #2: Cornell - record & replay mock server Suggested by Yael Mintz (and it's her project) Introduction blog post “Cornell makes it dead simple, via its record and replay features to perform end-to-end testing in a fast and isolated testing environment. When your application integrates with multiple web-based services, end-to-end testing is crucial before deploying to production. Mocking is often a tedious task. It becomes even more tiresome when working with multiple APIs from multiple vendors. vcrpy is an awesome library that records and replays HTTP interactions for unit tests. Its output is saved to reusable "cassette" files. By wrapping vcrpy with Flask, Cornell provides a lightweight record and replay server that can be easily used during distributed system testing and simulate all HTTP traffic needed for your tests.” Juanpe #3: Factory boy (with Pydantic by chance) Factory_boy allows creating factories to generate objects that could be used as text fixtures Briefly mentioned in the past in episode 193 A factory takes a base object and allows to very easily and naturally define default values for each field of the object. One can have many factories for the same object that could be used define different types of fixtures of the same object It works with ORM objects (Django, Mongo, SQLAlchemy…) If you have a project that uses Pydantic to define your objects, factory boy also supports Pydantic although it is not documented and does it by a side effect Internally factory boy generates a parameters dictionary that that is unpacked when constructing the model at hands. This works perfectly with pydantic and can be used to generate pydantic objects on the fly with the full power of factory boy Michael #4: pyinstrument Call stack profiler for Python. Shows you why your code is slow! Instead of writing python script.py, type pyinstrument script.py Your script will run as normal, and at the end (or when you press ^C), Pyinstrument will output a colored summary showing where most of the time was spent. Async support! Pyinstrument now detects when an async task hits an await, and tracks time spent outside of the async context under this await. Pyinstrument also has a Python API. Just surround your code with Pyinstrument Nice middleware examples for Flask & Django Brian #5: Python 3.10 is now in Release Candidate phase. RC1 just released. RC2 planned for 2021-09-06 official release is planned for 2021-10-04 It is strongly encourage maintainers of third-party Python projects to prepare their projects for 3.10 compatibility during this phase Reminder of major changes: PEP 623 -- Deprecate and prepare for the removal of the wstr member in PyUnicodeObject. PEP 604 -- Allow writing union types as X | Y PEP 612 -- Parameter Specification Variables PEP 626 -- Precise line numbers for debugging and other tools. PEP 618 -- Add Optional Length-Checking To zip. bpo-12782: Parenthesized context managers are now officially allowed. PEP 632 -- Deprecate distutils module. PEP 613 -- Explicit Type Aliases PEP 634 -- Structural Pattern Matching: Specification PEP 635 -- Structural Pattern Matching: Motivation and Rationale PEP 636 -- Structural Pattern Matching: Tutorial PEP 644 -- Require OpenSSL 1.1.1 or newer PEP 624 -- Remove Py_UNICODE encoder APIs PEP 597 -- Add optional EncodingWarning Juanpe #6: time-machine Time-machine mock datetime and time related calls globally noticeably faster than other well known tools like freezgun. The mocking is achieved by replacing the c-level calls by whatever value we want which means the library does not need to mock individual imports. Mocking datetime cannot be done with patch.object and needs to be patched everywhere it is used which can turn mocking everything into a tedious (and/or slow) process. Datetime methods (now, today, utcnow…) can be mocked by setting a frozen time or by letting the time tick since the mock call is made. It provides a simple context manager to use it as well as pytest fixture that makes using it very simple from datetime import datetime import time_machine @time_machine.travel("2021-01-01 21:00") def test_in_the_past(): assert datetime.now() == datetime(2021, 1, 1, 21, 0) --------------------------------- # The time_machine fixture can also be used with pytest def test_in_the_past(time_machine): time_machine.move_to(datetime(2021, 1, 1, 21, 0)) assert datetime.now() == datetime(2021, 1, 1, 21, 0) Extras Michael Credit-card stealing malware found in official Python repository and Software downloaded 30,000 times from PyPI ransacked developers' machines (via Joe Riedly) Brian Flavors of TDD - Test & Code episode 162 Working on tox and CI chapter of 2nd edition of pytest book, hoping that to be released within the next week. Joke JavaScript Developer Bouncing from framework to framework
Healthy Together Time Class 7/21/21, Kat & Jon Hosts
Chris gives some small updates on working with Svelte. He really likes Svelte so far. Svelte's great. Modals are complicated. He also talks about using a little JavaScript library, called Quicklink. Steph talks about sending data to a third-party system and using feature flags to help deprecate some code. Finally, they both riff on a listener question on consulting. Said listener asked, "Do you think about your work as 'consulting first' or as 'building great software first and then good experiences for your clients will follow naturally?'" Find out their take and give us your own, here on this episode of 'The Bike Shed!' Bike Shed "Nate Berkopec" Episode (https://www.bikeshed.fm/296) Svelte (https://svelte.dev/) Quicklink (https://getquick.link/) Boring Rails: Skip the bullshit and ship fast (https://boringrails.com/) mtime (File) - APIdock (https://apidock.com/ruby/File/mtime/class) Transcript: STEPH: Hello and welcome to another episode of The Bike Shed, a weekly podcast from your friends at thoughtbot about developing great software. I'm Steph Viccari. CHRIS: And I'm Chris Toomey. STEPH: And together, we're here to share a bit of what we've learned along the way. So hey, Chris, happy Friday. How has your week been? CHRIS: Happy Friday. My week's been great, yeah. I've been writing a lot of code, moving things around, planning some features, and all that fun stuff that goes into building an app, so I'm enjoying that process. I'm also halfway through listening to your recent episode with Nate Berkopec, which was absolutely delightful, well, at least the first half that I've listened to so far. I assume the rest will continue to be absolutely delightful, but it does remain to be seen. So I'll report back next week when I've listened to the whole thing. But yeah, that's great. And I'm glad that Nate got to come on, and we got to share a little bit of his story as well. STEPH: I like how clear you are in terms of like, "The part that I've listened to so far is great, but I reserve judgment until I've heard the rest of it." [chuckles] But that's awesome. CHRIS: The thing about being a developer is it has broken my brain such that I am overly specific all the time because I just argue with a computer all day. It's what I do. So then I start talking to humans, and I'm like, wait, I should probably behave differently now. And I got to unwind some of those computer fights. But anyway, and let's see, small updates working with Svelte, really like Svelte. I'm leaning into it more and more and embracing...I think I'm starting to understand the aspects of it that I really like. And one of the things that I really like about it is that it is somewhat underpowered. And what I mean by that is working on React applications, I find that I can do some fancy stuff, and I can express it really well in TypeScript. And I can really go for it and create some components that are wildly variable and configurable and can take in any combination of props and do all sorts of things. And I can slice out tiny, little components and do all of this. When I'm doing that, I enjoy it. But in Svelte, I have a little bit less power in my control. Svelte is closer to HTML, CSS, and JavaScript fundamentally. So you can make components, and I really like that. You can bundle up the pieces of functionality and display and formatting, and all of that, but it's not quite as powerful. It's not quite as expressive. And I've actually found that to be a useful limitation, which is an interesting frame. It's not something that I thought I would say, but I'm finding that the code that I'm authoring in my editor is so much closer to the code that's actually going to be presented to the end-user. That is really useful in my mind. I find that to be really valuable. There are small things like in Svelte; you can actually say class equals when you're trying to define a class on an HTML element. It turns out I really like that one instead of having to say class name or similarly HTML for. There is a handful of them in React that you have to change the name of. So if you copy a snippet of HTML from the web, and then you dump it into your editor, if you're working in React, you have to change a bunch of stuff. It doesn't work right away. And it's a small thing, but I found that I really seem to care about it. But there's the “it's nice that it just works” version. But I feel like there's also an actually practical, meaningful edge of it is so much closer to the thing that's actually going to be in the browser, and I like that. STEPH: I liked the phrasing that you used just a moment ago where you said, "Useful limitation." Since I haven't used Svelte myself, one of my understandings is that you like the fact that it is that low JS in terms that we are introducing this framework, but it's not as heavy-handed as React or another framework that you could retour. But then you also said you're running up to areas where you feel like you're missing some stuff from React, is what I'm hearing. Is there a particular feature, or do you have a concrete example to help me understand some of the stuff that you are really missing? CHRIS: It's not so much that I feel like there are specific features missing, but as a pointed example, I am not able to pass in the DOM element that I would like the component to render as. That's a weird thing, but often, component libraries will do this. So you have a button component, but the button can render either as a literal HTML button element or an anchor element. And you can pass in as equals and then button as the string there. And in React, you can do that, and then you can actually do some type inference across it and say, "Okay, now the rest of the props that you can pass in are button props.” And if you pass in as equals a, so implying that you want it to be an anchor or a link, then it will constrain you to the link properties and say, "Oh, you must have a HREF now." That's really cool that you can do that. It's also super complicated, and the TypeScript representation of it, while it works, is very, very complicated and the types of errors that you get. The complexity of what you can build with React is really interesting. But I worry now that I've spent a good bit of time in Svelte, I worry if it's overpowered. I've worked on plenty of applications where the system as designed in React, all the set of different components is very, very complicated. And you sort of have to learn that system in order to be able to work in it, whereas in Svelte, you just start, and you're writing in HTML and CSS. And then, as you need more fancy stuff, you can slowly layer it in. And to be clear, Svelte definitely has plenty of power. This past week, actually, we were working on a modal component, but we were really focused on accessibility, which is probably a good thing that you should do, but it turns out modals are very hard to get right. The dialogue component that should exist in HTML is not complete, and it's not a thing that we can rely on. So we have to do certain things ourselves. So the idea of focus trapping when the model pops up, we need to say, oh, okay, the focus should be trapped inside of here, so you can tab forward and back, but it's going to stay within that modal component. There's actually a way that you're supposed to portal it. So you move it outside of the documents so that you can make the rest of the document...I want to say aria-hidden is the property, but you're basically saying the entire rest of the document that's behind this modal component should be inert to a screen reader essentially or invisible to a screen reader while the modal is up. And doing all of those sorts of things is super complicated. After you close the modal, you're supposed to refocus the button that opened it, the triggering element, and that's a tricky one where you have to pass down a reference to something. And that was all very expressive, actually, very straightforward in Svelte in a way that I was really impressed by. So it definitely has all the power that you need but not any more than what you need. Or there is a small line of it's just right. STEPH: So we should just scrap modals. That's one of the things that I'm hearing from you. So I just want to clarify because I do feel a little confused because in the beginning, it sounded like you were saying that Svelte is wonderful, but you do feel like you're missing a little bit of functionality there that you do receive with other frameworks like React. But then that last thing you said where “it's just right” sounds like it's the Goldilocks. So I'm a little confused as to exactly how you're feeling about Svelte in the moment. CHRIS: Yeah. I'm probably not being as clear as I should. I am a big fan of Svelte, so as the first answer, a big fan of Svelte. I'm recognizing that, strictly speaking, it is somewhat less powerful than React. But I'm also trying to say, perhaps failing at saying, but trying to say that I like that, that I'm finding its constraints are useful. React can do a ton of stuff. You can represent a real impressive array of component functionality and have components that take 17 different props that covary in different ways, and it's very complicated. And I've worked on plenty of React applications where I just have to stare very hard at the component library for a while. And I'm like, ugh, I still don't know how this works. And it's this custom bespoke language where Svelte feels like it is much closer to the thing that we're actually doing, which is rendering HTML and CSS and JavaScript and whatnot, and I like that. I'm finding that very useful. I'm finding that lack of power not to be a hindrance but, in fact, to be useful. STEPH: Hmm. Okay. I like that last part. Yeah, there are often times where I feel like the less powerful something is, even if it means a little extra work on my end but it's clear as to the work that's being done...I'm going to take it back a couple of years to when I was first learning Elixir because that's how I felt jumping from Ruby to Elixir and from Rails to Phoenix, where suddenly I felt like I had more clarity. There were some things that I had to do more on my own, but I felt more clarity as to what exactly was being done versus Ruby and Rails doing a lot on my behalf. So I can certainly relate to that. CHRIS: Yeah, I think that captures it well, that the expressive power of React can perhaps lead to somewhat more confusing code, and the small handful of cases where I need to be slightly more verbose in Svelte I actually find really useful. Like, Svelte is making sure that I'm writing components that are clear and easy to work with, but it still has all of the power that I need, and I can do everything I want in it. And yeah, overall, just yeah, Svelte's great. Modals are complicated. And that's my story. But yeah, that's a little bit of what's up with me. What's going on in your world? STEPH: Before we switch gears. I want to add on a little bit more to what you just said because something that I have noticed with me is that the longer that I've been a developer, the more I want that lower-level control and understanding as to what is happening. And it sounds like that is very much what you're saying that you're enjoying with Svelte is even if it does require a little more extra effort, that then at least I have that ability to exactly control what's happening versus if you're using higher-level obstructions, you're stuck with the API that's been designed for you. And that API works 98% of the time, that's wonderful but then that 2% of the time you're in trouble. So I've definitely noticed that trend, that over time, I want that lower-level control over everything that I'm working with and building, although not all the way to C, let's not go that far. CHRIS: I mean, there's Assembly underneath C. We can keep going, and we can just manually manipulate transistors as well if we really want to get after it. [laughs] STEPH: Next week on The Bike Shed. [laughs] CHRIS: Much, much higher level of abstractions are interesting to me, but yeah, there is a sweet spot. Svelte seems like it's the one for me. STEPH: Nice. So then switching back to what's new in my week, it's been a little bit of a weird week in terms of there's been a lot of focusing on sending data to a third-party system. So we had a lot of data that they needed in their system. So I have been focused on running a number of processes that are then sending that data over and then essentially babysitting processes, making sure everything is going smoothly. Also communicating with their team to understand okay, what's being received? Do we have any errors? Is there any sort of miscommunication between our systems, and that's why we're needing to resend this data to you? So it's been very different in terms that it wasn't a typical feature development week. It was more, hey, I sent you some data. What did you receive? And then let's fine-tune both of our systems on each end, which that part I always enjoy. As soon as I can get to that level of collaboration with someone, I very much enjoy that part because initially, it felt like a stressful task of like, hey, we've got this giant CSV. We need to process and send data. But then as soon as I have someone else to work with, then I'm like, yeah, okay, this is great. They can update their system. We can fine-tune ours as well in case there's something that's not communicating properly, and that part I really enjoy. I really enjoy collaborating with someone else so then we can both improve our systems together, so that part was a little different. But the actual weird thing that I did this week is we have feature flags, and we are using those feature flags to help us sunset and deprecate some code. So we have a controller path that is pretty gnarly. It is one of the more dense, difficult areas of our codebase to understand. And so we are refactoring it and creating a new green space for it so we can start to pull in some of that behavior and then also refactor as we go. So we essentially have class version one, and we now have class version two, which is always something. And we want to be able to feature flag this because, with our deployment workflow, we need the ability one; we want to be able to switch back quickly. So that way, if something goes awry, we can switch back to the original code if we've made some misassumption in our V2 version. And then we want to leave that on for a while to make sure things are running smoothly, and then we can go back and actually remove that class. But then the question came up is like, well, if we have these two files, how do we tell the team not to touch this particular file but only contribute or make a change to this other file? Because we have a sizeable team, and we work in different time zones. And there is a very reasonable answer that we communicate with the team that other folks are aware because they've seen the PR. There's a whole self-discipline of we review PRs and make sure stuff wasn't changed. All of that stuff is fine. It's reasonable. But I wanted to do something a little less reasonable [chuckles] that would still fail loudly in case someone changed a file. So the question was presented is there a way that we could fail loudly if someone changed this file? And there's a fun thing that we'll do at some of our daily syncs where someone will say, "That's a good idea. I have a bad idea." There's a fun thing that happens at our daily syncs where someone will often ask a question, and someone will provide an idea. And then someone else will say, "That's a good idea, but just to throw it out there, I have a bad idea. So let's just explore all of the ideas." And one of them was like, "Could we write a test around this? So if the file hash or something about that changed, then could we alert the team so then we know that this file changed and you're not supposed to change this file?" And essentially, having that discussion of like, well, then we're reimplementing Git because we're trying to track file changes. That seems like a bad idea but still a novel one to talk about for a few minutes. The implementation that I landed on and then shared with a person that's working on this is you do have the ability with Ruby, the file class itself; you can open a particular file. And for this one, select class one, and then you can use the function mtime, which returns the modification time for a file. So you can check the last time that a file was changed. So I wrote a test that says that "This file was last altered at…" and I grabbed that file's last altered at time with mtime. And then, I compared that to a particular DateTime. And then that DateTime could be any DateTime in the future once we deploy this class version two, so we don't expect that file to be altered. So this test will always pass until someone changes that file. And then Ruby is going to say, "Oh, your time is now greater than that other time you said." And so it's going to fail, which actually works pretty well. It's not as ugly as I thought it was going to be. [chuckles] As to whether it's a good thing to add to the codebase, I don't know, but it was a fun thing to write. CHRIS: I like it. I've definitely written things like that in the past, and I guess; therefore, I'm biased. [chuckles] I'm a fan of this sort of thing. But when you can take that group knowledge that is just shared in communication or via code review and you can capture it in the code, especially if you can do it in a stable, robust way…In particular, the first thing that comes to mind with that is like, well, are there going to be different representations of the timestamp on your system versus CI? Will that ever change over time? Like, Linux versus OS X or things like that. I actually have reached for Git in situations like this in the past. So, in particular, the one that I found myself doing a few times is trying to instrument code generation. So say we're working with Apollo, and we are generating the TypeScript types associated with a GraphQL request. I wanted to put something into CI to say, "If we haven't committed those changes," because we're supposed to be committing those files alongside, "then warn." And so the idea was take a snapshot of what things look like right now, run the command that does the code generation, and then check after that. I've done different versions where it's like, hey, Git, is the working directory dirty at this point? That's a version. I've also done one recently where I got the checksum of the file but again, asking Git. Because you're totally right that a lot of this...this is what Git does, and we don't want to rewrite Git. But I did feel okay reaching out and being like, "Hey, Git, can you help me understand the word?" But I like these sorts of things, particularly if you can do it in a way that won't ever require someone turning it off. I don't know if you've worked on projects where ESLint is enabled, but every third line has an eslint-disable-next-line. And it's just like, well, we have a bunch of rules, but we ignore them in a lot of cases. And those sort of...the like trust scenario with an automated tool I think is so important. If it's ever giving you false positives, false negatives, whichever it is, then it immediately, I think, loses so much of its utility. But if you can do it in a way that is stable and robust, then I am a huge fan. STEPH: Well, we'll see if the person decides to include it in their PR or not. But I do like that idea of where we can take away the idea that we're going to catch it if it changes in a PR because then we're just going to end up in a bad place that if we fix a bug in the class V1 but don't apply that to class V2, we're just going to be in a bad spot. And it's likely we'll forget about it when we go back to then delete class version one. There is something that you said that has reminded me of a very small change that I made to my process, but I feel like it had a big impact. And it's specific to working with feature flags, how often you'll have your tests where it's like if feature flag is on, this behavior should happen, if it's off, this behavior. And I often would wrap my test in the default path where the feature flag is off, and then I'd have my other if the feature flag is on; this is the behavior. But as we are migrating with the intent that this feature flag at some point in the near term future is going to always be on, so we know we're going to come back and remove all of the other code. I switched those two paths and treat the default happy path as the new if the feature flag is on; this is the new world. So then when folks are going back to say, "Okay, I just need to delete everything that represents when the feature flag is off," suddenly, it's just very easy to find that context to say, "Hey, feature flag is off and then boom, delete all of those tests." And that's been really nice. CHRIS: I really like that lens of designing or coding for deleteability. How easy is it to just rip this thing out? It's one of the things that I love about Tailwind, or one of the purported facets of Tailwind that makes it really nice is when you're looking at a given template, you can just rip it out. You don't have to worry about it because there's no associated CSS that you need to think about because the CSS is sort of generated available, whatever you want to call it with Tailwind. But I really like that idea of making it easy to delete stuff. Because it's so easy to just have your codebase slowly grow over time and look at files and be like, "I don't know if we're using that, but better to be safe." Cool. I'm excited to hear if that does land in the codebase and how folks respond to it. What did you phrase the message as? So if there's a test failure, did you give a particular like a special RSpec formatted message to be like, "Hey, friend, you're not supposed to touch this file. I know you're well-intentioned, but…" or is it just like, "Failure, bad. Mtime is different." Which end of the spectrum are we on there? STEPH: I love that you asked that question because I almost went down that path, and I was like, well, this should really have its own custom failure message because it's odd enough that I want to tell someone a little bit of a story when it fails. But I didn't because this was something that one; I just want to see if I could do. So I initially started looking at standard rb in RuboCop because at first, I was wondering if this was something I could solve via linting if it was something that RuboCop…if I could say, "Hey, RuboCop, if you notice that this file changed…" I didn't know if they had a hook into Git as they're looking for files to analyze. So I first leaned on RuboCop standard rb, which essentially then uses RuboCop under the hood, and I didn't find anything there. So then that's when I was like, okay, maybe Ruby has something, and that's when I found the file mtime. So at that point, once I'd gotten the test to pass, I'm like, you know, this is good. There's a very nice, friendly test description that goes along with if this fails; this is the reason why. But I do think that would be like cherry on the top addition to the test to have a very nice error message that goes along with this. So if I were the one that was adding this to the codebase, I would take a few more minutes to do that myself. It definitely felt like one of those moments where I had gone far enough into an experimental mode, and I felt like I had just reached that point where this is useful, and I want to share it with the person who's actually working on this. But then I pulled back going further because I'm like, I don't actually know if they want to use this and if they're going to implement it. So it felt like that right friendly balance of like, here's something that works. Feel free to use as is, make it better, don't use it, totally up to you. CHRIS: Yeah, I think given that context, that's definitely I feel like a good line to draw, not like, “Here's fully completed code that you can now just drop in. I did all the work, but here it is.” Versus like, “Oh, here's a kernel of an idea if you want, run with it, but if not...”But yeah, [chuckles] if you went to the length of writing a nice paragraph summary message to the end-user, that feels like you're really taking over the show. So cool. Well, yeah, interested again to hear how that goes and hear if it does, in fact, stop. That's the other thing. It's like, if it never actually fails, then everybody was just fine with the human process. But I'm intrigued to see how many times it actually does stop unwanted modifications of the file. So that's an interesting measure to track. STEPH: Yeah, that would be an interesting thing to track because if we do have it, then we may have less visibility into knowing if it failed because then someone will see it fail locally, but then we will have prevented it from getting to that PR state. It is one of those “did someone not change it because we added the test, or could we have skipped that process?” It feels like one of those nice safety measures, but that would be a fun thing to measure, I agree. CHRIS: Yeah, especially if it's a small change; in this case, I think it's totally worth it. But now, as I said it, I didn't mean it to be more of a thing. But now that I think about the question, I wonder if all tests should fail at some point. Like, all tests have a cost, both in terms of development and then thinking about them in runtime and all of that. And a good test is one that eventually fails because you change the system in a way that broke some constraint. And so, therefore, I'm now asking the question, like, should every test fail at some point? Are tests that only ever pass actually not that useful? I don't think so. Now there's a story running in the back of my head that's like, I kind of want to look at the CI stats. And feature specs will occasionally fail for unrelated reasons. But unit-level tests that never break, that never fail and catch something that was broken…I don't know that I actually believe this, but I'm just intrigued. As I asked the question, I was like, huh, should all tests fail? Sort of like one hand clapping kind of thing, anyway. STEPH: I like the question, or it's making me stop and think because my initial answer is yes, as long as it's failing for a meaningful reason, as long as it's not a flaky test or something along those lines. But otherwise, as you're working on the system and you're making changes, then I'm inclined to say that yes, every test should fail at some point. But I agree, if we're getting into existential test area, then I don't have concrete feelings about this yet. CHRIS: Yeah, and I feel like it's one of those sorts of questions. So pivoting off of that ever so slightly to bring us to something much more practical, I have a tiny utility that I want to chat about. And then I think we have a listener question that we want to discuss. But the utility, I think I brought this up on a previous Bike Shed episode, but the tool it's a little JavaScript library, but it's called Quicklink. And so the heading is instant next-page navigations. And so the way it works is it's just a little snippet of JavaScript that you'll include from a CDN, or you can NPM install it or any number of ways. But it's a tiny, little one kilobyte JavaScript thing that basically what it does is it attaches to every link on the page whenever you use that link. So you click on it or if you're on mobile if you tap, or however you're interacting with it, if it's an internal link, so not external to your site and not going to a different domain, but if it's internal to your domain, what it's going to do is it's actually going to prefetch in the background as you hover on that link. So it's going to say, "Hover is a good indication of intent to follow this link. So we're going to prefetch it in the background." And then when the user actually subsequently clicks it, which is often a couple of 100 milliseconds later, that's often enough time actually for the page to load in the background. And then, when they click the link, it almost feels like instant navigation. There's a similar thing that happens based on when you tap and when the actual firing of the link happens on mobile. So there's another delay that they can take advantage of there that's not quite the same as hover. But overall, it just takes basically any webpage, any website, and makes it feel very much faster. And it's cheap, easy, just kind of works. I really like it. It's a very interesting little project. STEPH: I'm fascinated by how that would feel as a user because if I'm hovering over a link, I'm thinking through my specific navigation habits. So if I'm going to a link, like, I don't hover very long. I don't think of myself as a hovering internet user. [laughs] I'm probably going to click on it right away. So I wonder if I would still feel that same speediness versus...yeah, I am interested in the metrics if they have something around like...I don't know why they would know this or have this, but like, most people hover for this long. And so then it speeds up their feeling of the page load. I'd be interested in that. CHRIS: I like the idea that you're bracketing yourself into the quickest click of a link in the west. I'm looking around on their website, seeing they have a quote from NewEgg at the top, which is, "We implemented Quicklink and saw a 50% increase in conversions and 4x faster page transitions." So it sounds like I'm reading an ad for this now, which I'm not because it's a free project. So you can use it or not and pay the $0. They have a demo, and then they have a measure page. So I think you can actually get to...I think they're just talking about how to measure it. But I've definitely seen another page where you can click on a link, and it will tell you what was the difference between hover and active when you actually interacted with it. And it turns out the bounding box for a link is bigger than what you see. And you're often moving your mouse not entirely to the center, but you're not just getting to the edge of it and clicking. And so that period of time where you're moving your mouse onto the link, there's actually often a couple of hundred milliseconds, which is enough to really make a difference if you've got a speedy site. You can take what feels like a couple of hundred milliseconds and turn it into nothing. STEPH: All I can think of right now is the image of a little mouse that's moving closer to a link with the Jaws' theme song playing. So it's ta-dum ta-dum. [vocalization] And this whole time, Quicklink is getting ready to then load as soon as the mouse reaches that perfect zone to then start loading. That's what I'm getting is Jaws and Quicklink. [laughs] CHRIS: I like the...it's not personification, but it's jawsification that you're doing of this JavaScript library where it's like, I just imagine them hovering on the side really watching intently. But on the sites that I've used it, it does make a noticeable difference. I feel the difference even with very active clicking. STEPH: That sounds really neat. I'll have to look into it. Maybe I think I'm the quickest click in the west. That's very hard to say. And it turns out that I'm actually quite slow, who knows? CHRIS: You might just be average; that's fine. STEPH: No way. CHRIS: Most people are, mathematically speaking at least. [laughter] STEPH: Not possible. I'm certain that I'm special. I hope listeners get a kick out of my oddities, [laughs] my very honest self that's coming through on the mic today. CHRIS: We're all a little special. But pivoting one more time… STEPH: That means no one's special. [laughs] CHRIS: Are you just doing the quote from Incredibles, or are you actually trying to say that? [laughs] STEPH: I wasn't intentionally quoting The Incredibles, but I did just watch that movie recently, and you're totally right. I am quoting The Incredibles. CHRIS: This is our second episode in a row then with a Pixar theme, which is always fun. But pivoting ever so slightly, I think our final pivot for the episode, we have a listener question today. So this question comes in from Matt Swanson, and he is asking about consulting first versus software first. So his question is, "One of the biggest turning points in my career was realizing that software consulting is, well, consulting. Do you think about your work as 'consulting first' or as building great software first and good experience for your clients will follow naturally?" So, Steph, what do you think? STEPH: I liked this question because it really made me stop and think about the differences in how I approach my client work. So I will say that I do think it varies slightly for each client, but most of the time, I do think of my work as first building great software. And then, once I've had time to understand how the team works and then identify opportunities for improvement, then I'll put on my consultant blazer and start scheduling meetings. I'm just kidding. I don't like meetings, so I don't do that part. But I do find that most of my engagements are looking for initially a strong developer to help contribute to the team and mentor. And then, I find that a lot of my consulting skills can then start to shine once I have that opportunity to build trust and then share outsider views with the team and then coach them in other directions. So I do take the approach of building great software first. Although this question really made me pause and think about it because I do think of the consulting and building software as so tightly coupled. It's a little hard for me to define when am I switching from my developer hat over to more of my consulting hat. CHRIS: Yeah, I think my initial reaction to the question was similar where I don't view these as two different modes that I'm fundamentally operating in. It's a continuum, or it's like a two by two grid thing, and I'm sort of moving around between the different spaces, but there's always a little bit of both. And I think if I were to answer the question directly, I would lean towards building great software. That's always the thing that I'm trying to do but often that requires some other more human-centric interactions. So having a difficult discussion around a feature and why we may not reach a deadline that we're going for or talking about ways in which the workflow is not necessarily going as well as it could, and we're ending up losing information along the way or different process things, all of that is a little bit removed from building great software. But at the same time, it's...actually, this is true of me now. I'm not technically a consultant anymore. I've stopped doing that, and I'm now full-time at an organization. And I'm not imagining my role changing fundamentally. I was consulting with them. I've now come on as a full-time employee, and I'm still viewing my work as very much the same thing. Maybe that's because I spent so long consulting that that's sort of the mode that I think of as how I work. But I think yeah, it's not necessarily two different modes. It's definitely a continuum that I'm operating across. STEPH: Yeah, I think that's why for me, it often varies. I like that word that you're using around how it's a continuum and that you're constantly sliding back and forth between one mode and the other. And if I think back to earlier days when I was working specifically with product teams before then, I joined thoughtbot and trying to think, well, what are some of the differences? How would I define what is more of my consulting mode versus then the building great software mode? Although I think the latter does encompass the consulting skills. But thinking back to when I was working on a product team, I found...and this may also just be because I was new in my career. But I found that I often referred to whoever was more senior on the team to handle a lot of those more human-centric topics, as you phrased it earlier. So if there was some communication that we needed to share in regards to why we were delayed on implementing a feature, if we needed to run a retro, if there were some meetings that needed to be scheduled, it always felt something like, oh, this leader of the team is going to take care of that. I am more in the development role, so I will do my job but then defer a lot of that to them. And then since joining thoughtbot with the way that we operate, I feel like I have more ownership in the process, and I want more ownership in the process. I want to be someone that is very aware of what are the specific goals that we're looking to reach? What are the deadlines? What's behind those deadlines that's encouraging us to push hard? And then also understanding how is the team functioning? What's something that we could do to improve the team's efficacy? Is the team happy? Are there areas there that we could improve? So I think for me, that is one of the core parts where I feel like I transitioned from being more focused on development to being more...you know, I don't have a great word for it. I often referred to it as being more of like a product owner. And since then, I feel like I have more ownership around the code that I'm working with and the team, and then the processes and the decisions for the product. But I actually don't have a great word that encompasses that sense of I want to be part of this and help make decisions and look out for everyone else that's around me. Does that resonate with you? Do you have any particular way that you would describe that or a word for it? CHRIS: I don't have a specific word for it. In my mind, this is just how we build software. But I think that that speaks to the culture that we grew up in as software developers. It's so strongly in our minds to think this way. A thing that we've talked about in the past is encouraging software developers to observe the sales demo, to see what it looks like when we're talking to end-users, or, similarly, to sit on customer support calls or listen to user interviews or things like that. And the reason for that is we want...I believe strongly that developers will do better work if they understand the context of the end-user of the application. But I think fundamentally, that sort of loads things up in someone's mind that might encourage them to push back or to suggest a different way of working down the road, and I think that's a good thing. I think every software developer should have some amount of that going on. And so that idea that consulting is this other thing that you sometimes do I feel like that stuff fits under the umbrella of consulting and, therefore, I think it's just part of how we build good software, but maybe it's a nomenclature thing, and I'm just thinking about it wrong. STEPH: Well, I want to pull at that thread a little bit because I was having that internal discussion with myself when I was thinking about this question is in regards to that being more aware of how the other teams are working to then help inform our decisions around the software that we're helping build, and implement advocating for a new process or advocating for how to build great software, is that consulting? I think you and I fall more into the camp of that's just how you build great software is; you have to be part of those decisions to be able to have more insights into the work that's being done. So I don't know if I could even really classify that as a consulting skill. CHRIS: Yeah, that matches my thinking. There is a distinction between consultant and contractor that I'll sometimes push on a little bit where I see consultants as being perhaps a bit more strategic and not necessarily being handed the work to do. I see that perhaps more on the contractor end. It's like, "We need a website built. Here are the specs. Here's the design mock-up. Please build it," and that's that. Versus a consultant being like, "We need a website, but we're not even sure exactly what that means. Can you help us think about the features and prioritize? Do we need a mobile app or not?" And a consultant potentially working more in that space of helping to determine what is the work that we're even going to do. But again, that's a question of like, how do we build good software? We have to answer those questions, and maybe not everyone on the team is always answering those questions. But the more people feel empowered to and feel like they've got the context to be able to make those sorts of at least suggestions around those sort of decisions, I think the better. STEPH: Yeah. I agree with the distinction in regards to being a consultant or a developer versus being a contractor because one definitely feels more removed from that decision or with that team collaboration process where you are more handed work, and then you implement that work, but you don't necessarily ask questions and be like, "Well, what are the benefits of adding this particular feature? Are we tracking to know that we've added the right thing?" those types of things that I would naturally include as part of my work. Versus if you're doing more of the contract work, then maybe you just implement and then don't ask those questions. Thinking back to then, what's different about being a consultant versus then doing development work…and I'm totally sidestepping all the financial stuff here. Like, if you're a consultant, then your world may be very different in terms of how you are acquiring jobs and then your marketing. So I am sidestepping that big conversation there but then focusing more on your day-to-day, how it may be different. And the times that I do feel that I'm wearing more of my lower-casey consulting hat is where I am joining teams that have a very specific goal that they have brought thoughtbot on to help with. So maybe there is a particular certification that they want their software to achieve, or maybe they're looking to level up their team and a particular tech stack, maybe it's Rails, maybe it's testing. And that one feels more focused on I am here to help provide an outsider opinion, to help evaluate your team, to help you provide advice, to communicate more with leadership that's on the team so then they know how things are going. That feels more like a consulting engagement that is less focused on building great software. But I feel like that often still starts with we want that stuff, but we also still want great software. So I always feel like I'm in both, and I really can't be as effective at the consulting part without actually working with the team and understanding the struggles that they're going through. So I still feel like they fit very hand in hand, but I do find that there are certain engagements that do require more external communication versus the others are often more internal with the team that I'm helping build software with. CHRIS: Well, I like that as a framing, the internal versus external communication and sort of the ratio of those. That's an interesting one. STEPH: To me, that's really what then sort of differentiates the consulting versus the just focused on building great software is if I'm doing more external communication, I'm focused less on the building part of the software but more on the guidance part. CHRIS: Yeah, I think that's a really good encapsulation or perhaps a way to differentiate the two ends of this. But I think both you and I probably feel that this just varies project to project. In some cases, we need more of what would fall into the consulting bucket, and other days, it's just nope, we got to go in. We got to implement. We got to build a bunch of features. We've got to get to the MVP launch and whatnot. And that often requires a little bit less on the consulting or the external communication side. But I think it's a case-by-case thing. And it's not that I think of myself as one or the other; it's I'll scale up or down as necessary based on the context of the situation. So I am both, I think. STEPH: Two for one, consulting and building great software. [laughs] CHRIS: One-stop shopping, everything you need. STEPH: So, I do have a couple of examples that I can provide that may provide some insight as to how we view consulting a little differently than necessarily focusing on implementation. I feel that I'm still reaching for that separation between consulting and developing. So I'm going to focus on the external communication and the implementation. I feel like those are the two areas that are trying to be divided in this particular question. But I do have some examples from thoughtbot discussions around consulting. So every so often, we get together at thoughtbot, and we have these internal discussions where we talk about the different consulting challenges that we have faced. And it's a really nice time where we get together, and we may discuss ongoing active consulting challenges and questions that we have, or it may be scenarios that have happened in the past. And so then we present that scenario to groups, and then we break off into smaller groups, and then everybody has an opportunity to talk through how they would react, what advice they would give, how they would approach it. And I have found those sessions to be incredibly helpful, but I think it could be fun to share some of those examples. Folks can think about them as to how they would react to them. But I think this helps highlight why those consulting skills and then also building great software are so tightly coupled together. So this first example focuses on building MVPs. So let's say that you're working with a client, and you've been focused on building an MVP, and the engagement is coming to a close in a few weeks. But the client is disappointed that there is a particular feature that they're really excited about that's not being included in the MVP, and they'd really like to know why that particular feature was cut. And they are worried that that will actually cause the business to fail if they don't have that feature in the MVP. So that's something that often comes up when we are focused on scoping MVPs to make sure that we are aligned with the client team to understand what is very important for the MVP and what can be a fast follow. And that can be a thorny one, especially if someone feels emotionally attached to a feature that is something that can be tricky to navigate. And how do you help the team reach a consensus that this feature really does need to be in the MVP, or it's okay that it doesn't need to go out now, and it can be in a future iteration? And for another example, this one is more focused on communicating the progress of particular work and how it's going. So you can imagine this scenario coming from the client saying that they have been working with you for a few weeks and you've made good progress, but it feels like the last week things have stalled. And they don't understand why a particular feature is taking longer than expected to ship. And they haven't had any communication from the team regarding what's taking that feature a longer time to get out. So, again, these are just some scenarios that you can think through and imagine how then you would respond or handle each of these situations. But I think both of those are really great examples that focus on the more consulting aspect of our work and then when we need to have more external communication with teams, so then they feel confident that we are developing great software. CHRIS: I think this is the first time that I've observed us giving homework to the listeners. But I think one thing that I'll highlight is we are talking about this in the context of consulting or being a consultant. But I think both of those examples that you gave, and more generally, most of these sort of conversations, actually apply pretty equally to working within an organization as an employee. You're still working on projects. You still have deadlines. You still need to ship things. You maybe aren't shipping as quickly as you need to; that maybe needs to get communicated to both internally within your team and externally within your larger organization. So yeah, I think these are broadly applicable, and I think, yeah, rolling them around in your head, let us know if you come up with any great solutions. STEPH: And if folks are interested in these types of scenarios, then I'm happy to share some more of them. I could share them on Twitter or anywhere else that folks find helpful. But I really like that nuance where I feel like is a nuanced discussion between building some great software and then those consulting skills. So thanks, Matt, for submitting such a great question. CHRIS: And as an aside, just to give a little more context on Matt, he runs a blog called the Boring Rails, which,, if you are not following it, it is a wonderful, straightforward summary of small, useful tidbits of information in the Rails world that are boring, but that's part of what we love about Rails. So I highly recommend that as well, and we'll include a link in the show notes. But yeah, thank you so much, Matt. And on that note, shall we wrap up? STEPH: Let's wrap up. Show notes for this episode can be found at bikeshed.fm. CHRIS: This show is produced and edited by Mandy Moore. STEPH: If you enjoyed listening, one really easy way to support the show is to leave us a quick rating or a review in iTunes as it helps other people find the show. CHRIS: If you have any feedback for this or any of our other episodes, you can reach us @_bikeshed on Twitter. And I'm @christoomey. STEPH: And I'm @SViccari. CHRIS: Or you can email us at hosts@bikeshed.fm. STEPH: Thanks so much for listening to The Bike Shed, and we'll see you next week. All: Bye. Announcer: This podcast was brought to you by thoughtbot. thoughtbot is your expert design and development partner. Let's make your product and team a success.
PHP Internals News: Episode 88: Pure Intersection Types London, UK Thursday, June 10th 2021, 09:16 BST In this episode of "PHP Internals News" I talk with George Peter Banyard (Website, Twitter, GitHub, GitLab) about the "Pure Intersection Types" RFC that he has proposed. The RSS feed for this podcast is https://derickrethans.nl/feed-phpinternalsnews.xml, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news Transcript Derick Rethans 0:14 Welcome to PHP internals news, a podcast dedicated to explaining the latest developments in the PHP language. This is Episode 88. Today I'm talking with George Peter Banyard about pure intersection types. George, could you please introduce yourself? George Peter Banyard 0:30 Hello, my name is George Peter Banyard. I work on PHP code development in my free time. And on the PHP Docs. Derick Rethans 0:36 This RFC is about intersection types. What are intersection types? George Peter Banyard 0:40 I think the easiest way to explain intersection types is to use something which we already have, which are union types. So union types tells you I want X or Y, whereas intersection types tell you that I want X and Y to be true at the same time. The easiest example I can come up with is a traversable that you want to be countable as well. So traversable and countable. Currently, you can do intersection types in very hacky ways. So you can either create a new interface which extends both traversable and countable, but then all the classes that you want to be using this fashion, you need to make them implement the interface, which might not be possible if you using a library or other things like that. The other very hacky way of doing it is using reference and typed properties. You assign two typed properties by reference, one being traversable, one being countable, and then your actual property, you type alias reference it, with both of these properties. And then my PHP will check: does the property respect type A those reference? If yes, move to the next one. It doesn't respect type B, which basically gives you intersection types. Derick Rethans 1:44 Yeah, I saw that in the RFC. And I was wondering like, well, people actually do that? George Peter Banyard 1:49 The only reason I know that is because of Nikita's slide. Derick Rethans 1:51 The thing is, if it is possible, people will do it, right. And that's how that works. George Peter Banyard 1:56 Yeah, most of the times. Derick Rethans 1:57 The RFC isn't actually called intersection types. It's called pure intersection types. What does the word pure do here? George Peter Banyard 2:05 So the word pure here is not very semantic. But it's more that you cannot mix union types and intersection types together. The reasons for it are mostly technical. One reason is how do you mix and match intersection types and union types? One way is to have like union types take precedence over intersection types, but some people don't like that and want to explicit it grouping all the time. So you need to do parentheses, A intersection B, close parentheses, pipe for the union, and then the other type. But I think the main reason is mostly the variance, like the variance checks for inheritance are already kind of complicated and kind of mind boggling. Derick Rethans 2:44 I'm sure we'll get into the variance rules in a moment. What is it actually what you're proposing to add here. What is the syntax, for example? George Peter Banyard 2:52 So the syntax is any class type with an ampersand, and any other class type gives you an intersection type, which is the usual way of doing and. Derick Rethans 3:01 When you say class types, do you also mean interfaces? George Peter Banyard 3:04 Yes, PHP has a concept of class types, which are mostly any class in any interface. There's also a weird exception where parent and self are considered class types, but those are not allowed. Derick Rethans 3:20 Okay, so it's just the classes that you've defined and the class that are part of the language but not a special keywords, self and parent and static, I suppose? George Peter Banyard 3:28 Yes, the reason for that is standard types are not allowed to be part of an intersection, because nothing can be an integer and a string at the same time. Now, there are some of the built in types, which can be kind of true. You could have a callable, which is a string, because callables can be arrays, or can be a closure. But that's like very weird and not very great. The other one is iterable. If when you expand that out, you get redundant types, which we can talk about later. And the final thing is parent, self, and static, just makes for some very weird design questions, in my opinion, like, if you ask for something to be an intersection with itself, you basically can only enforce conditions on subclasses. You have a class and you say: Oh, I want it to return self, but also be countable for some reason, but I'm not countable. So if you extend me, then you need to be countable, but I'm not. So it's very weird. parent has kind of the very same weird semantics where you can ask a parent, but it's like, if the base class doesn't support it, and you ask for a parent to be an intersection, then you basically need the child to implement the interface and then a child to return the first child. If you do that main question. Why? Because I don't see any good reasons to do it. And it just makes everything harder. Derick Rethans 4:40 You've only added for the sake of completeness instead of it being useful. Let's move on birds. You've mentioned which types are supported, which is class names and interface names. You already hinted a little bit at redundant types. What are redundant types? George Peter Banyard 4:56 Currently, PHP already does that with union types. If you repeat the type twice in a union, you'll get a compile error. This only affects compiled time known aliases. If you use a use statement, then PHP knows that you basically using the same type. However you use a runtime alias, then it can't detect that. Derick Rethans 5:13 A runtime alias, what's that? George Peter Banyard 5:15 So if you use the function class_alias. Derick Rethans 5:16 It's new to me! George Peter Banyard 5:18 it technically exists. It also doesn't guarantee basically that the type is minimal, because it can only see those was in its own file. For example, if you say I want A and B, but B is a child class of A, then the intersection basically resolves to only B. But you can only know that at runtime if classes are defined in different files. So the type isn't minimal. But if you do redundant types, basically, it's a easy way to check if you might be typing a bug. Derick Rethans 5:46 You try to do your best to warn people about that. But you never know for certain. George Peter Banyard 5:51 You never know for certain because PHP doesn't compile everything into like one big program like in check. Static analyser can help for that. Derick Rethans 5:59 Let's talk a little bit about technical aspects, because I recommend that implementing intersection types are quite different from implementing union types. What kind of hacks that you have to make in a parser and compiler for this? George Peter Banyard 6:11 Our parser has being very weird. The parsing syntax should be the same as union types. So I just copy pasted what Nikita did. I tried it. It worked for return types without an issue. It didn't work with argument types, because bison, which is the tool which generates our parser, was giving a shift reduce conflict, which basically tells: Oh, I got two possible states I can go in, and I don't know which branch I need to go, because the PHP parser only does one look ahead. Because it was conflicting, the ampersand, either for the intersection type or for to mark a reference. Normally, if the paster is more developed, or does more look ahead, it is not a conflict. And it shouldn't be. Ilia managed to came up with this ingenious idea, which is just redefine the ampersand token twice and have very complicated names, and just use them in different contexts. And bison just: now I have no issue. It is the same token, it is the same character. Now that you have two different tokens it manages to disambiguate, like it's shift produce. So that's a very weird. Derick Rethans 7:17 I'll have a look at what that actually does, because I'm curious now myself. Beyond the parser, I think the biggest and most complicated part of this is implementing the variance rules for these intersection types. Can you give a short summary of what a variance rules are, and potentially how you've actually implemented them? George Peter Banyard 7:38 Since PHP seven point four, return types and up covariant, and parameter types are contravariant. Covariant means you can like restrict, we can be more specific. And contravariance means you can be broader or like more generic. Union types already gives some interesting covariance implications. Usually, you would think, well, a union is always broader than a single type, you say: Oh, I want either a traversable or accountable, it seems that you're expanding the type sphere. However, a single type can have as a subtype, a union type. For example, you say,:Oh, my base type is a Class A, and I have two child classes, which are B and C. I can type covariantly that I want either B or C, because B or C is more specific than just A. That's what union types over there allows you to do. And the way how it's implemented. And how to check for that is you traverse the list of child types, and check that the child type is an instance of at least one of the parents types. An intersection by virtue of you adding constraints on the type itself will always be more specific than just a single type. If you say: Oh, I want a class A, then more specifically, so I want something of class A and I want it to be countable. So you're already restrict this, which gives some very interesting implications, meaning that a child type can have more types attached to itself than a parent type. That's mostly due how PHP implements its type system, to make the distinctions, basically, I've added the flag, which is either this is a union, meaning that you need to check it is part of one, or it's an intersection. The thing with intersection types is that you need to reverse the order in how you check the types. So you basically need to check that the parent is at least an instance of one of the child types, but not that none of the child types is a super type of the parent type. Let's say you have class C, which extends Class B and Class B extends Class A. If I say let's say my base type is B to any function, and I give something which is a intersection T, any interface, this would not be a valid subtyping relation to underneath B. Because if you looked it was a Venn diagram in some sense, you've got A which is this massive sphere, you've got B which is inside it, and C which is inside it. A intersection something intersects the whole of A with something else, which might also intersect with B in a subset, but it is wider than just B, which means like the whole variance is very complicated in how you check it because you can't really reuse the same loop. Derick Rethans 10:13 I can't imagine how much more complicated this gets when you have both intersection and union types in the same return type or parameter argument type. George Peter Banyard 10:22 One of the primary reasons why it's currently not in the RFC, because it is already mind boggling. And although I think it shouldn't be that hard to like, add support for it down the line, because I've already split it mostly up so it should be easy to check: Oh, is this an intersection? Is this a union? And then you need to branch. Derick Rethans 10:42 Luckily because standard types aren't included here, you also don't really have to think about coercive mode and strict mode for these types. Because that's simply not a thing. George Peter Banyard 10:50 That's very convenient. Derick Rethans 10:52 Is the future scope to this RFC? George Peter Banyard 10:54 The obvious future scope is what I call composite types, is you have unions and intersections available in the same type. The main issue is mostly variance, because it's already complicated, adding more scope to it, it's going to make the variance go even harder. I think with most programming languages, the variance code is always complicated to read. While I was researching some of it, I managed to hit a couple of failures, which where with I think was Julia and the research paper I was it was just like focusing on a specific subset. And like, basically proving that it is correct. It's not a very big field. Professors at Imperial, which I've talked to, have been kind of helpful with giving some pointers. They mostly work with basically proper languages or compiled languages, which have this whole other set of implications. Apparently, they have like a bunch of issues about how you normalize the types like in an economical form, to make it easier to check. Which is probably one of the problems that will need to be addressed, when you get like such a intersection and union type. First, you normalize it to some canonical form, and then you work with it. But then the second issue is like how do you want the composite types to actually be? Is it oh, you have got parentheses when you want to mix and match? Or can you use like union precedence? I've heard both opinions. Basically, some people are very dead against using Union as a precedent. Derick Rethans 12:14 My question is going to be, is this actually something people would use a lot? George Peter Banyard 12:21 I don't think it would be used a ton. The moment you want to use it, it is very useful. One example is with the PSRs, the HTTP interfaces. Or if you want the link interface. Combining these multiple things gets it convenient. One of the reasons why I personally wanted as well, it's for streams. So currently, streams don't have any interface, don't have any classes. PHP basically internally checks when you call like certain string methods. For example, if you try to seek and you provide a user stream, it basically checks if you implement a seek method, which should be an interface. But you can't currently do that. Ideally, you would want to stream maybe like a base class, instead of having like a seekable stream, and rewindabe stream, or things like that. You basically just have interfaces. And then like if somebody wants a specific type of stream, just like a stream, which is seekable, which is rewindable. And other things. We already have that in SPL because there's an iterator. And we have a seekable iterator interface, which basically just ask: Oh, this is there's a seek method. I think it depends how you program. So if you separate the many things into interfaces, then you'll probably use intersections types a lot. If you use a maybe a more traditional PHP code base, which uses union types a lot. Union types are like going to be easier. And you want to reduce that. Derick Rethans 13:32 Would you think that lots of people already use union types because it's pretty new as well. Isn't it? George Peter Banyard 13:38 Union types are being implemented in various different libraries. PSRs are updating the interfaces to use union types. One use case, I also have a special method, which was taken the date, it takes a union of like a DateTime interface, a string or an integer. Although intersections types are really new, you hear people when union types were being introduced, you heard people saying, I would promote bad cleaning habits, you shouldn't have one specific type. And if you're using a union, you have a design issue. And I had many people complaining to me why and intersection types of see? Why they haven't intersection types being introduced first, because intersection types are more useful. But then you see other people telling us like, I don't see the point in intersection types. Why would you use an intersection type, just use your concrete class, because that's what you're going to type anyway. Derick Rethans 14:21 I can give you a reason why union types have implemented first, over intersection types, I think, which is that it's easier to implement. George Peter Banyard 14:28 It's easier to implement. And it's more useful for PHP as a whole, because PHP functions accepts a union or return a union. Functions return false for error states instead of null. It makes sense why union types were introduced first, because they are mostly more useful within the scope of what PHP does. Derick Rethans 14:46 Do you think you have anything else to add about intersection types? At the moment, it's already up for voting, when is that supposed to end? George Peter Banyard 14:54 So the vote is meant to end on the 17th of June. Derick Rethans 14:57 At the moment I see there's 15 votes for and two against so it's looking good. What's been your most pushback on this? If there was any at all? George Peter Banyard 15:05 Mostly: I don't see the point in it. However, I do think proper reasons why you don't want it, compared to like some other features where it's more like have thoughts on what you think design wise. But it is undeniable that you you add complexity to the variance. And to the variance check. It is already kind of complicated. I have like a hard time reading it initially. There's the whole parser hackery thing, which is kind of not great. It's probably just because we use like a restricted parser because it's faster and more efficient. Derick Rethans 15:36 I think I spoke with Nikita about parsers some time ago and what the difference between them were. If I remember which episode it was all the to the show notes. George Peter Banyard 15:44 And I think the last reason against it is that it only accepts pure intersections. You could argue that, well, if you're adding intersections, you should add the whole feature set. It might impact the implementation of type aliases, because if you type alias T to be a union of A and B, and then you use type T in an intersection, you basically get a mixture of unions and intersections, that you need to be able to work with. The crux of this whole feature is the variance implementation. And being able to rationalize the variance implementation and been to extend it, I think it's the hardest bit. Derick Rethans 16:18 I guess the next thing still missing would be type aliases, right? Like names for types, which you can't define just yet, which I think you also mentioned in the RFC is future scope. George Peter Banyard 16:29 Yeah. Derick Rethans 16:30 Thank you, George, for taking the time today to talk to me about pure intersection types. George Peter Banyard 16:36 Thanks for having me on the show. Derick Rethans 16:41 Thank you for listening to this installment of PHP internals news, the podcast dedicated to demystifying the development of the PHP language. I maintain a Patreon account for supporters of this podcast as well as the Xdebug debugging tool. You can sign up for Patreon at https://drck.me/patreon. If you have comments or suggestions, feel free to email them to derick@phpinternals.news. Thank you for listening and I'll see you next time. Show Notes RFC: Pure Intersectio Types Episode #66: Namespace Token, and Parsing PHP GLR Parser LALR(1) Parser Iter Library Credits Music: Chipper Doodle v2 — Kevin MacLeod (incompetech.com) — Creative Commons: By Attribution 3.0
Подкаст RadioDotNet выпуск №29 Сайт подкаста: radio.dotnet.ru Темы: [00:01:48] — Awesome Russian IT github.com/unchase/awesome-russian-it discoverdot.net [00:04:25] — ASP.NET Core Development Sprints github.com/dotnet/aspnetcore/wiki/ASP.NET-Core-De... [00:08:50] — DateOnly and TimeOnly structures infoq.com/news/Net6-Date-Time [00:15:48] — ASP.NET Core 6 and Authentication Servers devblogs.microsoft.com/aspnet/asp-net-core-6-and-authenticati... [00:19:23] — Nullable Reference types in C# – Best practices dotnetcurry.com/csharp/nullable-reference-types-csharp [00:39:44] — Best Practices to avoiding Performance Problems michaelscodingspot.com/performance-problems-in-csharp-dotnet blog.jetbrains.com/dotnet/unusual-ways-of-boosting-up-app... [01:06:23] — Performance best practices in C# medium.com/@kevingosse/performance-best-practices... [01:14:41] — .NET Performance Optimisations Don't Have to be Complex stevejgordon.co.uk/dotnet-performance-optimisations-dont-... [01:18:41] — Quiz about .NET memory management tooslowexception.com/net-quiz-check-your-level-of-knowledge... [01:22:02] — Подслушано devzen.ru/episode-0334 podlodka.io/204 Фоновая музыка: Максим Аршинов «Pensive yeti.0.1»
PHP Internals News: Episode 85: Add IntlDatePatternGenerator London, UK Thursday, May 20th 2021, 09:13 BST In this episode of "PHP Internals News" I discuss the Add IntlDatePatternGenerator RFC with Mel Dafert (GitHub). The RSS feed for this podcast is https://derickrethans.nl/feed-phpinternalsnews.xml, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news Transcript Derick Rethans 0:14 Hi I'm Derick, welcome to PHP internals news, the podcast, dedicated to explain the latest developments in the PHP language. This is episode 85. Today I'm talking with Mel Dafert about the "Add Intl Date Pattern Generator RFC" that she's proposing for inclusion into PHP 8.1. Mel would you please introduce yourself? Mel Dafert 0:35 Hello, I am Mel. I've been working professionally with PHP for about three years. Recently I started reading the internals mailing list in my free time, but this is my first time contributing. Derick Rethans 0:46 What made you think starting to read the PHP internals mailing list? Mel Dafert 0:50 I generally like reading mailing lists and issue trackers. And since I work with PHP, it was interesting to read what's, what's happening. Derick Rethans 1:02 That's what I'm trying to read this podcast as well of course; explaining what happens in the PHP development. But let's get to your RFC. What is the problem that you're trying to solve for this? Mel Dafert 1:14 Currently, PHP exposes the ability for locale dependent date formatting with the Intl Date Formatter class. It is basically only three options for the format: long, medium and short. These options are not flexible enough in some cases, however. For example, the most common German format is day dot numerical month, dot long version of the year. However, neither the medium nor the short version provide this, and they use either the long version of the month, or a short version of the year, neither of which were acceptable in my situation. Derick Rethans 1:47 I realize that you basically ran into a problem that PHP wasn't doing something you wanted to do it. But what made you actually wanting to contribute this? Mel Dafert 1:57 I ran into this exact problem at work where I wanted to format dates in this specific way. After some research, I found out that ICU, the library that powers Intl Date Formatter, exposes exactly this functionality already. It would be relatively easy to wire this up into PHP and expose it there as well. I also found in a bug report that other people had this problem as well, so I decided to try my best at hacking at the PHP source and make it available to everyone, using PHP. Derick Rethans 2:25 Had you ever seen a PHP source code before? Mel Dafert 2:28 I don't think so. No. Derick Rethans 2:29 But you are familiar with C a little bit? Mel Dafert 2:32 On a very basic level, yes. Derick Rethans 2:34 As part of this RFC What are you trying to suggest to add to PHP? Mel Dafert 2:39 ICU exposes a class called date time pattern generator, which you can pass a locale and so called skeleton and it generates the correct formatting pattern for you. Skeleton just includes which part are supposed to include it, to be included in the pattern, for example the numerical date, numerical month, and the long year, and this will generate exactly the pattern I wanted earlier. It is also a lot more flexible, for example the skeleton can also just consist of the month and the year, which was also not possible so far. I am proposing to add a Intl Date Pattern Generator class to PHP, which can be constructed for locale, and exposes the get best pattern method that generates a pattern from a skeleton for that locale. Derick Rethans 3:22 The skeletons, what do you specify in these skeletons? Mel Dafert 3:27 It's a similar format to the pattern itself. For example, it's lowercase y lowercase y uppercase M uppercase M, would give you only the year and only the month, if I'm correct, that's exactly what the skeleton looks like. Derick Rethans 3:43 But it puts it in the right order? Mel Dafert 3:45 It puts it in in the right order, and in some cases also adds extra characters, or even changes the format slightly, depending on the locale. Derick Rethans 3:55 So it is a bit of a flexible way to tell the Intl extension to format them in a slightly more, well how do you say this, a slightly more intelligent way than what the standard, long, short and medium constants do for you. Mel Dafert 4:11 Exactly. Derick Rethans 4:12 Why is it so important that you get these formats, right, or rather I should say, how do these locales influence formats and why is this important? Mel Dafert 4:21 There are conventions of how to format dates and times vary rather strongly between languages and country. In Austria, for example, nobody would expect to understand the US format of month slash day last year. I assume people in England may have the same issue. Derick Rethans 4:38 I think everybody has that issue except for people in the US. Mel Dafert 4:42 But that only shows the importance of using a format that people are used to and understand. Other languages like mainland Chinese even have the words for day and month included in the format, as far as I understand. I don't speak Chinese. Derick Rethans 4:59 Neither do I, but a long time ago when I, when I added the date time support, not Intl, but PHP standard date time support, I also looked at locales that operating systems have. And even these locales, which is not something that Intl uses now, also encode these extra characters at least for Japanese, so that was interesting to see there as well. Mel Dafert 5:22 There is a lot of sometimes somewhat unexpected formats. Derick Rethans 5:27 And I think German sometimes once the add the in front, and sometimes behind and things like that. I know there's lots of little intricacies, yes. I see that he RFC makes an argument about which name to pick for the new class. Can you elaborate on the two different options that are? Mel Dafert 5:44 Yes, this is certainly for us and what I would call bike shedding. ICU has something of an inconsistency in its naming. The formatting class is called date formatter. And the pattern generator class is called Date Time pattern generator. Derick Rethans 6:00 So it has the extra word time in it? Mel Dafert 6:03 Between some inconsistency with Intl Date Formatter, which already exists in PHP, and the Intl Date Time pattern generator, or if we make sure PHP is internally consistent and omit the time in all cases. So far consensus seems to lean towards the second option. This is also what the Hack people decided to use. Derick Rethans 6:24 And I believe that's the one you are wanting to go with in this RFCs as well, right? Mel Dafert 6:28 Exactly. So far, everybody voted slide, or like express themselves to slightly favour the version without time. So that's the one I'm going with. Derick Rethans 6:40 Of course, as you mentioned, this is a fairly small change to it, but the RFC talks a bit about things to add in the future, because I believe you weren't suggesting to add all of these Intl functionality straightaway. What is this future scope? Mel Dafert 6:55 ICU would also expose more methods around the skeletons, for example, turning a pattern back into its skeleton, or building a list of skeleton and then mapping to the patterns from scratch. That's what you would do in theory if you added your own special locale to this. Derick Rethans 7:17 I'm not sure how to do that with PHP actually, but I think ICU allows you to build your own basically files with settings right? Mel Dafert 7:25 Exactly. This is omitted all of this, for simplicity, and because they couldn't think of a use case for it, personally, at least. If someone does need them, they could easily be added. It would just be a bunch of extra methods on the, on the class. Derick Rethans 7:43 I know that ICU has so much functionality that hasn't been exposed to PHP, because there's just so much of it right? Mel Dafert 7:50 Extremely, yes. I did see that Hack decided to expose all of them, like all the methods that the class has, but I really don't see the use of having to document and test all of these methods when really only one is going to be used. So I've decided to just go for the one that I can actually see people using. Derick Rethans 8:14 And it is always easy to get smaller parts added to PHP than big things, to begin with. Mel Dafert 8:21 Exactly. Derick Rethans 8:22 How has the reception been so far? Mel Dafert 8:24 I haven't gotten feedback from too many people, but it seems positive so far. A few people that did give some feedback were constructive and seem to seem to like the idea of adding this. Derick Rethans 8:36 I reckon outside of English speaking countries this is quite an important thing to actually support, especially as we just discussed, people are picky about how these things are formatted. Mel Dafert 8:46 Very picky. Derick Rethans 8:48 So the name that you're going for would be Intl Date Pattern Generator, would it also support patterns for the time itself? Mel Dafert 8:55 Of course, just like Intl Date Format also support formatting time. Derick Rethans 9:02 It would be strange if it didn't, to be honest. Mel Dafert 9:04 Yeah. Derick Rethans 9:05 When do you think you're going to put us up for a vote for inclusion to PHP 8.1? Mel Dafert 9:10 I think I sent out the first email about two weeks ago for opening the discussion. So I was planning to send out the heads up, either today or tomorrow, and opening the vote after that. Derick Rethans 9:23 Okay. To be fair, I think there is very little controversy in this one, so it would surprise me if it didn't pass. Mel Dafert 9:30 That's reassuring. I am somewhat anxious about them. Derick Rethans 9:33 It's not controversial, it is an, it is perhaps a niche thing but it is something that is useful, so I can't see people really be opposing to this. To be fair, I think it looks like just an omission from when the Intl extension was written in the first place. Mel Dafert 9:48 That's true. It might have not been supported in ICU at that point. Derick Rethans 9:54 That is a good point as well because I think the Intl extension came with PHP five three, or five four, which I think is now eight years ago or something like that. Mel Dafert 10:04 I think, I think ICU might have not had it at the end. It's an old word, like it's an all supported versions of PHP. Derick Rethans 10:13 That is good to know. Would you have anything else to add? Mel Dafert 10:16 No, I think that's it. Derick Rethans 10:17 Thank you for taking the time today to talk to me about your proposal to add the Intl date pattern generator to PHP 8.1 Mel Dafert 10:25 Of course. Thank you for having me. Derick Rethans 10:29 Thank you for listening to this installment of PHP internals news, a podcast dedicated to demystifying the development of the PHP language. I maintain a Patreon account for supporters of this podcast as well as the Xdebug debugging tool, you can sign up for Patreon at https://drck.me/patreon. If you have comments or suggestions, feel free to email them to derick@phpinternals.news. Thank you for listening and I'll see you next time. Show Notes RFC: Add IntlDatePatternGenerator Credits Music: Chipper Doodle v2 — Kevin MacLeod (incompetech.com) — Creative Commons: By Attribution 3.0
Happy Day Palace GANG! Kings & Queens! You asked and now you shall receive. Another story time - Date Edition. Lol.
There is an expiration date on everything! Statistically, there is a 100% probability you will die, you will pass on from this life! What have you done to prepare? You need to be ready for when that day inevitably comes! Pastor Rob takes a look at the story of the man who is born blind in John 9 and had his life changed in an encounter with Jesus. He reminds us how easy it is to look at everything around us and blame our situation or the people around us instead of focusing on the important facts at hand...JESUS CHANGES EVERYTHING! Lean in, look at the expiration date on your life and see what you can do to change your eternal destination!
PHP Internals News: Episode 79: New in Initialisers London, UK Thursday, March 25th 2021, 09:07 GMT In this episode of "PHP Internals News" I chat with Nikita Popov (Twitter, GitHub, Website) about the "New in Initialisers" RFC. The RSS feed for this podcast is https://derickrethans.nl/feed-phpinternalsnews.xml, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news Transcript Derick Rethans 0:14 Hi, I'm Derick. Welcome to PHP internals news, a podcast dedicated to explain the latest developments in the PHP language. As you might have noticed, the podcasts are currently not coming out once every week, as there are not enough RFCs being submitted for weekly episodes. I suspect that this will change soon again. This is episode 79. In this episode, I speak with Nikita Popov, about a few more language additions that he's proposing. Nikita, how are you doing today? Nikita Popov 0:43 I'm doing well, Derick, how are you doing? Derick Rethans 0:45 I'm pretty good as though, I always much happier when it's sunny outside. Nikita Popov 0:48 Yeah, for us to weather also turned today. Yesterday it was still cold. Derick Rethans 0:53 We're here to talk about a few RFCs. The first one, titled "New in Initializers". What is this RFC about? Nikita Popov 1:00 The context is that PHP has basically two types of expressions: ones, the ones used on normal code, and the other one in a couple of special places. These special places include parameter default values, property default values, constants, static variable defaults, and finally attribute arguments. These don't accept arbitrary expressions but only a certain subset. So we call those usually constant expressions, even though they are not maybe constant in the most technical sense. The differences really that these are evaluated separately so they don't run on the normal PHP virtual machine. There is a separate evaluator that basically evaluates an abstract syntax tree directly. They are just like, have different technical underpinnings. Derick Rethans 1:49 Because it is possible to for example, define a default value to seven plus 12? Nikita Popov 1:54 Exactly. It's possible to define it to seven plus 12, but maybe not to seven plus variable A, or seven plus some function call or something like that. Derick Rethans 2:03 I guess the RFC is about changing this so that you can do things like this. What are you proposing to add? Nikita Popov 2:09 Yes, exactly. So my addition is a very small one, actually. I'm only allowing a single new thing and that's using new, so you can use new, whatever, as a parameter default, property default, and so on. Derick Rethans 2:23 In this new call, pretty much a constructor call for a class of course, can arguments to be dynamic, or do they need to be constant as well? Nikita Popov 2:33 Rules are always recursive, so you can like pass arguments to your constructor, but they also have to follow the usual rules. So again, they also have to be constant expressions, or after this RFC, they can also include new, but they cannot include variable references and so on. Derick Rethans 2:50 Is this something that is being defined at the grammar level or somewhere else? Nikita Popov 2:55 We actually used to define that at the grammar level back in PHP five, but nowadays we just accept all expressions, and then we print you a bit nicer error message if it turns out it's not supported in this context. Derick Rethans 3:08 And that happens when the AST is created. Nikita Popov 3:10 Yeah, exactly. Derick Rethans 3:11 The new syntax additions is to allow new in default values in places. The RFC talks a little bit about the evaluation order, and what is this and why is is important. Nikita Popov 3:23 This is really the critical part. Right now, the kinds of things you can use in constant expressions are well as the name says, these can supposed to be constant, and not dynamic. This is not entirely true because, for example, you can like reference a class constant and referencing a class means that you call an autoloader. And that can run arbitrary code. Or you can trigger a notice that triggers an error handler and that also runs arbitrary code, like more like at the design level at the conceptual level, these really are constant expressions that are not supposed to have any side effects. Allowing new changes that in the big way, because new calls constructors and constructors can do whatever they want. I think it would be unusual to print out a string in the constructor, but some people might want to create a database connection there. The question of where exactly these expressions get evaluated becomes more important now, so we have to think about that a bit more carefully. Previously this was never really formally specified, how the evaluation works. There are some cases where it's pretty clear cut, for example, parameter default value of course gets evaluated when you call the function, and that parameter hasn't been passed. Similarly if you define a global constant, then the value is evaluated when you define the constant. And then there are the problematic cases, that I'm actually still not sure what to do about. The problematic cases are class constants, and static properties. Because the way these work right now is that they are evaluated lazily, so when you declare the class, they are not evaluated, and then later if you use the class, at least most uses of the class, they will be evaluated. Derick Rethans 5:07 It would happened when you're done instantiate the class? Nikita Popov 5:09 For example, yes. If you instantiate the class, if you add a static property and so on. But for example, not if you extend the class. In cases that like might potentially meet the evaluated initializers. The problem here is that, um, of course, if now your expressions can have side effects, then it's not great if you don't have like hard guarantee when it's actually going to be evaluated. On the other hand, what I actually implemented already, but I'm not sure it's a good idea is to change it to evaluate the expressions equally, so when you declare the class, we immediately evaluate all the static properties and constants. Derick Rethans 5:47 I think I found a problem with that as well. For example, if one of the default values is doing new DateTime for example, if you rely on that happening when you instantiate the object, you will get a different time than when you declare a class. Nikita Popov 6:01 I probably should have mentioned that explicitly. So when it comes to properties we'll always evaluate when you create the object. If you do a new DateTime then you will always get a new DateTime for each object, otherwise it wouldn't really make sense. The problem with the, with evaluation order for the static properties is, that if we evaluate immediately when they declare the class, then we can run into issues with dependencies. If you're using auto loading it's usually not a problem, but if you like declare classes manually, then you might have one class on using a constant from a class that you declare later on. Right now, that works fine, because the initializers are evaluated lazily, but if we evaluate them immediately then this is going to throw a fatal error because it says okay the class hasn't been declared yet. That's a backwards compatibility break, and there are also some other issues, for example with preloading, where it's not really clear when exactly we should be evaluating things in that context. So this is a point I'm undecided on, when things should evaluate. If we should stick with the current lazy evaluation or make it easier or possibly just limit the RFC, to not allow new inside static properties and class constants, because, at least for me personally, those are not the main use case. The three things that seem most important to me are parameter default, property default, I mean non static property default, and usage in attribute arguments. Derick Rethans 7:29 When I was reading the RFC, I was realizing that if a constructor throws an exception, for example if it's a default argument to a method, then what would happen? Would the method fail, or, or would the method call fail or something else? Nikita Popov 7:45 It would behave basically the same way as if you initialize the method argument, inside the method, you could do like you would do right now like with a null check maybe. So you would just get an exception thrown inside the method, and it would fail. Derick Rethans 8:01 And is that the same if you would use it as the new new syntax as a default value to have constructor arguments as well? Nikita Popov 8:09 Yeah, I think there's a situation would be the same, the one special case is if you use it as a property default, and then the instantiation fails, then we treat this basically the same way as the constructor having failed, which is a special situation, a slightly special situation, because we will also not call the destructor in that case. So we say that the object has been incompletely constructed so it will not get destructed. Derick Rethans 8:38 And of course if this is a standard class property, then this happens on instantiation of the class. How would this work if it would be for a static property? Nikita Popov 8:50 For a static property, well that, that depends again on the whole question of evaluation order. So for example the way things work right now, like without this proposal, is for example if you have a static property and you're referencing it constant that doesn't exist. Then, when you try to use the class you get an exception that okay undefined constant whatever. If you try to use it again, you still get the same exception, so you get this exception every time you use a class. This is what would happen on this case as well. Derick Rethans 9:24 So it wouldn't happen on class declaration, but when you start using it? Nikita Popov 9:29 Depending on where we evaluate. Either only on use or the first time on declaration and then afterwards in each use. If you still try to use it despite the declaration having failed, which is an odd thing to do but you would have to counter it somehow. Derick Rethans 9:45 You know, if it is possible to do people will find a way how to do it. Nikita Popov 9:48 Yes, certainly. Derick Rethans 9:49 Can you talk a little bit about recursion protection as well because the RFC talks about that? Nikita Popov 9:54 Well that's another edge case. So if you create an, have an, for example Class A with a property that has an initializer new A. That means when you create an object of class A, and try to initialize it you have to create another object, and then another object, and another, and we have to detect that situation, or we do detect that situation and for nice exception instead of, resulting in a stack overflow. Derick Rethans 10:20 Which is beneficial. Nikita Popov 10:21 Yes, because most people do not know what to do when people went PHP throws a segmentation fault, so they do prefer exceptions, usually. Derick Rethans 10:30 I would too. The RC also talks about, there are some issues around traits which I didn't quite fully understand, would you mind explaining that to me? Nikita Popov 10:38 The issue here is that traits can have properties and or rules. A rule is that if you have two traits, used in the same class, and declaring the same property, they have to be compatible. And compatible means effectively they have to be exactly the same. So, same visibility and same default value. The trouble here is that if we are dealing with an instance property, which has a new expression as a default value, then we have to somehow check that these are the same. It would be not great if we actually had to evaluate the initializer to do that because, I mean it's okay if it's just you know, with initializer something like one plus two, but if it's an actual new expression we don't want to create objects which again might have side effects and so on. What I'm specifying is that if you have a trait property with this kind of dynamic initializer, so using the new expression, than we will always consider it not compatible. Derick Rethans 11:36 Would it currently be compatible with one of those trait properties, it says seven plus three, for example? Nikita Popov 11:42 That will be compatible, which is actually, I think relatively new thing. We used to not evaluate initializers and traits at all, and say those are incompatible and that changed at some point and seven point, I don't know which version. But in this case we would go back to saying it's incompatible, because at least I don't see a good way to make it compatible and I don't think it's particularly important to support that case. Derick Rethans 12:10 Do you have any information about how much traits are actually used? Nikita Popov 12:15 Well, I know that Laravel uses them. But I have no idea how much. Derick Rethans 12:22 One last thing I think RFC mentioned, is that it also has an effect on attributes, that it sort of gets nested attributes in by the back door. How does that work? Nikita Popov 12:33 I wouldn't call it the back door. Exactly. I have to be honest, I didn't think about attributes at all when writing this proposal, what I had in mind is mainly parameter defaults, and property defaults. But yeah, attribute arguments also use the same mechanism and are under the same limitations. So now you can use new as an attribute argument. And this can be used to effectively nest attributes, so the example I've seen from Symfony is that they have, for example, assertions. They have an assert all attribute which has the which accepts, which wants to accept a list of assertion attributes. And now you can actually do that because you can, um, create these attribute objects recursively. The example from the RFC is assert all, then new assert not null, new assert length max six. Derick Rethans 13:26 That's actually kind of neat, that is just ends up starting to work on right? Nikita Popov 13:30 Yeah, I mean, I read the thread for Symfony how they are trying to work around that. They have various ideas of how to do it and it's all pretty ugly. So I think it's nice to have a more or less proper solution for that. Derick Rethans 13:45 They'll just have to wait until PHP 8.1. Nikita Popov 13:48 Yes, that is the disadvantage. Derick Rethans 13:51 Out later this year. Derick Rethans 13:53 Are there any backwards incompatible changes? Nikita Popov 13:56 That again comes back to the evaluation order the problem. Originally I had intended to this, this to be compatible. Now if we change evaluation order then it is breaking, depending on that, the answer is yes or no, I am still not sure on that one. Derick Rethans 14:11 Because I think PHP eight one already has a breaking changes in there where the order of declaration of properties is now different. Nikita Popov 14:19 Yeah, that the change, though I hope that does not affect people too much because it's mostly about debugging functionality, which of course you are kind of interested in. Derick Rethans 14:29 Yep, it broke my tests, which is a good thing because it means that my tests cover all the edge cases as well. I think we sort of done discussing this RFC, is there anything else that might ends up being added here in the future, or what still needs to be hammered out before you can put it up to vote? Nikita Popov 14:47 Apart from the evaluation order question that I have been continuously mentioning, the future scope would be to extend this to not just new expressions, but also for example static method calls, popular alternative pattern is to not use constructors, but named constructors, which are implemented as static methods, and similarly also function calls for example so you can use something like strlen() or count inside an initializer. Derick Rethans 15:13 Isn't strlen a language construct now? Nikita Popov 15:15 No it isn't. It has an optimized implementation in the virtual machine, but it's still technically a normal function call. Derick Rethans 15:23 Because I remember that, breaking tests in Xdebug as well at some point, because it suddenly didn't suddenly was no longer a function call. Nikita Popov 15:30 Things do tend to break in Xdebug. Derick Rethans 15:34 Okay, I'm used to it. Thank you, Nikita for taking the time to talk about your new in initializers RFC. Nikita Popov 15:40 Thanks for having me. Derick Rethans 15:45 Thank you for listening to this instalment of PHP internals news, a podcast dedicated to demystifying the development of the PHP language. I maintain a Patreon account for supports of this podcast as well as the Xdebug debugging tool. You can sign up for Patreon at https://drck.me/patreon. If you have comments or suggestions, feel free to email them to derick@phpinternals.news. Thank you for listening and I'll see you next time. Show Notes RFC: New in Initialisers Credits Music: Chipper Doodle v2 — Kevin MacLeod (incompetech.com) — Creative Commons: By Attribution 3.0
This episode is also available as a blog post: https://datapane.wordpress.com/2020/08/10/how-to-find-exact-date-time-difference/
VB.NET "Not along for the ride" in .NET Core and .NET 5. Eject Mailman, eject.For those of you that were hoping for VB.NET to get some love in .NET 5, it doesn't look like it's going to happen. This is of course causing some consternation; but overall I get it. Visual Basic was written for a time when we really thought we could make a language look like english and not be laughed out of the room. Now we know better. VB.NET has done good things; and I know a few products even today that are still written in VB.NET; but look, it's time.Just look at the flowers, VB.NET.Visual Studio 2019 version 16.7 Preview 6 is now availableMost of us are probably on the Visual Studio stable channel, but if you like to get the previews (they're free), you can install them. Interesting to me is that this version adds support for XCode 11.6? I don't even know what this means but here we are and that sounds cool as $#&@.Microsoft .NET team is hiringYou can apply to become a Program Manager II on the .NET team. I thought about applying, but realized "allowing everyone to be their authentic selves" probably doesn't mean "Making fun of Microsoft on a daily basis". Seriously though, if you can move to Redmond, you should think about applying. .NET is entering its best years; and Microsoft is one of the better companies to work for.Microsoft's Roslyn team (the compiler for .NET) released a blogpost detailing productivity improvements:The Roslyn team released a new blog post detailing tooling fixes that are in Visual Studio 2019 16.6 that you may have missed.My favorites are the DateTime formatting changes. You no longer have to Google which combination of MMDDYYYY gets you what you want; they now provide that information in the intellisense when you use DateTime.ToString(). This is a long overdue feature and I'm glad they added it. Their code refactorings are getting better, though I still prefer Jetbrains Resharper..NET Foundation "State of the Foundation"The .NET Foundation released its State of the Foundation report for 2020. They have 800 members, which is a growth of 100% from last year, and 5 corporate sponsors, as well as its plan for the coming year. I'm glad to see this sort of transparency; and while I have some reservations about the .NET Foundation; this is a step in the right direction.They also released their budget; and this will get better, but they spent a grand total of $558 dollars on sponsorships this year. You'd hope to see that get much better, and that's the metric I'll be using to judge whether or not they're having the right impact on the .NET community.Stack Overflow infographic:Stack Overflow (the company) released its performance metrics for its collection of Q&A sites on stackexchange.com (What the company used to be named, but then realized that was a terrible name and changed to the same namesake as its flagship Q&A site). So anyway, if you want to know how 300+ Stack Exchanges perform, you'll want to see this.The sheer speed of the Stack Exchange network got the Hacker News folks all in a tizzy. Any day we can tout how well .NET performs and piss off hacker news is a good day..NET Conf - "Focus on Microservices".NET Conf held an all day conference to talk microservices; and I live tweeted it. I've got some pretty nasty scars (And a few fond memories) of working with Microservices; and if that sort of thing interests you, check my live thread on it. If your architect is practicing Resume driven development or you work with really large software teams, you should watch the videos with interest; for the rest of us, the conference probably isn't worth your time unless you really want to learn about some frameworks that can help you build Microservices in .NET.Pretty Fricking Cool Library of the Week (PFCLotW)This week's cool library is Bogus, which allows you to generate fake data for your application. It's a pretty neat library; and you should check it out. I've used it on quite a few occasions, and it's worth your time.In today's podcast episode; I'm diving deeper into what the .NET Foundation is, and whether it's "good for us" as a community in its current form. The episode should drop by Noon EDT (-4 UTC) today; so give it a listen if that's a subject that interests you.Transcript (Powered by otter.ai)George Stocker 0:00 Hi, I'm George Stocker, and welcome to last weekend dotnet. Vb dotnet is not along for the ride in dotnet core and dotnet five. Now for those of you who are hoping to get VB dotnet in dotnet, five, it doesn't look like it's going to happen. So of course, it's going to cause some consternation among VB dotnet developers, and I get it. Visual Basic was written for a time where we thought we could really make a language look like English and not be left out of the room. Now we know better. dB dotnet has done good things. And I know a few products today, they're still written in VB dotnet. But look, it's time Visual Studio 2019 version 16.7. Preview six is now available. Now this is pretty cool. You can actually get advanced versions of Visual Studio whatever the next minor version is, you can get advanced versions of it for free without a license, their preview and so they might have bugs in them, but you want to check out what's coming up in Visual Studio. It's always an interesting install. Now this one is interesting to me because it adds support for Xcode 11.6 I really don't know what this means. But I want to find out because this is really cool. Microsoft dotnet team is hiring, you can actually apply to become a program manager for the dotnet team at Microsoft, I thought about applying, but then realize that allowing everyone to be their authentic selves probably doesn't mean making fun of Microsoft on daily basis. Seriously, though, if you can move to Redmond, you should think about applying dotnet is is entering into its best years. And Microsoft really is one of the better large companies to work for Microsoft's rozlyn team. That's the team that produces the compiler for dotnet. They released a blog post about productivity improvements and their latest push for Roslyn. Now, this was in 16.6. So you may have missed it. It's been out for a few weeks. But what I just noticed is that they've added changes that allow you to see how your date time is going to be formatted when you say date, time to string You have all those options, they now give you IntelliSense for those options, and they tell you what they mean, that's wonderful. It's way long overdue. There are other code refactorings. For this, I still prefer JetBrains resharper. But again, something you should take a look at the dotnet foundation released its state of the foundation blog post for 2020. Now, they this year, they have 800 members, which is 100% growth from last year. And they now have five corporate sponsors. This state of the foundation also includes their upcoming plan. I'm pretty glad to see the sort of transparency, I do have some reservations about the dotnet foundation. I do believe that publishing this is a step in the right direction. They also release their budget, and this will get better but they spent a grand total of $558. In sponsorships this year. you'd hope to see that get much higher if it actually means what I think it means which is sponsoring open source projects. And that's a metric I'm going to be using to judge whether or not they're having the right impact on the dotnet community but you have to start somewhere, and they started at $558 worth of somewhere. StackOverflow released its performance metrics for its Stack Exchange sites on Stack Exchange calm now the company's called Stack Overflow used to be called Stack Exchange. The network is still called Stack Exchange. But the company changed its name back to its flagship site, which is Stack Overflow. Anyway, if you want to know how well the site's perform, you can check out the link at Stack Exchange comm slash performance and the sheer speed of the Stack Exchange network being hosted on dotnet. They got the Hacker News folks all upset and any day we can see how well dotnet performs and piss off Hacker News. That's a good day. dotnet con held their focus on microservices Virtual Conference on July 30. And I have a thread live tweeting it. Now I've got some pretty nasty scars and some fun memories from working with microservices and that sort of thing. interest you, you can check out my life thread on it. Now if your architect is practicing resume driven development, or you work with really large software teams, you should check out the videos from the conference. But for the rest of us, probably not worth your time, unless you want to learn about some of the frameworks that help you build microservices and dotnet. Now, this week's cool library is bogus. Now, it's a library that allows you to generate fake data for your application. It's pretty cool. And you should check it out if you need to generate fake data. One of the common usages that I use it for is if we need to mock data as if it were coming from production. For instance, we need a million rows of data, but we can't use production data. Use bogus, generate it that way. Job done. Alright, as part of today's episode, we're going to talk about the dotnet foundation. And that may seem a little boring, but I promise you it's not it's actually really important for you, for me and for everybody who is part of the dotnet community, the dotnet foundation was formed to advance the interests of the dotnet programming community, including enterprises partners, individual developers and open source communities by fostering open development and collaboration of open source technologies for dotnet programming and related technologies, and by serving as a forum for commercial and community developers to strengthen the future of the dotnet ecosystem, and wider developer community by promoting openness, community participation and rapid innovation. Now if that sounded, we'll can that's because it was that comes directly from the dotnet foundations bylaws, Article One, section three. Now the reason why we're talking about the dotnet foundation is that how its governed and how we interact with it determine how successful dotnet open source is, Will dotnet open source be successful because of the foundation or in spite of the foundation, and if you've been developing in dotnet for a long time, you understand that Microsoft is Really a late comer to the open source movement. Now the foundation was formed in 2014. And it was formed much the same way that the Apache foundation or the eclipse foundation were formed, they're around technology stack, in this case dotnet and to advance the interests of the dotnet community. Now when we say advanced the interest dotnet community got to put an Asterix there. I mean, Microsoft created the dotnet ecosystem. Microsoft's developer division has tons of tooling around dotnet they've put millions and millions of dollars into developing dotnet into what it is, and you can't expect them just to let that go and just to be governed by a foundation. And of course, it's it's not they, they're a founding member, and as such, they get certain rights in the foundation that no one else gets. For instance, in an article two, Section four under founding member, Microsoft Corporation is the founding member, the founding member, and 10s have the right to manage the affairs Foundation, be vested exclusively in the board as described in these bylaws to the maximum extent permitted by applicable law, the founding member and eligible members will elect the board as described in Section 3.3. That's article three, section three. Now the board will consist of one director appointed by the founding member and up to six directors elected by the membership. Now that's important, no matter what Microsoft gets one spot on the board, okay, the membership elects the other six, in fact, not the other six up to six. Now the other rights the founding member gets Microsoft in this case, the director who is appointed by them is going to serve until that person is replaced by Microsoft or otherwise vacates the position. The founding member Microsoft may replace its appointed director anytime as in its sole discretion. Elected directors will serve for the term established in the director election policy found Remember, they get to change their person out whenever they want. Now that's something we need to be aware of. Now the current executive director of the dotnet foundation is Claire Novotny. Claire is the dotnet foundation executive director. And she works at Microsoft as a program manager on the dotnet team. And this is very important. If the dotnet if the foundation is independent, then clearly any any actions taken by Microsoft would be seen as well. It's not an independent foundation. And so right now clear is the executive director. And as of yet, there's not been a non Microsoft executive director that I know of. Now Microsoft has other rights. For instance, under article three section nine meetings, subsection II limited special right for director appointed by my founding member. This is Microsoft remember, in connection with any vote to materially change the foundations of membership policy director election policy, project governance policy, or any intellectual property related agreements or policies, a no vote by the director appointed by the founding member will result in the disapproval of the proposed action, regardless of the number of votes for approval, and such director must be present as part of any quorum, ie if that directors not present, the board will not have a quorum for the matter, regardless of the number of other directors present. So this is important. Microsoft effectively controls how the dotnet foundation is set up and how it's run. You can't change policy if Microsoft doesn't agree to it. That's a very interesting way to set it up if you want it to be independent foundation. Now under Article nine amendments,any amendment of the articles of incorporation or the bylaws must be approved by vote of two thirds of the directors then in office, any such amendment that materially alters risk? or eliminates the rights responsibilities and privileges of the founding member must be agreed to in writing by an authorized representative of the founding member who is not serving as the director of the foundation. Now, this is interesting. You've got this special person that the founding member appoints. And they can't even vote to make changes. Someone else from the founding member has to approve these changes like amendments. Now, why does all this matter? Like why is this political intrigue, even important? Now all of this is important because the dotnet Foundation was set up to help dotnet open source thrive. Now it only thrives if we do what's best for community. We do things that aren't best for the community, it's not going to do as well. dotnet foundation supposed to do that. It's supposed to take into account how the community feels and conduct itself in a way that helps the community thrive. For instance, they have a vision statement. vision statement proposed vision statement is that a diverse, healthy and active open source community, open source software community or project maintainers are well supported and contributors feel welcome, an ecosystem where dotnet open source software is adopted in the enterprise, education and personal projects, and ecosystem are the foundation its members in the world wide dotnet open source software ecosystem work together to identify challenges to the mission, and then collaborate on solutions. A community where those that benefit the most from dotnet open source software contribute back whether it be through resources, time or money in this community is easy for anyone who wishes to contribute to do so in whatever way they can. should be easy for companies to contribute financially to open source software, and easy for project maintainers to receive that support. That's the vision statement they're proposing to change right now. That's the proposed instead of the vision statement. Now the mission statement is the dotnet foundation is an independent A nonprofit organization whose mission is to support an innovative, diverse, commercial friendly, international open source ecosystem for the.net platform. That is their mission statement. Now with everything we've gone through so far, we've gone through their bylaws, we've gone through how they're set up, they have six, up to six directors plus someone appointed by Microsoft. But they also have one other part, which is an advisory council. This Advisory Council consists of six people that work at Microsoft and one that does not also people that run the foundation. They have a treasurer who works at Microsoft, Christopher house, who works at Microsoft, but doesn't have his stated title. And they have Claire, who is the executive director of the dotnet foundation. They have that they then have their board of directors of which it looks like none of their board of directors, except for one except for Beth Massi is a member of Microsoft. So extensively right It's pretty independent, except for the fact that Microsoft appoints the Microsoft appointed director, they will always be able to appoint a director, they can replace that director anytime at their discretion. And that director cannot make decisions that will materially hurt Microsoft. And Microsoft has effectively veto power over anything that changes how the dotnet foundation is run. And then they have an advisory council. It's made up largely of people from Microsoft. So even if someone wants to make a change, you're going to the Advisory Council is going to be there. And you know, this doesn't look so good for Microsoft, please don't do it. But the reason all of this came up is that I believe in the dotnet Foundation, I believe in the idea of making open source software work. I think that right now, open source software won't work. It can't work. It's not financially viable for maintainers. It leads to burn out. It leads to abandoned projects, and generally creates more churn in a system and when you create churn, especially in software, companies don't want to use that software. And I think that you know, creating a foundation whose job it is to help keep that churn down. I think that's, that's a good thing to do. However, open source software has to have the needs of its community at heart. And a foundation that represents open source software has to have the needs of its community at heart. Now recently in in, it was reported back in May, that Microsoft copied its new wind get window Pam, its new wind get package manager, architecturally from apt get, which was a dotnet, open source software package manager. They copied how it worked. They copied its ideas. And if that weren't bad enough,it turns out they'd called Kevin and said, Hey, Kevin, can you come out interview with us? We like what you're doing with aapka they interviewed him, they ghosted him and then the night before build They call him up to say, hey, oh, by the way, we're not going with your app get project, we're going to go our own way. And yet it's being announced tomorrow and build. The next day they announced wind get. Now by itself, this behavior is bad. But this is Microsoft. Aren't they are big supporters of dotnet. Open Source, didn't they establish a foundation just for this? Well, I asked him that question to the foundation to its directors. And the response I received was not our deal. No one asked us for help. We're staying out of it. Is that behavior keeping your, your community's needs in mind? I don't think so. And so I dug some more digging, I was like, well, this, this can't This doesn't make sense. Like why would anyone stay silent. You've you've literally got a dotnet project that's popular, that is filling on a hole that Windows hasn't provided a system level package manager That's pretty dang well. And why is it nobody at the dotnet foundation is speaking out about this. There's some reports from some people, the dotnet Foundation, when I really pressed them that said, you know, hey, if they were a member, we might have stepped in. But since their project isn't on our list of projects, we don't, we don't deal with them. That's not a good enough answer. If your foundation is there, to improve dotnet open source software adoption, you're not just improving it for the projects that are part of your portfolio. You need to improve it for all of them. You're the interest group for dotnet open source software, that's what you do. So again, I was a little heated. And so I started doing more research into the dotnet foundation. That's when I found all the stuff I'm telling you about. I have also been telling people to Hey, you should become a member, you should join the foundation, and you should vote and i believe i believe all those things. And one of the questions I asked is that you know, what does commercially friendly commercial friendliness me back from the mission statement? And the answer I got was telling. And it's actually what led me to speak on this podcast about it today. And the answer I got is the intent is that businesses are able to use dotnet based open source software libraries without friction. Clean IP and licensing is is a key part of that, which is why the foundation has project signup contribution agreement, and a seal a bot for for future contributions that ensures that no one's going to come out of the woodwork, the copyright claim on the code. It also means the use of permissive license licenses, which is one reason that foundation does not support libraries with copyleft licenses. It currently does not say anything about a project's commercial viral viability, nor for sponsors that the foundation of which Microsoft is just one. And that was from clear. The Executive Director, Ben Adams, who is a paid director on the foundation said it's both if a project is not sustainable, then it's not commercial friendly and the dotnet foundation should help enable business to give back to projects they use in a commercial friendly way. As business purchasing can be a complicated internal system and a common barrier for all projects that the dotnet foundation should endeavor to ease. Also, the dotnet foundation does not support non permissive libraries for its license, excuse me, non permissive licenses for its libraries, as they are hard to build on are using a commercial friendly way. Now, this is important, basically dotnet Foundation, if you're producing open source library, dotnet foundation wants Greece's kids good businesses to use it. So if you produce, let's say, a library that does image compression, if you want to be a part of the dotnet Foundation, you can't use a copyleft license like GPL. If you want to be part of the foundation for them to care about you, you got to use permissive license like the Apache License or MIT license. Now if you're an application dotnet open source application, you're allowed, although I haven't seen verbiage to that you're allowed to use a non permissive license. Now, why is all this important? Well, if you're an open source project, and you're a library, I don't see how the foundation is going to make what you do commercially viable for you. We're gonna make it commercially viable for businesses by saying no, you may not use GPL or a GPL. But you may use MIT license and the Apache License, but for applications, they'll help you. They'll be okay with a non permissive license, at least as I understand what they've said here. It's a hell of a way to slice it. Alright, since the bylaws don't cover everything, we have jumped intothe project's policy. The project's policy allows you to determine what projects can be members of the dotnet Foundation, and do they meet the health criteria is important. So let's start with eligibility. Now they're eligible if they fit within the moral and ethical standards for the dotnet Foundation, it's good if the project is aligned with the philosophy and guidelines for collaborative development also good. And it's built on the dotnet platform, or it creates value within the dotnet ecosystem. It's eligible if it produces so source code for distribution to the public at no charge. That's interesting. The license is operated under a is offered under an open source license, which has been approved by the dotnet foundation. And libraries that are mandatory dependencies of the project are also under offered under a standard permissive open source library, which has been approved by the dotnet foundation. Now all of these are and there's more criteria, but those are the most interesting ones. If you decide you want to put your project under the dotnet Foundation, you have two choices. You can either a assign your project, to the dotnet foundation that's transferring the copyright of your project to the dotnet Foundation, or B. You can use the contribution model which is you retain, or the project retains ownership of the copyright, but they grant the dotnet foundation abroad license the project's code and enter in other IP. Now, why is all this important? Why do we need to care about such esoteric documents? And it's because if you ever want to know what a business cares about, look at what they write down. They put a lot of effort into these governing documents. Microsoft put a lot of effort in being sure they couldn't be kicked down. They also put a lot of effort into ensuring that they, their rights were always protected with effectively veto power over any decision that changes how dotnet foundation runs. The foundation itself is set up to ensure that companies can easily use open source projects, they can easily rely on them, but you're missing a leg. And we see that with what happened with Kevin and aapka. What about the project mean? Tanner's, where do they come in? Sure they get a seal a bot, that makes it easier for people to contribute changes their projects. Okay? That's a solved problem. And they get pixel space on the dotnet Foundation website, but only if they're members. Something like AppGet, something that was materially important to the dotnet community because it showed that you could use dotnet to create something as foundational system package manager, have it be popular, and they get nothing, because they weren't a member. And even if they were a member, it's not like Microsoft say, Oh, yeah, you're right. Gosh, we shouldn't have competed with open source project are bad. They didn't do that. Microsoft, you know, after an outcry finally gave keivan credit, but if they used his architectural work, his design work that's worth 7500 k from consulting, just by developer time alone, your developer team, you have them spend Two months figuring out the architecture of the system, what his design will be how its API's work, that's easily worth 75 or 100. k. What did Kevin get? Well, he got a footnote read me Two months later. And that's the sort of thing that I thought the dotnet Foundation was supposed to protect against. But as I find out, they're not, you know, they're there to grease the skids for companies, protecting projects is a distant second to that. Now, that, of course, may not be the desire that may not be what they're trying to do. But it's the impact. And it sure seems like the dotnet foundation is set up in such a way that it's there to enrich Microsoft, even if it hurts the community. And so let's look at their budget what they do this year. Now currently, they released their state of the foundation this week. They have five corporate sponsors. They have 800 members and their budget. They brought in 237,000 sent out expenses of 157,004 2020 ending July, or excuse me, ending June 2020. In their budget, they had sponsorships of $558. And outreach of $81,517 goal of outreach is to encourage new developers to build dotnet empower underrepresented segments of the coder community, become leaders and contributors and assist event organizers with evangelism and grow.So for their budget, they spent 81,000 on outreach, only $558 on sponsorships. Now it's unclear how much of their money went to open source projects. I can't tell that just by looking at their balance sheet. There's no line, hey, this we're outlays that we actually contributed to projects with but remember, you know what people write down they care about where is the goals for give Many open source projects, I don't see it. And this means that they don't care about open source or that, you know, the dotnet foundation just exists to enrich Microsoft. But it does raise some interesting questions at this point. What we need for open source in the dotnet community is we need open source to not be plagued by burnout to not be plagued by companies stealing the work. You know, I don't even say that we have, we do have a list of problems and done and open source. And you know, how easy it is to get companies to adopt open source. It's even on my top five. You know, it's hard to get people to maintain projects, you know, authors, like even get their work stolen for no money, no credit. It took the community outcry to even get a footnote on the readme file. Microsoft continually competes with the community and maintainers don't have the backing up an interest group that can help us that's what the dotnet Foundation's there for There'd be the backing for the maintainers there to be the special interest group for people that make open source software with dotnet. Yes, they should grease, grease the skids for businesses to use open source software. Absolutely. But they should do it in such a way that enriches the community, not a project sponsor, not their founding member, the community. So here we are. We're at the start of a new fiscal year for the dotnet foundation. We're having new directors Come on. And I want to challenge the directors that join the foundation to figure out who are they therefore, are they there to enrich the founding member to make it easier for them? Or are they there to enrich the community? And if you aren't there to enrich the community? Then we got to start focusing on making dotnet open source software sustainable, and yes, that means putting money in the pocket of maintainers Open source software is a labor of love. You have to love what you're doing. But love doesn't pay the bills. Love doesn't put a roof over your head. These companies have plenty of capital. We need an interest group, like the dotnet foundation to put that capital to work for us. Now, how can we do it? One issue is that we should have dual licensing. And the dotnet foundation should look at dual licensing. If you're an open source project, you get one license, if you're commercial, you got to pay and you should pay. You're making money or you're using the software to make money in your business or to save you money. You should pay for that right if you're a business dinette foundation can help by putting together an invoicing system by saying, look, we have lawyers, you pay dues, those dues go to lawyers to figure out do licensing your dotnet project, they will figure out the license and you don't have to the next thing we'll do. So we'll set up an invoicing system to make it as easy as possible for open source projects under the dotnet foundation to have to generate invoice for business so the business can business's purchasing department can pay them. The next thing we will do as dotnet foundation is that we will fight tooth and nail for dotnet open source, there should be no one that questions whether dotnet foundation exists to enrich the community and seeks to defend the community from companies that would try to take and give back. And that means at some point, members of the dotnet Foundation and the directors of the dotnet foundation have to stand up to factions within Microsoft do just that. This is not the first time that I Microsoft team has taken something from open source. It's only the latest time and it's gonna happen again. That's almost a certainty. I want dotnet open source software to succeed I believe it needs to succeed. We're not in a closed source world anymore. But for it to succeed. It's got to be financially viable. For the maintainers, the people that put their hearts and their souls into creating these libraries and these frameworks that we use. And the only way that's going to happen is if the interest group we have the dotnet foundation puts all of its effort towards making that the goal. Now this incredibly depressing podcast, of course, is brought to you by myself, George Stocker. And I help teams double their productivitythrough test driven development. You can reach out to me at www.doubleyourproductivity.io.Transcribed by https://otter.ai
You know, with so much information that floats around, I have found that people collect all sorts of ideas, certifications and concepts that have to do with spirituality, energy, intuition, manifesting etc. but still complain that they are not where they want to be. Listening to a lecture, watching a video or reading about a concept fills up your file cabinets, but until you actually put it into action it just becomes mind clutter. I can't tell you how many people tell me that they have been "on the spiritual path" for a decade and nothing has changed! People are more overwhelmed, confused and often disappointed because for all that they learn, nothing really seems to work as promised in the energetic world. Why is that? Well just like things evolve and progress in the physical world, Energy EVOLVES as well! And it is time for you to take a look at your own world and do some clearing out. Your New Energetic Abilities are Upgraded and so is the Energetic Grid that we all run on. So...On this show we will cover: - The BIGGEST Reason that Most Fail in their Manifesting and Where Things Go Off due to disconnected and outdated practices - The Major perception that just about EVERYONE gets wrong and how to adjust it for rapid shifts in your success - What practices/ concepts and models to keep, and what its time to throw away. And much more! If you have a question about our topic, send it to support@ahamomentsinc.com ahead of time! Or if you would like to get clarity on your personal situation and where your frequency is at book your free private Frequency Assessment Breakthrough Call with me. It is a 45 min call where we get clarity on where you are at and why things may be going the way they are. Only 1 per person please... to book a call go to: www.theahaway.com/apply
Добрый день уважаемые слушатели. Представляем новый выпуск подкаста RWpod. В этом выпуске: Ruby Ruby 2.7 adds shorthand operator for Object#method, Rails 6 adds support for timezones to Active Job, Rails 6 adds before? and after? methods to Date, DateTime, Time, and TimeWithZone, Rails 6 adds negative scopes for all enum values и Debugging in Ruby—Busting a Year-old Bug in Sprockets Diving into Ruby's #dup and #clone, Action Cable vs AnyCable: fight!, Sail - a lightweight Rails engine that brings an admin panel for managing configuration settings on a live Rails app и CryptoZombies - an interactive code school that teaches you to write smart contracts in Solidity through building your own crypto-collectables game Web .dev for all, The CSS Working Group agreed on adding many math functions и 8 Little Videos About the Firefox Shape Path Editor Frontend Bootcamp / Days in the Web, FrenchKiss.js - a blazing fast lightweight i18n library written in JavaScript, Web Accessibility Guide и JavaScript SEO
Eeeek! What better way to come back than with a podcast with this awesome couple? We dive into some great topics from relationships, to the why game, to living life. Take a listen, laugh alot, and have some fun. #podcast #relationships
Eeeek! What better way to come back than with a podcast with this awesome couple? We dive into some great topics from relationships, to the why game, to living life. Take a listen, laugh alot, and have some fun. #podcast #relationships