281 Matching Annotations
  1. Last 7 days
    1. “I came to Rust from Haskell, and I feel that Haskell is a very elegant and safe language. The biggest differentiator for me is that there is a greater difference between high-performance code and idiomatic ‘clean’ code in Haskell than in Rust. Most Rust code looks like most other Rust code, even when it performs well. Haskell can become unfamiliar real quick if someone is operating under different libraries and goals from what you are typically doing. Small differences in syntax can result in huge differences in behavior, and Rust has more uniformity on that axis.”
  2. Jul 2020
    1. The key to successfully creating reusable components using both render props and scoped slots is being able to correctly separate behavior from presentation. Each time you create a new UI component, think “What is the core behavior of this component? Can I use this anywhere else?”
    1. In your environment you may want to always configure internationalization, routers, user data etc. If you have many different React roots it can be a pain to set up configuration nodes all over the place. By creating your own wrapper you can unify that configuration into one place.
    1. prevent its disclosure to any person not authorized to create the subscriber's digital signature

      So the signature can be used by another entity to create the digital signature if authorized beforehand.

      So if there is a statement that "I authorize [organization] to create a cryptographic key-pair on my behalf, and create the digital signature."

    1. Acknowledgments

      ”Blasphemy” and “irony” are mentioned--and continued through Kafer--to connote less math and masculinity and more--frankly--code, spoken from reclaimed empowerment. I couldn’t digest Haraway’s prose--within the coming Information Age she concentrates a lot of terms like machine parts herself--”Star Wars,” “Magic Mountain,” even “goddess” (Haraway 57). I wished for her own Dictionary.com to identify what these references meant to her.

      Did she mean to confound us for shock-factor’s sake? Because within her text that I could decipher I felt a postgendered, post-species, colorblind coalition that I couldn’t fully find affinity within, as much as the vague image of the Cyborg tantalizes me. For unity did she mean to catalyze divisiveness through language?

  3. Jun 2020
    1. Garantir le respect des droits de l’enfant Recommandation 2Le Défenseur des droits recommande l’inscription, dans le code de l’éducation et le code de l’action sociale et des familles, de l’interdiction de tout châtiment corporel ou traitement humiliant à l’égard des enfants
    1. What would be nice is if JavaScript had a built-in way to do what I can do in Ruby with:

      > I18n.interpolate('Hi, %{name}', name: 'Fred')
      => "Hi, Fred"

      But to be fair, I18n comes from i18n library, so JS could just as easily (and I'm sure does) have a library that does the same thing.

      Update: Actually, you can do this in plain Ruby (so why do we even need I18n.interpolate?):

      main > "Hi, %{name}" % {name: 'Fred'}
      => "Hi, Fred"
      main > ? String#%
      From: string.c (C Method):
      Owner: String
      Visibility: public
      Signature: %(arg1)
      Number of lines: 9
      Format---Uses str as a format specification, and returns the result
      of applying it to arg. If the format specification contains more than
      one substitution, then arg must be an Array or Hash
      containing the values to be substituted. See Kernel::sprintf for
      details of the format string.
         "%05d" % 123                              #=> "00123"
         "%-5s: %016x" % [ "ID", self.object_id ]  #=> "ID   : 00002b054ec93168"
         "foo = %{foo}" % { :foo => 'bar' }        #=> "foo = bar"

      I guess that built-in version is fine for simple cases. You only need to use I18n.translate if you need its more advanced features like I18n.config.missing_interpolation_argument_handler.

    1. I was just expressing that, even thought I like React, I dread having to still manually handle everything, instead of just using a directive, a la Vue.JS. This is what I consider boilerplate. Hence my comment on how I could leave React for Svelte just because of that. Clearly a Svelte side-by-side code comparison shows a much cleaner code for Svelte.
    1. Aujourd’hui, pour les seuls code pénal et code du travail, on atteint en France 25 critères21, et jusqu’à 30 si l’on considère d’autres codes (code de l’assurance maladie, de l’éducation...)
    1. This is the first post of the Disassembling Rails series. What I want to do is to give you a general idea about how Rails' components interact with each other when you use its functionalities (like fragment caching).

      I like the term "Disassembling"...

  4. May 2020
    2. if [ -z "${DOCKER_HOST:-}" ]; then if _should_tls || [ -n "${DOCKER_TLS_VERIFY:-}" ]; then export DOCKER_HOST='tcp://docker:2376' else export DOCKER_HOST='tcp://docker:2375' fi fi
    1. if [ -n "${DOCKER_HOST:-}" ] && _should_tls; then export DOCKER_TLS_VERIFY=1 export DOCKER_CERT_PATH="$DOCKER_TLS_CERTDIR/client" fi
    2. if [ -z "${DOCKER_HOST:-}" ] && [ ! -S /var/run/docker.sock ]; then if _should_tls || [ -n "${DOCKER_TLS_VERIFY:-}" ]; then export DOCKER_HOST='tcp://docker:2376' else export DOCKER_HOST='tcp://docker:2375' fi fi
    1. There are no plans to deprecate the REST API. To reduce the technical burden of supporting two APIs in parallel, they should share implementations as much as possible.
    1. Docker 19.03 does this automatically # by setting the DOCKER_HOST in # https://github.com/docker-library/docker/blob/d45051476babc297257df490d22cbd806f1b11e4/19.03/docker-entrypoint.sh#L23-L29
    1. REM This file was produced by typing in a listing from appendix B of Hugh Burns' thesis,

      Topoi program in BASIC

    1. We have come to a place where thanks to many libraries and frameworks, and overall improving software, what would’ve once used many developers to build from scratch is now more often than not, a bunch of people plumbing different things together. Software is creating software faster than we can use it. This is also why you are seeing so many of these “no-code” or “low-code” solutions pop up all over the place. There are increasingly fewer reasons to write code, and those who are writing code should, and do, increasingly write less of it. This will only be more accelerated by shifting to remote work due to how it’s going to change how we decide what code to write.

      There are increasingly less reasons to write code, so less code should be written.

      How Can relates this to remote work is unclear to me here.

    2. Anyone who’s spent a few months at a sizable tech company can tell you that a lot of software seems to exist primarily because companies have hired people to write and maintain them. In some ways, the software serves not the business, but the people who have written it, and then those who need to maintain it. This is stupid, but also very, very true.

      A company with a software development team writing its own software often creates inertia for itself. They will be biased to write software, because they have that capability – not because it's necessary.

    1. Jones did make one change, adding a question that asked students to reflect on their experience during the pandemic, and how it will shape their approach to studying family history.

      reflection questiğon about pandemic could be important for med students and may change their approach to exam and honor code also. people who think they have a free will, act more ethical compared to who doesn't.

    1. Code Owners allows for a version controlled single source of truth file outlining the exact GitLab users or groups that own certain files or paths in a repository.
    1. It should be possible to implement the functionality of page-translator via a more popular extension that is designed to inject arbitrary data into websites, including remote code, e.g. https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ .
    1. Add-ons are not allowed to contain obfuscated code, nor code that hides the purpose of the functionality involved. If external resources are used in combination with add-on code, the functionality of the code must not be obscured.
    1. Mozilla can still block distribution of the extension, even when not distributed via ADO. It is not possible for us to provide Mozilla the unminified JavaScript source files for Google’s and Microsoft’s translation widgets. This is a risk because Mozilla can demand such.
    2. Mozilla does not permit extensions distributed through https://addons.mozilla.org/ to load external scripts. Mozilla does allow extensions to be externally distributed, but https://addons.mozilla.org/ is how most people discover extensions. The are still concerns: Google and Microsoft do not grant permission for others to distribute their "widget" scripts. Google's and Microsoft's "widget" scripts are minified. This prevents Mozilla's reviewers from being able to easily evaluate the code that is being distributed. Mozilla can reject an extension for this. Even if an extension author self-distributes, Mozilla can request the source code for the extension and halt its distribution for the same reason.

      Maybe not technically a catch-22/chicken-and-egg problem, but what is a better name for this logical/dependency problem?

  5. Apr 2020
    1. n the near future, given the increase in the use and profile of preprintservers, and alternative publishing platforms such as F1000 Researc
      • Di sini kami memperlihatkan manfaat preprint dengan keleluasaanya (tanpa batasan format, ukuran, jenis berkas dll) akan memberikan dorongan bagi peneliti untuk mempublikasi data dan metode (misal kode program).

      • Ada banyak platform berbagi kode (seperti Github dan Gitlab) yang membuka banyak pintu keterbatasan saat penulis ingin membagikan kode program.

      • Platform-platform ini juga mendukung proses berbagi dokumen dan data yang cari (fluid), karena semua orang dapat dengan mudah menggandakan (forking melalui perintah git clone) proyek seseorang untuk kemudian digunakan, dimodifikasi, dan pada akhirnya mungkin mereka meminta kreator orisinalnya untuk memasukkan modifikasi menjadi versi baru dari kode program.

      • Hebatnya semua proses itu tercatat dengan hubungan antara repositori dan akun yang jelas terlihat.

  6. Mar 2020
    1. Clicking through to the photo, there is no mention of this image appearing on this important announcement. Perhaps the author privately contact the photographer about using his image. Since Ken Doctor is so incredible with his media experience (i’m being serious), I’m fairly certain someone from his team would have contacted the photographer to give him a heads up.

      I'm sure I've said it before, but I maintain that if the source of the article and the target both supported the Webmention spec, then when a piece used an image (or really any other type of media, including text) with a link, then the original source (any website, or Flickr in this case) would get a notification and could show—if they chose—the use of that media so that others in the future could see how popular (or not) these types of media are.

      Has anyone in the IndieWeb community got examples of this type of attribution showing on media on their own websites? Perhaps Jeremy Keith or Kevin Marks who are photographers and long time Flickr users?

      Incidentally I've also mentioned using this notification method in the past as a means of decentralizing the journal publishing industry as part of a peer-review, citation, and preprint server set up. It also could be used as part of a citation workflow in the sense of Maria Popova and Tina Roth Eisenberg's Curator's Code<sup>[1]</sup>set up, which could also benefit greatly now with Webmention support.

    1. The taxi industry is an excellent choice for startups. The one with traditional business in the taxi industry, it is the ideal time to digitize.So, if you’re planning to develop an app like Uber, Contact us to get the best solution. You can even buy our Uber clone script or just get a customized solution from us.

      The taxi industry is an excellent choice for startups. The one with traditional business in the taxi industry, it is the ideal time to digitize.

      So, if you’re planning to develop an app like Uber, Contact us to get the best solution. You can even buy our Uber clone script or just get a customized solution from us.

    1. Don’t go to code academy, go to design academy. Be advocates of the user & consumer. It’s not about learning how to code, it’s about translating real-world needs to technological specifications in just ways that give end users agency and equity in design, development and delivery. Be a champion of user-centric design. Learn how to steward data and offer your help.
    1. ActionController and ActionMailer default include AbstractController::Rendering directly or indirectly (ActionController::Metal::Rendering). AbstractController::Rendering uses ActionView as default library for its template rendering engine and includes AbstractController::ViewPaths and an instance of I18n proxy to find localized views. To learn more i'd like to refer to the ActionPack source code on github. To get to the point. ActionView allows you to use localisation in your templates: See Rails guide: Action View Overview , Chapter Localized views.

      Not a very detailed or good code dissection, but is kind of one.

    1. it comes down to opportunities for code reuse. Will your system re-use more code if you use WordPress and its very usable admin area, myriad of available plugins and themes? Or can you re-use more code by harnessing the object-oriented design, DSLs and good software development practices mecca that is Ruby, Rails and the available libraries and tools?
  7. Feb 2020
    1. We believe load test scripts should be plain code to get all the benefits of version control, as opposed to say unreadable and tool generated XML.

      Saw another comment lamenting the use of ugly/unreasonable XML files:


      Tired of using the JMeter GUI or looking at hairy XML files?

    2. DevOps has taught us that the software development process can be generalized and reused for dealing with change not just in application code but also in infrastructure, docs and tests. It can all just be code.
  8. Jan 2020
    1. When we don’t feel confident in our code, it is tempting to attach our sense of self-worth and professional pride to something that can be measured.

      Great code related quote by Dan Abramob

    1. use the services of the OpenETC

      What would constitute a full list of the services of OpenETC? Is it just this website, or does it include email lists, chat rooms, a Slack room, other services? The CoC should apply to all these areas listed.

      (Original annotation at https://boffosocko.com/2020/01/10/code-of-conduct-openetc/#use%20the%20services%20of%20the%20OpenETC)

    2. Guidelines

      These are some generally useful guidelines, but it would be nice to have a section on where to go or who to contact for help and conflict resolution. What should someone who notices a violation do? Where should they turn for help?

      (Original annotation at https://boffosocko.com/2020/01/10/code-of-conduct-openetc/#Guidelines)

    3. Temporary access

      Large portions of the material below this read more like a Terms of Service than a Code of Conduct. It might be more useful to split these into two pages to better delineate the two ideas.

      (Original annotation at https://boffosocko.com/2020/01/10/code-of-conduct-openetc/#Temporary%20access)

    4. draft of the proposed OpenETC code of conduct

      When making a CoC, it's always nice to spend some time researching others.

      Here's a copy of the IndieWeb's CoC, which I've liked. They also documented a list of other CoC's for other communities that might be worth looking at as well. Most of them have licenses for ease of cutting/pasting for reuse.

      I don't see a license on this draft, but it would be nice if you provided a CC0 license for it.

      (Original annotation at https://boffosocko.com/2020/01/10/code-of-conduct-openetc/#draft%20of%20the%20proposed++1)

    1. I was going through the source for Thin and noticed that instead of using require, Marc-Andre Cournoyer was using a method called autoload to load thin's constituent parts.
  9. Dec 2019
    1. // reduce() without initialValue [ { x: 22 }, { x: 42 } ].reduce( maxCallback ); // 42 [ { x: 22 } ].reduce( maxCallback ); // { x: 22 } [ ].reduce( maxCallback ); // TypeError // map/reduce; better solution, also works for empty or larger arrays [ { x: 22 }, { x: 42 } ].map( el => el.x ) .reduce( maxCallback2, -Infinity );
    1. It allows the module code (and subsequently dependants on the module) to not use preprocessor hacks, source code changes, or runtime detection hacks to identify which code is appropriate when creating a client bound package.
    2. It allows your source code to remain clean and free of hacks.
    3. The browser field is where the module author can hint to the bundler which elements (other modules or source files) need to be replaced when packaging.
    4. When a javascript module is prepared for use on a client there are two major concerns: certain features are already provided by the client, and certain features are not available. Features provided by a client can include http requests, websockets, dom manipulation. Features not available would include tcp sockets, system disk IO.
    5. You can simply prevent a module or file from being loaded into a bundle by specifying a value of false for any of the keys. This is useful if you know certain codepaths will not be executed client side but find it awkward to split up or change the code structure.
    1. Do the technical administrators have to be the same people doing the social organizing? I think the answer as of June 2019 is, sadly, yes. If you have 2 people with root access to the server and 2 people managing the community aspects, you'll end up with imbalances in that group of 4. You will end up with technical administrators who feel like code monkeys who never get the gratitude that the community organizers get, or you'll end up with community organizers who feel like glorified babysitters while the techies have all the real power. You might even end up with a situation where both are true. I think that if you're dedicated to this sort of project though, you could start with something like that 2 and 2, and then the techies could teach the organizers the technical skills, and the organizers could teach the techies the organizing skills.
    1. First sighting. First time I've seen a literal, non-whitespace character (┊) used to show indentation. Looks pretty nice. But breaks copy-and-pastability.

  10. Nov 2019
    1. const setRefs = useRef(new Map()).current; const { children } = props; return ( <div> {React.Children.map(children, child => { return React.cloneElement(child, { // v not innerRef ref: node => { console.log('imHere'); return !node ? setRefs.delete(child.key) : setRefs.set(child.key, node)

      Illustrates the importance of having unique keys when iterating over children, since that allows them to be used as unique keys in a Map.

    2. useRef(new Map()).current
    1. // require('hammerjs') when in a browser. This is safe because Hammer is only // invoked in componentDidMount, which is not executed on the server. var Hammer = (typeof window !== 'undefined') ? require('hammerjs') : undefined
    1. this is not intended to become a big, public thing. You're welcome to use anything and steal any code. Please do not count on us adressing feature requests or issues though.
    1. Onivim 2 leverages the VSCode Extension Host process in its entirety - meaning, eventually, complete support for VSCode extensions and configuration.
    1. the main reason we built a new multiprocess architecture is that Chromium's multiprocess support was never contributed to the WebKit project. It has always lived in the separate Chromium tree, making it pretty hard to use for non-Chrome purposes.Before we wrote a single line of what would become WebKit2 we directly asked Google folks if they would be willing to contribute their multiprocess support back to WebKit, so that we could build on it. They said no.