724 Matching Annotations
  1. Sep 2022
    1. it's syntactically correct, but it will check that none parameters are valid, just because additionalProperties work at siblings level, and no enter inside of allOf

      JSON Schema: problem: can't use additionalProperties with allOf to make a union

    1. The discussion here can get very fast-paced. I am trying to periodically pause it to allow new folks, or people who don't have quite as much time, to catch up. Please feel free to comment requesting such a pause if you would like to contribute but are having trouble following it all.

      Why is it necessary to pause Can't new person post their question/comment even if it's in reply to comment #10 and the latest comment happens to be comment #56? There's no rule against replying/discussing something that is not the very latest thing to be posted in a discussion!

      Possibly due to lack of a threaded discussion feature in GitHub? I think so.

      Threads would allow replies to "quick person" A to go under their comment, without flooding the top level with comments... thus alowing "new person" B to post a new comment, which in so doing creates a new thread, which can have its own discussion.

    1. James I and James V of Scotland were accomplished poets. James VI (and I of England) wrote prose in the language and indeed continued to speak the language when he ascended to the thrones of Ireland and England.

      James I, James V of Scotland and James VI (and I of England) all spoke and wrote Scots.

    1. Good code is its own best documentation. As you’re about to add a comment, ask yourself, "How can I improve the code so that this comment isn’t needed?". Improve the code and then document it to make it even clearer.
    1. who will prove by actual resultstheir value to the community, I cannot but believe, I say,that this will constitute a solution to many of the presentpolitical and social diculties.

      While I understand that Washington could not see the future, and was perhaps simply being optimistic, he was wrong. No matter how strong capitalism is in influencing your respectability within society, it will never be enough to overcome racism as racism does not view things rationally. Furthermore, these industrial jobs are now looked down upon and any attempt by African-Americans to move into more respected jobs has faced resistance from upper class whites, largely due to their attempt to keep wealth concentrated within the hands of the 1% but also due to either conscious or subconscious racial biases about the ability of black people to work in jobs that are not trades.

    2. The home which she would then havebeen able to nd by the results of her work would haveenabled her to help her children to take a still moreresponsible position in life.

      Aka, since women are capable of having children they should forgo formal education in favor of housework so that they may one day better take care of their children who can then attempt to move up the socioeconomic ladder.

    3. I would set no limits to the attainments of the Negro inarts, in letters or statesmanship, but I believe the surestway to reach those ends is by laying the foundation in thelittle things of life that lie immediately about one’s door. Iplead for industrial education and development for theNegro not because I want to cramp him, but because Iwant to free him. I want to see him enter the all-powerfulbusiness and commercial world.

      Here Washington encourages readers to seek only the smallest amount of success and approval they can from the system in which they live, that they should not seek to change an unjust system but rather adapt to it and take the crumbs that are offered to them with nothing more than a "thank you."

    4. And just the same with theprofessional class which the race needs and must have, Iwould say give the men and women of that class, too, thetraining which will best t them to perform in the mostsuccessful manner the service which the race demands.

      He seems to view the status of a race of people as equivalent to how much work and capitol said race can contribute to the economy.

      "Internalized capitalism is this idea that our self-worth is directly linked to our productivity." - Professor Anders Hayden of Dalhousie University

    5. Without industrial development there can be nowealth; without wealth there can be no leisure; withoutleisure no opportunity for thoughtful reection and thecultivation of the higher arts.”

      He repeatedly seems to assert the idea that due to their current state in the economy at the time of this writing, black people should continue to work in jobs they hate in order to hopefully receive some semblance of relevance and respect in the capitalist system as controlled by middle and upper class whites. Here he claims that black people of the working class should not take time for themselves, should not focus on anything outside of work, and should not attempt to elevate their socioeconomic status. He views time off, rest, and activities outside of work as something that only the upper class should seek, and that black people of his day should continue to work lower paying jobs so that their future descendants may one day be a part of this oppressive upper class. All I see here is an awful case of internalized and externalized capitalism that seeks to further oppress people for things that are outside of their control.

    6. It is discouraging to nd agirl who can tell you the geographical location of anycountry on the globe and who does not know where toplace the dishes upon a common dinner table. It isdiscouraging to nd a woman who knows much abouttheoretical chemistry, and who cannot properly wash andiron a shirt.

      While practical life skills are important, I can't help but notice how long he goes on about his disappointment in black women for receiving liberal arts educations in comparison to how long he goes on about his disappointment in black men for the same.

    7. that all forms of labor are honorable,and all forms of idleness disgraceful.

      Washington seemed to have a very capitalist view of labor and the right of workers to have time free of said labor. Not surprising honestly.

    8. Our pathway must be up through the soil, up throughswamps, up through forests, up through the streams, therocks, through commerce, education, and religion.

      I think that this means Washington believes a little bit of struggle creates a well rounded person that is ready to work in the real world.

    9. They will give us an agricultural class, a class oftenants or small land owners, trained not awayfrom the soil, but in relation to the soil and inintelligent dependence upon its resources.

      I think this means that teaching a variety of skills will create a well-rounded student that is in tune with the resources and environment surrounding them.

    10. We opened a dairy department in connectionwith the school, where a number of young men couldhave instruction in the latest and most scientic methodsof dairy work.

      I think this shows that the Institute is always changing, trying to stay on top of the latest developments in the area so that their students are better prepared for the workforce.

    11. Iplead for industrial education and development for theNegro not because I want to cramp him, but because Iwant to free him.

      I think this means that Washington believes African Americans feel the need to seek higher education rather than stick with industrial education because they believe they owe it to their ancestors. They believe that they must take advantage of everything their ancestors were never offered.

    12. Ireceived a great many verbal messages and letters fromparents informing me that they wanted their childrentaught books, but not how to work.

      I can infer that parents wanted their students to learn more textbook academic education so that they could continue to further their academic knowledge rather than the more hands on learning they experienced.

    13. The industriesthat gave the South its power, prominence and wealthprior to the Civil War were mainly the raising of cotton,sugar cane, rice and tobacco.

      I think this means that African Americans ran the South even though they were not acknowledged for it.

    14. there was an absence of mental training in connectionwith the training of the hand.

      I think this means that African Americans were never given an opportunity for education, which kept them oppressed because they were never able to learn that they could do more than the physical labor forced upon them.

    15. wasamazed to nd that it was almost impossible to nd inthe whole country an educated colored man who couldteach the making of clothing.

      I can infer that it was so hard to find an educated colored man who could teach the making of clothing because making clothes was left up to the women. Tailoring and making clothes was part of the women's gender roles in the society.

    16. For two hundred and fty years, I believe the way for theredemption of the Negro was being prepared throughindustrial development.

      I think that this means it was a common belief among African Americans that if they learned how to perform the gritty/undesirable jobs, they would gain societal acceptance from slave owners. They might have thought that if they took on this work then the slave owners would be grateful for them and show them mercy, when they would truly take advantage of them instead.

    17. Negro men and womenwere educated in literature, in mathematics and in thesciences,

      I infer that there were far more educated black men and women than most history books and novels let on.

    18. To a large degree, though,this business contact with the Southern white man, andthe industrial training on the plantations, left the Negro atthe close of the war in possession of nearly all thecommon and skilled labor in the South.

      I can infer that at the time of slave freedom the slaves were far more skilled in working than the white slaveowners which put them at an advantage for many industrial jobs.

    19. In a certain wayevery slave plantation in the South was an industrialschool.

      I can infer that slaves had to teach themselves the skills that they used while working for the white men. The slave owners did not teach them the skills used but instead expected them to figure them out on their own.

    20. I believe the way for theredemption of the Negro was being prepared throughindustrial development.

      I can infer Washington believes to a certain extent that African Americans should participate in working jobs at the industrial development level in order to gain societal approval in a sense.

  2. moodle.lynchburg.edu moodle.lynchburg.edu
    1. I rode to Nashville in the Jim Crow car

      I think this means that Jim Crow was in control of everything, all colored people's fates were driven by the Jim Crow laws (racial segregation).

    2. hill and dale, and Life and Death.

      I think ... Hill (where the white people resided) = Life Dale (where the black people resided) = Death

    3. And lo! the cabin in the hollow hadclimbed the hill and swollen to a half-finished six-room cottage.

      I think this means that the Burkes got the seventy-five acres that everyone believed would go to someone white, so Du Bois is excited.

    4. Progress

      I think Progress means industrialization.

    5. and slept—and sleeps

      I think this means that this is the moment Josie passed away.

    6. Josie grew thin and silent, yet worked the more.

      I think that this means Josie kept working despite it being bad for her health because she saw it as a duty and not a passion.

    7. from the sight of the Veil that hung between us and Opportunity.

      I think that the Veil refers to a barrier and Opportunity refers to equality between white and black people.

    8. I trembled when I heard the patterof little feet down the dusty road, and saw the growing row of dark solemn faces and bright eagereyes facing me.

      I think this shows that Du Bois has a real passion for teaching others, one could probably consider it his way of leadership.

    9. for their knowledge of theirown ignorance.

      I think this means that they had the knowledge of experiences, but ignorance in regards to education that could shine a light on their oppression.

    10. I feel my heart sink heavily as Ihear again and again, “Got a teacher? Yes.”

      I think this means that Du Bois had trouble finding himself somewhere to teach, which was very discouraging.

    11. I was a Fisk student then, and allFisk men thought that Tennessee—beyond the Veil—was theirs alone,

      I think this means that Du Bois was a student at Fisk University, a historically black university.

    12. Thehill became steep

      The hill was a barrier and symbolized the hump that black people had to get them self over to be successful but few were able to climb the hill and get to the other side.

    13. “Oh,” thought I, “this is lucky”; but even then fell the awful shadow of the Veil, for they ate first,then I—alone

      The author is a black man so he must eat second to the white folk

    14. white teachers inthe morning, Negroes at night.

      Making it clear that this is in a place with racism present.

    15. Then I came to the Burkes’ gate and peeredthrough; the enclosure looked rough and untrimmed, and yet there were the same fences aroundthe old farm save to the left, where lay twenty-five other acres.

      I can infer that the author was happy to see that nothing had changed at the Burkes' house because it made him feel at home.

    16. In its place stood Progress; and Progress, I understand, isnecessarily ugly.

      I can infer that the author does not like seeing changes made to the places he's spent a lot of time at in the past. I think it makes him feel like the memories are being taken away as well.

    17. Josie grew thin and silent, yet worked the more.

      I can infer that Josie kept working even when she was thin and sick because she wanted to continue helping provide for her family in addition to her goal of obtaining higher education one day.

    18. I remember the day I rode horseback out to the commissioner’s housewith a pleasant young white fellow who wanted the white school.

      I can infer by the wording of this statement that the author is likely a black man himself.

    19. Josie told me of it; shewas a thin, homely girl of twenty, with a dark-brown face and thick, hard hair.

      I can infer based on the author's description that Josie is a young black girl.

    20. I was a Fisk student then, and allFisk men thought that Tennessee—beyond the Veil—was theirs alone,

      I can infer that the author lives in a small country town.

    1. The South ought to be led, by candid and honest criticism, to asserther better self and do her full duty to the race she has cruelly wrongedand is still wronging. The North—her co-partner in guilt—cannotsalve her conscience by plastering it with gold

      I think this means that the North and South, despite and because of both of their histories, must work equally towards the solution.

    2. for a few such institutions throughout the South to train the best of theNegro youth as teachers, professional men, and leaders.

      I think this means that society doesn't just need African American laborers, but they also need educated African American leaders in different areas (i.e. teachers and professional men).

    3. First, political power,Second, insistence on civil rights,Third, higher education of Negro youth,—and concentrate all their energies on industrial education, and accu-mulation of wealth, and the conciliation of the South.

      I think this means that in order to progress and advance, we must know when we have to take a step back or pause from our perusal.

    4. Then came thenew leader. Nearly all the former ones had become leaders by the silentsuffrage of their fellows, had sought to lead their own people alone, andwere usually, save Douglass, little known outside their race

      I think this means that some of the other African American leaders were not nearly as successful as Washington at achieving their own personal goals because they failed to reach those outside their race, working alone and not with others for their cause.

    5. and they eventually turned to theAbolition movement as a final refuge.

      I think this means that after the failed attempt at achieving equality as a freemen, many free African Americans moved onto focusing on Abolition. They hoped that in the process they would gain more freemen that desired the equality they could not achieve with fewer people.

    6. If the best of the AmericanNegroes receive by outer pressurea leader whom they had not recog-nized before, manifestly there is herea certain palpable gain

      I think black people sometimes didn't like Washingtons ideas because he made it seem like they should just stick to working rather than go out and try to be something that white men could only be at the time.

    7. When sticks andstones and beasts form the sole environment of a people, their attitude islargely one of determined opposition to and conquest of natural forces.

      I think this means that when people are strongly banded together, their first instinct is to fight against those who do not agree with them.

    8. hey cooperate with Mr. Washington asfar as they conscientiously can; and, indeed, it is no ordinary tribute tothis man’s tact and power that, steering as he must between so manydiverse interests and opinions, he so largely retains the respect of all

      Washington still has the respect of people because of the topics that he talks about

    9. Honest and earnest criticism fromthose whose interests are most nearlytouched,—criticism of writers byreaders,—this is the soul of democ-racy and the safeguard of modernsociety

      I think this means that criticism from those who are most impacted by one's thoughts is important because it leads to conversation and compromise (democracy).

    10. Washington, yet the prevailing public opinion of the land has been buttoo willing to deliver the solution of a wearisome problem into his hands,and say, “If that is all you and your race ask, take it.”

      I think this means that people were willing to work with Washington to find solutions because of the strong leadership qualities he possessed.

    11. And so thoroughly didhe learn the speech and thought of triumphant commercialism, andthe ideals of material prosperity, that the picture of a lone black boyporing over a French grammar amid the weeds and dirt of a neglectedhome soon seemed to him the acme of absurdities.

      I think this means that Washington put himself into the shoes of someone from the North in order to better understand and connect with those who inhabited the region, for he was already a man of the South.

    12. 1. The right to vote.2. Civic equality.3. The education of youth according to ability.

      Washington does not hold the same values as others on what is super important or what makes someone '"free"

    13. It startled the nation to hear a Negro advocating such a programmeafter many decades of bitter complaint

      I think this means that society expected that if any African American spoke out with ideas at the time, it would be involving complaints for more rights.

  3. Aug 2022
    1. This leads to duplicated effort and ultimately small differences between common interactions.

      How does it cause that?

    1. My main issue with mint was having to correct transactions multiple times. Do it one day, do it again the next, then it finally sticks.
    1. How do I turn off the requirement to have a lock screen?Today, I'm suddenly unable to use any Google related apps on my phone, because I am now REQUIRED to set up a lock screen on my phone. I get that you want to be super-secure for businesses using enterprise devices. I am not a business. I'm some guy who just happens to have a domain name. My only "employee" is me. I have a two email addresses: My real first name, and the shorter version that most people call me. I do NOT want a lock screen on my phone. I don't want to be forced to give myself permission to use apps on my phone. Why am I now required to add all this bull$%^? Nobody is hacking my interwebs. Give me a f#$%^& break! I don't need a lock screen. I've been using this account for everything (gmail, youtube, etc) for over five years now. I'm not interested in deleting it and going back to my gmail.com account. I'm also not interested in being forced to click multiple times just to use my phone. Let me disable it.So, how do I turn this garbage off?
  4. Jul 2022
    1. Rich link Add rich links that give your email messages more context and details at a glance.

      Oh waaaaw. How revolutionary.

    2. Edit a message You can edit a message for up to 15 minutes after sending it.2

      Just... Out of all the goddamned things to focus on lol.

    1. StarPterano I very vaguely remember happening upon StarPterano in my very first moments on Mastodon, so finding it still published on the App Store – buried as it was – brought me a particular sort of joy. If I’m not mistaken, it holds a special personal accolade as the only iOS app which has caused me to involuntarily shriek. This might sound like an insult, but it is actually the peak of my praise. I believe my knowledge of iOS development safely allows me to suppose that StarPterano was built with complete disregard for any established UI element libraries. That is, the familiar toggles and buttons developers rely on to standardize the iOS experience were cast aside entirely in favor of handbuilt, translucent buttons of a sort of neon quality which call menus and text entry fields no less alien to the platform. The most astonishing bit, though, is that it works. On my 12 Pro Max, it’s exceptionally smooth, in fact. I would imagine those real iOS developers among you should find StarPterano’s GitHub Repository particularly interesting, considering. In the interest of preservation, I have forked it as well, and fully intend to dive in to its code, one of these days. The audio player embedded above cites a three-second .mp3 file in the repository which perhaps once accounted for the “Sounds” toggle still found in the Settings menu of StarPterano’s current build. I couldn’t get the app to reproduce it, which is actually what set me on the hunt that led to the repo.

      I shall always love you, StarPterano. NEVER DIE.

    1. Stop autoclosing of PRs While the idea of cleaning up the the PRs list by nudging reviewers with the stale message and closing PRs that didn't got a review in time cloud work for the maintainers, in practice it discourages contributors to submit contributions. Keeping PRs open and not providing feedback also doesn't help with contributors motivation, so while I'm disabling this feature of the bot we still need to come up with a process that will help us to keep the number of PRs in check, but celebrate the work contributors already did instead of ignoring it, or dismissing in the form of a "stale" alerts, and automatically closing PRs.

      Yes!! Thank you!!

      typo: cloud work -> could work

    1. Many of the workers reported that first thing in themorning, or after any interruption in their thought(like a ‘phone call), they have the “where was 1?”problem in a complex and ill-defined space of ideas.The layout of physical materials on their desk givesthem powerful and immediate contextual cues torecover a complex set of threads without difilcultyand delay, “this is my whole context, these are mypersonal piles”

      Following interruptions by colleagues or phone calls at work, people may frequently ask themselves "where was I?" more frequently than "what was I doing?" This colloquialism isn't surprising as our memories for visual items and location are much stronger than actions. Knowledge workers will look around at their environments for contextual clues for what they were doing and find them in piles of paper on their desks, tabs in their computer browser, or even documents (physical or virtual) on their desktops.

    1. Documentazione

      Il problema di questa sezione è derubricare i modelli dati come documentazione. Le ontologie di ontopia (parlo di modelli non tanto di dati come i vocabolari controllati) sono machine-readable. Quindi non è solo una questione di documentare la sintassi o il contenuto del dato. È rendere il modello actionable, ossia leggibile e interpretabile dalle macchine stesse. Io potrei benissimo documentare dei dataset con una bella tabellina in Github o con tante tabelline in un bellissimo PDF (documentazione), ma non è la stessa cosa di rendere disponibile un'ontologia per dei dati. Rendere i modelli parte attiva della gestione del dato (come per le ontologie) significa abilitare l'inferenza che avete richiamato sopra in maniera impropria per me, ma anche utilizzarli per explainable AI e tanti altri usi. Questo è un concetto fondamentale che non può essere trattato così in linee guida nazionali. Dovrebbe anzi avere un capitolo suo dedicato, vista l'importanza anche in ottica data quality "compliance" caratteristica di qualità dello standard ISO/IEC 25012.

    2. Nel caso a), il soggetto ha tutti gli elementi per rappresentare il proprio modello dati; viceversa, nei casi b) e c), la stessa amministrazione, in accordo con AgID, valuta l’opportunità di estendere il modello dati a livello nazionale.

      Tutta la parte di modellazione dati, anche attraverso il catalogo nazionale delle ontologie e vocabolari controllati, sembra ora in mano a ISTAT, titolare, insieme al Dipartimento di Trasformazione Digitale di schema.gov.it. Qui però sembra AGID abbia il ruolo di definire i vari modelli. Secondo me questo crea confusione. bisognerebbe coordinarsi anche con le altre amministrazioni per capire bene chi fa cosa. AGID al momento di OntoPiA gestisce solo un'infrastruttura fisica.

    1. Rails 3 seems is ignoring my rescue_from handler so I cannot test my redirect below.

      I have similar problem too

      404 errors raise ActiveRecord::RecordNotFound to the test

  5. Jun 2022
    1. Between 1914 and 1980, inequalities in income and wealth decreasedmarkedly in the Western world as a whole (the United Kingdom,Germany, France, Sweden, and the United States), and in Japan,Russia, China, and India, although in different ways, which we willexplore in a later chapter. Here we will focus on the Western countriesand improve our understanding of how this “great redistribution”took place.

      Inequalities in income and wealth decreased markedly in the West from 1914 to 1980 due to a number of factors including:<br /> - Two World Wars and the Great Depression dramatically overturned the power relationships between labor and capital<br /> - A progressive tax on income and inheritance reduced the concentration of wealth and helped increase mobility<br /> - Liquidation of foreign and colonial assets as well as dissolution of public debt

    1. So, i started researching where the capitalization of said pronoun came from and was quite stunned to find that it was always capitalized because it always appeared as the first word in a sentence, never stuck in the middle. And then, when it started appearing in the middle, it started getting capitalized out of convention and because people worried that it would get lost in script. Of course, "It's odd, and a little unsettling, to reflect upon the fact that English is the only major language in which "I" is capitalized; in many other languages "You" is capitalized and the "i" is lower case" (journalist Sydney J. Harris).

      If it's true that English is the only major language in which "I" is capitalized instead of the more commonly capitalized "you", does this help to underline some of the self-centeredness show by most of the English speaking West?

    2. I was always bothered by the fact that the first person singular pronoun is capitalized in english - i always thought it was quite self-righteous.
    1. Le intestazioni di colonna devono essere auto-esplicative ed essere incluse nella prima riga del file CSV. Senza le intestazioni, è difficile per gli utenti interpretare il significato dei dati.

      Proprio a integrazione del commento di @aborusso direi che le intestazioni dovrebbero seguire le etichette dei concetti definiti nelle principali ontologie italiane di OntoPiA qualora il dato fosse già modellato. Esempio: "indirizzo completo" (proprietà full address dell'ontologia CLV-AP_IT) per indicare l'indirizzo completo presente in tantissimi dataset (aperti).

  6. May 2022
    1. "I'd want to learn a lot from Professor Zimmerman so that I may obtain as much information as possible and use it in reality. It's not about the work."

    2. "To summarize, I am prepared to conquer all hurdles in my path to achieving the career of my dreams so that I may contribute to my society. I am a firm believer in the concept of dreams coming true."

    1. "I didn't fully understand it at the time, but throughout my time as a freshman at Boston College I've realized that I have the power to alter myself for the better and broaden my perspective on life. For most of my high school experience, I was holding to antiquated thoughts that had an impact on the majority of my daily interactions. Throughout my life, growing up as a single child has affected the way am in social interactions. This was evident in high school class discussions, as I did not yet have the confidence to be talkative and participate even up until the spring term of my senior year."

    2. "Specifically, when one of my classmates stated how he was struggling with the concept and another one of my classmates took the initiative to clarify it, I realized that that individual possibilities vary greatly among students."

    3. "The need to engage with people in terms of evaluating them for the aim of acquiring a different point of view was one occasion this semester where the knowledge I received in class positively changed the way I approached an issue. I was patient enough to explore other perspectives, some of which disagreed with mine, so that I might learn about their opinions without bias or prejudice."

    1. I spent some time trying to figure out why I was receiving: GetProj4StringSPI: Cannot find SRID (4326) in spatial_ref_sys From my tests. Of course SELECT * FROM spatial_ref_sys returned 0 rows.

      I had this problem too

  7. Apr 2022
    1. Note though that restarts are an essential part of updating software, by refusing to restart when you apply an update you are risking having a less stable software running as well as postponing what could be security updates and putting yourself at risk. There is a reason software asks for restarts and you absolutely should respect that.

      Software should never force something on the user. The user should always be the one in complete control. You can warn of the risks, but let the human decide what is best for the human at this exact moment. For example, they may just need to look something up. It may be an emergency. They may have private tabs that would be lost if they restarted now, and they need to wait until a better time.

      It's no different than Windows or other OS updates.

      See also: https://askubuntu.com/questions/1398179/firefox-restart-required-how-to-disable

    2. Not saying that occasionally there isn't a "feature only" release, but 99% of the time, the updates have fixes and many times they are of a critical security nature. FF, like others, has a responsibility and lawsuits to avoid.
    1. All that can be forgiven, but not charging $10 USD for this bundle worsener (they dumped it very quick into shovelware game bundles). $10 gets you a lot of great games on Steam like Frostpunk, Metro and Skyrim, so it's impossible to ask anyone considers this against the competition.
    2. Boston AInamics (an unauthorised riff on the name of the robotics company, Boston Dynamics, I hope they sue)

      It's sufficiently different. Plays on other names should be permitted.

    1. lthough the individual organisms may do things that keep their bodies slightly below or above the environmental temperature. This can include burrowing underground on a hot day or resting in the sunlight on a cold day.

      Picture I (Johan Barron) made to show different thermoregulations, captioned with, if image cannot be found, use this website I uploaded it to https://gyazo.com/c8c85c489c5eb900d10192b558849df7 or https://utoronto-my.sharepoint.com/:i:/g/personal/johan_barron_mail_utoronto_ca/ETtDG01bl1tJmAv70a3Uf7wB1fyrcd2oFgr-GxPJig7xQw?e=CurpFX

      Figure 1.1 Differences in thermoregulation between an Endotherm (Oryctolagus cuniculus) and an Ectotherm (Lacertilia) during hot temperatures.

    1. assistive technology

      We should place the definition of Assistive Technology here: Assistive Technology is technology used by individuals with disabilities in order to perform functions that might otherwise be difficult or impossible.

  8. Mar 2022
    1. I found this counterintuitive because usually I try to make all my passwords, etc. different for each environment I have. I thought I would need to create a different master key for my production environment. No, I need to not create a different master key.
  9. Feb 2022
    1. I let yo upush me past the breaking point

      This suggests that the people around the speaker was helping her to overcome her personality problems and eventually it would disappear from the speaker’s thoughts.With her personality no longer a problem to her, she would be able to have her own freedom again.

    1. Ruby should not completely ignore blocks. const_set :Example, Class.new do p "Hello, world" end # Doesn't print anything, generate any warning nor error. To minimize any impact, Ruby should issue a warning, and in future version could even raise an error. Even unused variables provide warnings in verbose mode, and they have their use. I can't think of a case where passing a block to a builtin method that doesn't accept a block is not a programming error though.

      But since it can't be fixed generally, then just add a check in each core method that doesn't accept block, update its def to include a check.

      Where I've been bitten by this was some Enumerable method that I assumed took a block. I think it was first { cond }, and I assumed it worked the same as detect { cond }

  10. Jan 2022
    1. Des espaces inégalement intégrés

      Arg1: Certaines façades maritimes sont inégalement intégrées au processus de mondialisation

      • Concentration sur certains littoraux = pôles de M° Amérique du Nord, Europe, Asie de l'Est (16/20 ports) 11e: Rotterdam 17e: Los Angeles

      • Des Etats tentent de s'intégrer dans les échanges mondiaux Inde, Vietnam, Maroc = 3e terminal construit au port de Tanger.

      • certains espaces demeurent marginalisés isolation des principales routes maritimes (Amérique du Sud, Afrique) territoires enclavés = dépendance échange: PMA (République centre africaine), Afghanistan

    2. e tourisme de croisière

      Arg6: le tourisme de croisière reste un enjeu économique majeur

      • Un secteur en essor 2019 - 30M de personnes croisière Caraïbes, Mer Méditerranée, Asie Pacifique

      • Qui est marqué par une forte concurrence et de lours freins Multinationales: Carnival, Royal Caribbean, MSC Emissions CO2, risques accidents + COVID19: mauvaise réputation

    3. Les ressources génétiques marines

      Arg5: Les fonds marins regorgent de ressources génétiques marines

      • Le génome des espères sous marines constitue un enjeu commercial et scientifique algues: produits cosmétiques enzymes des éponges: lutte cancer (pharmacie, santé)
    4. Les ressources minérales

      Arg4: Les ressources minérales sont également très convoitées

      • les utilisations technologiques minerais: Cobalt, cuivre, nickel, or, diamant terres rares: cérium, scandium Nodules polymétalliques = hautes technologies (tel, odrinateurs)

      • jeu géopolitique dps 2010's fouilles Etat // monopole chinois Chine = 90% terres rares M

    5. Les ressources énergétiques

      Arg3: les ressources énergétiques sont également exploitées dans les Mers et les Océans

      • les hydrocarbures 30% hydrocarbures proviennent de gisements offshore Mer du Nord, Mer Caspienne, Golfe de Guinée, Golfe Arabo-persique, Mer de Chine méridionale

      espaces inexploités: conditions extrêmes (Arctique), fonds marins profonds = ++ pression (Brésil qui se lance dans l'exploitation d'hydrocarbures au dela du plateau continental)

      • les énergies renouvelables off shore Usines marémotrices: UM de la Rance (Côtes d'Armor, FR) Parcs éoliens off shore: projets aux îles de Lérons, Europe = 1er prod mondial électricité = 5000 éoliennes off shore (Mer du Nord ++)

      • les avancées scientifiques possibles Bathymétrie est mal connue = couts ++ 90% des espèces marines resteraient à découvrir

    6. Les ressources halieutiques Ŕ doc 1 p. 62 sur l’exploitation des ressources halieutiques

      Arg2: les ressources halieutiques constituent un enjeu économique majeur

      • La pêche et l'aquaculture subviennent aux besoins énergétiques et protéiniques de la population 1950 - auj = production halieutique*8 1950 - 2016 = 19M tonnes - 170M tonnes (dont 150M pour conso° humaine directe) 1980 - 2016 = 4,5M - 80M de tonnes prod° aquaculture

      • les ressources halieutiques sont exportées 27% prod° halieutique = int 143 Milliards $ = CA

      • des intérêts économiques vitaux pour les Etats 60M travailleurs = secteur de la pêche situations précaire = 95% des pêcheurs vivent en Afrique ou en Asie

    7. Selon l’OCDE, les mers et les océans rapportent chaque année près de 1500 milliards de dollars

      Les bénéfices économiques de l'économie bleue

      Economie bleue - Bertrand Blancheton, Introduction aux politiques économiques (2020)

      Mers et océans rapportent 1500 Milliards $/an 3000 Milliards en 2030 "Qui tient la mer tiens le commerce du monde, qui tient le commerce tient la richesse, qui tient la richesse tient le monde lui-même", Walter Raleigh => Halford Mackinder

    8. Argument 4 : Les espaces maritimes et les points de passage stratégiques : des zones sensibles menacées

      Arg 4: Les choke points et les EM sont menacés Pirtarie maritime 2018: 201 attaques // navires marchands 4000 attaques depuis 20 ans selon l'IRIS 330M $ de rançons en 7 ans = financement activités criminelles Golfe de Guinée Golfe d'Aden Asie du Sud (Bangladesh) Asie du Sud Est (Détroit de Malacca) Amérique du Sud (Bolivie et Venezuela) = 2 régions les + touchés => next to routes maritimes

    9. Argument 3 : Les routes maritimes, les points de passage stratégiques et les goulets d’étranglement : des espaces maritimes vitaux pour le commerce maritime

      Arg3: les enjeux vitaux des chokes points pour l'économie mondialisée et le CM Connecter espaces de prod°/conso° Espaces maritimes très réduits concentrent trafic maritime:

      • Canaux; Suez, Panama
      • Détroit, Ormuz, Gibraltar, Bab el Manbed, Bering, Malacca
      • Caps: Bonne espérance, Horn

      Détroit de Malacca selon Institut Supérieur d'économie marine (2017) 14M barils / jours Port Klang (Malaisie) = 12e port à conteneurs mondial "Dilemme de Malacca" selon Hu Jintao 20 - 25% du trafic mondial / an

      Dépendance = ouverture permanente des passages stratégiques Mauvaise situations: insécurité, piraterie, conflits, tensions géopolitiques sinon = perturber approvisionnement marchandises + matières premières = - économie mondiale EX: 1967 -> 1974 = pas Canal de Suez (G6jours) alternative = Cap de Bonne Espérance (+ temps, +argent)

    10. Argument 2 : La maritimisation renforce la littoralisation et le rôle des façades maritimes

      Arg2: Maritimisation = littoralissation + importance facades maritimes littoralisation: 60% pop in moins 60km côtes (3,6 Milliards hab) 14/16 aires urbaines

      **Secteurs économiques 1st = pêche 2nd = ZIP (Port de Pirée, Port de Marsaxlokk à Malte), accesibilité, entreprises de raffinages et sidérurgiques = matières premières Services = tourisme, aménités, héliotropisme, haliotropisme => stations balnéaires

      Rôle des ports: HUB dans le processus de M°

      • grande capacité portes conteneurs (1st = Shanghai Yangshan, St Expuéry par CMA CGM) MAIS nécessitent port adaptés (ports en eaux profondes de Kribi, espaces de stockage, portd de transbordement, plateformes intermodales: Port de Rotterdam)

      Rôle façades maritimes = lieu de concentration CMM Northern Range: Have - Hambourg Cote Est des EU: Nord de Boston - Miami Cote ouest des EU: Puget Sound - Californie Asie de l'Est et Japon: Tokyo - Singapour

    11. Argument 1 : L’accroissement du commerce maritime et l’accélération du processus de mondialisation renforcent le rôle central des espaces maritimes

      Arg1: CM + M = rôle des espaces maritimes ++

      90% marchandises et matières première

      • temps, - couts, + fiable
      • Grandes capacités portes conteneurs (CMA CGM Megamax // Ecounter Bay)

      Espaces maritimes inclus dans fluw et réseaux télécommunications = cables sous marins (1,2M km, 99% trafic intercontinental, 10T $/jour) trafics illicites: piraterie, narcotrafiquants

    1. Authentication by schemes outside of RFC2617 is not supported in HTTP status codes and are not considered when deciding whether to use 401 or 403.

      What does "are not considered when deciding whether to use 401 or 403" mean exactly? What exactly should not be considered, and what exactly should be considered instead? In other words, how did someone arrive at the conclusion that "if you have your own roll-your-own login process and never use HTTP Authentication, 403 is always the proper response and 401 should never be used."? Why is 403 okay to use for non-HTTP authentication, but not 401?

      Oh, I think I understand the difference now.

      They should have said:

      Authentication by schemes outside of (not defined by) RFC7235: Hypertext Transfer Protocol (HTTP/1.1): Authentication should not use HTTP status 401, because 401 Unauthorized is only defined (by current RFCs) by RFC7235: Hypertext Transfer Protocol (HTTP/1.1): Authentication, and has semantics and requirements (such as the requirement that "A server generating a 401 (Unauthorized) response MUST send a WWW-Authenticate header field containing at least one challenge.") that simply don't make sense or cannot be fulfilled if using a non-HTTP authentication scheme.

      403 Forbidden, on the other hand, is defined by the broader HTTP standard, in RFC7231: Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content and RFC7235: Hypertext Transfer Protocol (HTTP/1.1): Authentication.

      In conclusion, if you have your own roll-your-own login process and never use HTTP Authentication, 403 is always the proper response and 401 should never be used.

      See also my comments in https://hyp.is/p1iCnnowEeyUPl9PxO8BuQ/www.rfc-editor.org/rfc/rfc7235

    2. FORBIDDEN: Status code (403) indicating the server understood the request but refused to fulfill it. User/agent known by the server but has insufficient credentials. Repeating request will not work, unless credentials changed, which is very unlikely in a short time span.
    3. UNAUTHORIZED: Status code (401) indicating that the request requires authentication, usually this means user needs to be logged-in (session). User/agent unknown by the server. Can repeat with other credentials. NOTE: This is confusing as this should have been named 'unauthenticated' instead of 'unauthorized'.
    1. If the ticket is incorrect or damaged, you cannot even go through the airport security: when they check your ticket, it will be refused. You are Forbidden to enter the boarding area of the airport.

      It depends what we mean by "incorrect"/damaged "credentials ("ticket")...

      A. If they are invalid or incorrect in the sense that we can't authenticate them as anyone (as it sounds like you mean with "incorrect" or "damaged") (they're not a user in our database or the password doesn't match a user in our database), then you should actually use 401, meaning that the client can/should try (again) to authenticate with different credentials.

      B. But if by "incorrect" you mean (as it sounds like you mean with "you cannot even go through the airport security: when they check your ticket, it will be refused") that the credentials were valid enough to authenticate you as someone (a user in our database), but that (known( user has insufficient credentials, then correct, it should be a 403 forbidden.

      It's even easier to explain / think about if you just think of 401 as being used for any missing or failed authentication. See:

  11. Dec 2021
    1. So, underscores are not quite as good as spaces. They’re a compromise of language, readability, and semantics, but they’re the best we’ve got. Better than dashes, CamelCase, plus+signs, or anything else. So use them.
    2. The “use spaces, or else fall back on quotes” system is just silly.
  12. Nov 2021
    1. Could someone guide me how to set up chromedriver with selenium using chromium flatpak properly? I can't seem to find any tutorial doing it like this... I never had issues with chromedriver using the "old" sudo apt way and I also got it working using snapd. But since I am using Pop!_OS I'd like to just use flatpaks if there is no sudo apt repo.
  13. Oct 2021
    1. The issue seems to be that when there are multiple layouts configured, VS Code sets as key layout the first value for layout form setxkbmap -query, ignoring the current layout. If I switch to be en,de then VS Code uses the EN layout, as it is the first in the list. It would be handy if VS Code could use the current layout instead of the first from the list.
    1. Its life out of its center enters into a relationship to it; the reflexive character of the centrally represented body is given to itself. Although the living being on this level is also absorbed in the here/now, lives out of the center, it has become conscious of the centrality of its existence. It has itself; it knows of itself; it notices itself -- and this makes it an I. (pp. 269-70)

      The "I" is born when the living being has become conscious of the centrality of its existence. It notices itself.

  14. Sep 2021
    1. I feel like that is a very broad generalization but I would agree that most people have read something about technology. I'm also not sure if I agree that learning devices enhance learning outcomes for kids. I know there have been studies done that say if you use pencil and paper to write your notes, you are more likely to remember information.

    1. Does this daemon benefit me in anyway or is it only used for mismatched resolutions like 1440p with a 1080p display?
    1. If you want to check that the "usual" resolution is working (i.e. the way specified in /etc/nsswitch.conf) you can use getent: getent hosts www.winaproduct.com
    1. t's also why it is so annoying to people who actually know what they are doing, when randomly the browser decides to take over a function provided for decades by the OS network stack, and with no notice start bypassing all the infrastructure they set up to their liking (like your hosts file) and funelling all their browsing habits to some shady company (Cloudflare).
    2. The whole point of DoH in firefox is to not depend on the OS like windows. And it is the OS, which implements the hosts file mechanism.
    1. Therefore, Firefox already contains the code to look in the hosts file, but it does things in the wrong order: 1. Look up the URL in the DNS server if not found: 2. Send the URL to the default search engine as a search term if not found: 3. Look in the hosts file

      incorrect behavior

    2. The entries in the hosts file are obviously not on a DNS server. Setting the keyword.enabled option FALSE by itself should only turn off the feature that uses the address field as a search field. It would not give Firefox an additional ability that it did not have before.
    3. Firefox ignores the presence of the hosts file, never using it to resolve a URL.
    1. Turns out, you have to use Alt+` to switch between windows of the same applications.
    2. if you have 3 windows of the same web browser application running, Alt+Tab won’t let you switch between those windows
    1. I have never seen the @Stale bot or any directly equivalent to it achieve a net positive outcome. Never. It results in disgruntled people, extra expenditure of effort (for reporters and maintainers), real stuff getting lost when people get fed up with poking the bot (I have no intention of poking it further), and more extensive filing of duplicates. You say a simple comment dismisses it, but it doesn’t—it only does this time. Next time, it continues to annoy. This is an issue tracker. Use labels, projects, milestones and the likes for prioritising stuff. Not sweeping stuff under the carpet.
    2. Closing issues doesn’t solve anything. Closing issues in GitHub just sweeps them under the carpet and helps everyone to forget about them, which is just not what you want—the fact that GitHub search excludes closed items by default is a large part of the problem with it. As applied to software projects with general-purpose issue trackers, the @Stale bot is fundamentally phenomenally bad idea, a road paved with good intentions. I presented an actionable alternative: labels. Possibly automatically applied, but it’s certainly better to spend a little bit of time on manual triage. It honestly doesn’t take long to skim through a few hundred issues and bin them into labels. 609 open issues? That’s honestly not a problem. Not at all. There’s nothing wrong with having a large number of issues open, if they do correspond to real things—even things that you may not expect to get to for years, if ever, because that might change or someone might decide they want to deal with one. Closing issues that aren’t dealt with is bad. Please don’t do it.
    1. Update API usage of the view helpers by changing javascript_packs_with_chunks_tag and stylesheet_packs_with_chunks_tag to javascript_pack_tag and stylesheet_pack_tag. Ensure that your layouts and views will only have at most one call to javascript_pack_tag or stylesheet_pack_tag. You can now pass multiple bundles to these view helper methods.

      Good move. Rather than having 2 different methods, and requiring people to "go out of their way" to "opt in" to using chunks by using the longer-named javascript_packs_with_chunks_tag, they changed it to just use chunks by default, out of the box.

      Now they don't need 2 similar but separate methods that do nearly the same, which makes things simpler and easier to understand (no longer have to stop and ask oneself, which one should I use? what's the difference?).

      You can't get it "wrong" now because there's only one option.

      And by switching that method to use the shorter name, it makes it clearer that that is the usual/common/recommended way to go.

    1. thecitizen, forever active, sweats, bustles about, constantly frets to seek ever morelaborious tasks: he works to death, he even runs toward it in order to be in aposition to live, or he renounces life in order to acquire immortality. He courtsthe great he hates and the rich he despises; he spares nothing to obtain the honorof serving them; he boasts proudly of his baseness and of their protection and,proud of his slavery, he speaks with contempt of those who do not have thehonor of sharing it.

      YESSIRRRRR THIS SHIT RIGHT HERE.

    2. his precious freedom, which is maintained by large nations onlythrough exorbitant taxes, costs you almost nothing to preserve

      wait so freedom is paid for by large taxes for the community, that basically cost nothing? I suppose what is the money value of happiness? Can it be quantified? would people be willing to give up their own power and control (money) to the greater good in pursuit of happiness?? Many people are very selfish... Perhaps those with money only want to use their money to explore their passions and not share with those they feel haven't earned it. BUt how can we say one individual has earned more than another when we are born in different situations. When the climb is much longer and steeper for those born into poverty, than those born into wealth. For the impoverished, how can one flourish when they're focused on staying alive? For the wealthy, how can one flourish when they're preoccupied with all their wealth and access to all the material pleasures of the world?

    3. For freedomis like those hearty and succulent foods or those full-bodied wines which are fitfor nourishing and fortifying robust temperaments which are accustomed tothem, but which overwhelm, ruin, and intoxicate those weak and delicatetemperaments which are not up to them.

      poetic mf

    4. I would have chosen a society of a sizelimited by the extent of human faculties—that is, by the possibility of being wellgoverned—and where, each person being up to his task, no one was compelledto entrust others with the functions with which he was charged; a state where, allindividuals knowing one another, neither the obscure maneuvers of vice nor themodesty of virtue could be hidden from the public’s notice and judgment, andwhere that sweet habit of seeing and knowing one another made love of thefatherland a love of the citizens rather than love of the soi

      Basically imagining a society where everyone works together for the greater good of each other. Where we aren't just putting our trust (AND POWER) in the hands of others. Where we know each other well enough that we aren't separated by our power. Where no wrongdoing can be hidden from public notice or judgement because we all understand whats going on. Love for one another,not just the soil we live on. NO BOURGOIS

    5. For regardless of what the constitution of agovernment may be, if there is a single man5 who is not subject to the law, all theothers are necessarily at his discretion (I

      oof

    1. WARNING in ./app/javascript/components/ComponentLibrary/Docs/Intro.md Module parse failed: Unexpected character '#' (1:0) You may need an appropriate loader to handle this file type.
    1. Users think every Webpack tool/config problem is a problem with a specific package and opens an issue asking for support on the package instead of Webpack. In the past year alone, I’ve had to deal with hundreds of Webpack issues on my repos.
  15. learn-eu-central-1-prod-fleet01-xythos.s3.eu-central-1.amazonaws.com learn-eu-central-1-prod-fleet01-xythos.s3.eu-central-1.amazonaws.com
    1. the primary causes of extreme poverty are immaterial, theylie in certain deficiencies in education, organization, and discipline”(p. 159). Poorcountries, in his view, did not need more technology or physical infrastructure ormore foreign aid to eliminate poverty.
    1. Usually you get this error if you change your password by some other means which fails to update the password for the keyring.
    1. Indeed yes, but sometimes it is necessary to change one's password, even if one is not 'mucking about with' or 'tweaking' or 'customising' any other system settings.
    2. It seems to me (N.b. what do I know about this? Nothing!) that the best solution would be to tweak the 'Change Password' process so that it also updates the 'Passwords and Keys'>Passwords>Login folder's properties.

      "I'm not an expert, but it seems to me..."

  16. Aug 2021
    1. But for this approach we fear the performance impact of creating iframes via JavaScript -- the html iframe would be rendered and loaded before the script would even start to execute.
    1. The problem is that, with the literal types, the includes call now gives a type error: // Error: Argument of type number is not assignable to 1 | 2 | 3 if(!legalValues.includes(userValue)) { throw new Error("..."); }
    1. function strictIsDog<T extends Dog extends T ? unknown : never>( // like <T super Dog> candidate: Dog | T // if Dog extends T then Dog | T is T ): candidate is Dog { // compiler recognizes that Dog | T can narrow to T return "bark" in candidate; } if (strictIsDog(animal)) {} // okay if (strictIsDog(dog)) {} // okay if (strictIsDog(mixed)) {} // okay if (strictIsDog(cat)) {} // error! // ~~~ <-- Cat is not assignable to Dog
    1. Adding to the accepted answer, if you happen to need to use a type guard against a mixin, you'll get this error too, since the is operator doesn't behave as an implements would.
    2. the generic means "give me one of each function a -> Boolean" so if any of those functions doesn't exist, then the generic doesn't exist.
    1. In the vast majority of cases when I'm using prettier-ignore I'm only really looking to prevent it from breaking my code into new lines, whilst keeping its other transformations such as switching quotes and adding space between brackets. When ignoring single lines, fixing these formatting problems by hand is very manageable. With the ability to have Prettier ignore entire blocks of code I think the ability to specify what you want it to ignore is essential.
    1. When writing about programming, I prefer to use 'annotation' as the general term. Although .NET was first, the word 'attribute' is just too widely used for different things.
    1. Now some people may just say “Pffft… just get up earlier and do it”. Clearly those people don’t understand how much I love to get up as late as I can afford in the mornings, those moments between asleep and ‘Fuck, I have to go to work’ are few, and precious my friends.

      I resemble this remark...

    1. 要给程序员这样的灵活性,Go必需支持指向分配在堆中对象的指针,我们将这种指针称为内部指针。上文的例子中X.buff字段保存于struct之中,但也可以保留这个内部字段的地址。比如,可以将这个地址传递给I/O子程序。在Java以及许多类似的支持垃圾回收的语音中,不可能构造象这样的内部指针,但在Go中这么做很自然。这样设计的指针会影响可以使用的回收算法,并可能会让算法变得更难写,但经过慎重考虑,我们决定允许内部指针是必要的,因为这对程序员有好处,让大家具有降低对(可能实现起来更困难)回收器的压力的能力。到现在为止,我们的将大致相同的Go和Java程序进行对比的经验表明,使用内部指针能够大大影响arena总计大型、延迟和回收次数。
  17. Jul 2021
    1. Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues. If you have found a problem that seems similar to this, please open a new issue.
  18. Jun 2021
    1. As you can see Rails already adds error messages from associated models and doing it wrongly: Merging together errors from different models under same has_many association. :"employments.company"=>["can't be blank"] And this is wrong.
    2. I have been waiting for a solution for this quite a while now.
    1. As aforementioned, the usage of master as a branch most likely originated from the first meaning

      The meaning:

      An original recording, film, or document from which copies can be made.

      makes more sense to me. Why would they have meant the other meaning?

    2. I'm not sure if there's any cost in terms of contributing either, especially when by design git can have any branch as default, and will not hinder your experience when you use something other than master.

      git is neutral/unbiased/agnostic about default branch name by design

      And that is a good thing

    3. Forcing people out of the habit to assume this branch would be called master, is a valuable lesson.
    4. The primary branch in git can have any name by design.
    1. Once a variable is specified with the use method, access it with EnvSetting.my_var Or you can still use the Hash syntax if you prefer it: EnvSetting["MY_VAR"]
    1. I am not sure if this is an improvement. To me it does not seem very pretty. Of course I am biased since I also prefer () in method definitions if they have arguments; although I think it is fine that ruby does not mind omitting the (). For my brain, I like the () for visual separation.
    1. a principle I use is: If you have an accessor, use the accessor rather than the raw variable or mechanism it's hiding. The raw variable is the implementation, the accessor is the interface. Should I ignore the interface because I'm internal to the instance? I wouldn't if it was an attr_accessor.
    2. But what's the matter with "raw" instance variables? They are internal to your instance; the only code that will call them by name is code inside pancake.rb which is all yours. The fact that they start with @, which I assume made you say "blech", is what makes them private. Think of @ as shorthand for private if you like.

      I agree / like that: @ is just shorthand for private.

      But OP clarified in a comment that the @ itself is not what they disliked: it was the accessing data directly instead of going through an accessor method.

      The raw variable is the implementation, the accessor is the interface. Should I ignore the interface because I'm internal to the instance?

    3. One of the consequences (although arguably not the primary motivation) of DRY is that you tend to end up with chunks of complex code expressed once, with simpler code referencing it throughout the codebase. I can't speak for anyone else, but I consider it a win if I can reduce repetition and tuck it away in some framework or initialisation code. Having a single accessor definition for a commonly used accessor makes me happy - and the new Object class code can be tested to hell and back. The upshot is more beautiful, readable code.

      new tag?:

      • extract reusable functions to reduce duplication / allow elegant patterns elsewhere
    4. (I think you need a better name than private_accessor though)
    1. I don't think this warrants adding to the Array class, since it's not generalizable to all the types that Arrays can contain.

      You could say the same thing about Array#sort. It can cause an error if elements of the array aren't all of the same type/shape. Just make sure it's safe to use first, and thenArray#sort, Array#sum, Array#average, ... are all quite handy and useful to have on Array class.

    2. I don't think it is too clever. I think it solves the problem idiomatically. I.e., it uses reduce, which is exactly correct. Programmers should be encouraged to understand what is correct, why it is correct, and then propagate. For a trivial operation like average, true, one doesn't need to be "clever". But by understanding what "reduce" is for a trivial case, one can then start applying it to much more complex problems. upvote.
    3. Thanks, this was just what I was looking for! This is a perfect appropriate use of instance_eval. I do not understand the nay-sayers. If you already have your array in a variable, then sure, a.reduce(:+) / a.size.to_f is pretty reasonable. But if you want to "in line" find the mean of an array literal or an array that is returned from a function/expression — without duplicating the entire expression ([0,4,8].reduce(:+) / [0,4,8].length.to_f, for example, is abhorrent) or being required to assign to a local, then instance_eval option is a beautiful, elegant, idiomatic solution!!
    4. instance_eval lets you run the code while only specifying a once, so it can be chained with other commands. I.e. random_average = Array.new(10) { rand(10) }.instance_eval { reduce(:+) / size.to_f } instead of random = Array.new(10) { rand(10) }; random_average = random.reduce(:+) / random.size
    5. I don't know, using instance_eval this way just seems weird, and it has a lot of gotchas associated with it that make this approach a bad idea, IMO. (For example, if you tried to access and instance variable or a method on self inside that block, you'd run into problems.) instance_eval is more for metaprogramming or DSL.

      But that's exactly when/why you'd use it: to make self refer to the instance! Just learn that and you'll be fine. You can still access locals from outside the block. And if you need to access instance variables/methods of a different instance, then sure, it's probably a sign you shouldn't be using instance_eval here.

    6. I agree, don't use this in your application code.
    1. This is a blocker for me as well, as I don't really understand how to interact with my backend while it's not implemented within sveltekit and uses cookie-based authentication.
    2. I don't really want to re-implement all of my api endpoints to make this work. Is there a way to "mask" the thirdparty endpoints to pass through the cookies?