Bauke's recent activity

  1. Comment on DevDocs, a free and open-source site by freeCodeCamp that combines and organizes various API documentations in one place in ~comp

    Bauke
    Link Parent
    Yeah, scrolling through the list I'm seeing a lot of JS-related software and libraries. And looking at the versions listed, there's some that are really outdated ones. Rust for example is at...

    Yeah, scrolling through the list I'm seeing a lot of JS-related software and libraries. And looking at the versions listed, there's some that are really outdated ones. Rust for example is at 1.37.0 while the current version is 1.43.0, oof.

    1 vote
  2. Comment on Fortnightly Programming Q&A Thread in ~comp

    Bauke
    Link Parent
    That's exactly what I'm looking for, thanks!

    That's exactly what I'm looking for, thanks!

    2 votes
  3. Comment on Fortnightly Programming Q&A Thread in ~comp

    Bauke
    Link
    Is there a way in SQL (specifically PostgreSQL, if it matters) to insert a bunch of rows but skip certain ones if a specific column's value from that row already exists in the database?...

    Is there a way in SQL (specifically PostgreSQL, if it matters) to insert a bunch of rows but skip certain ones if a specific column's value from that row already exists in the database? Essentially, I have a bunch of feeds (with title and url values) I want to import, but I want to skip certain ones when the URL already exists.

    I can think of some inefficient ways to do this in the code itself (basically just a loop and see if each URL exists one by one) but I'm curious if there's a simpler/more efficient way through SQL, since I imagine this isn't too rare of a scenario.

    1 vote
  4. Comment on Omoinotake - One Day in ~music

    Bauke
    Link
    Discovered this song via The First Take channel where Omoinotake performed One Day in one take (as the channel name implies). :P

    Discovered this song via The First Take channel where Omoinotake performed One Day in one take (as the channel name implies). :P

    1 vote
  5. Comment on The untold history of Arkane, developers of Dishonored, Prey, Ravenholm, and more in ~games

    Bauke
    (edited )
    Link Parent
    Yeah, it's a bit lengthy but after having just finished it, if you only wanted to watch part of it I'd say the Ravenholm and Dishonored sections are the ones to watch at least (Noclip commented...

    Yeah, it's a bit lengthy but after having just finished it, if you only wanted to watch part of it I'd say the Ravenholm and Dishonored sections are the ones to watch at least (Noclip commented the timecodes for each section and pinned it). It's well worth it if you have the time to watch it completely and separate documentaries are also coming out for Dishonored and Prey in the summer (so you'll probably not wanna miss that :P).

    4 votes
  6. Comment on Let's build a spec-compliant HTML parser in ~comp

    Bauke
    (edited )
    Link
    There will probably be a bunch of videos where Andreas builds out the parser, so instead of posting a topic for each video, I'll just make a list here: Part 1: Let's build a spec-compliant HTML...

    There will probably be a bunch of videos where Andreas builds out the parser, so instead of posting a topic for each video, I'll just make a list here:

    If you want to find this comment quickly, bookmark it. :) And if you like Andreas' videos, subscribe to him! He makes a lot of videos just like these that are really interesting to watch and explains everything in an understandable way. Highly recommend it even if you don't know C++ at all.

    3 votes
  7. Comment on What programming/technical projects have you been working on? in ~comp

    Bauke
    Link
    I published my first crate on crates.io! :3 For another project I'm (slowly) working on I want to add support for importing feeds via OPML and since there was no OPML parser crate yet, I made one....

    I published my first crate on crates.io! :3 For another project I'm (slowly) working on I want to add support for importing feeds via OPML and since there was no OPML parser crate yet, I made one. Now normally, I don't really like touching XML parsing because my experience with it has always been awful, but this time it turned out to be really easy.

    With the strong_xml crate it just makes you define a struct that describes the XML, then you add some macros and bam it's done. For example, the OPML spec says:

    <opml> is an XML element, with a single required attribute, version; a <head> element and a <body> element, both of which are required.

    So, let's make a struct with exactly that:

    pub struct OPML {
      pub version: String,
      pub head: Head,
      pub body: Body,
    }
    

    Then we just sprinkle some macros on top:

    #[derive(XmlWrite, XmlRead, PartialEq, Debug)]
    #[xml(tag = "opml")]
    pub struct OPML {
      #[xml(attr = "version")]
      pub version: String,
      #[xml(child = "head")]
      pub head: Head,
      #[xml(child = "body")]
      pub body: Body,
    }
    

    And done. Now we can just call OPML::from_str(r#"<opml version="2.0"><head/><body/></opml>"#); and it will parse. And if we leave out the version attribute, the head or the body, strong_xml will error out telling us it's missing required things. Amazing!

    3 votes
  8. Comment on Recommend me a movie that _________ in ~movies

    Bauke
    Link Parent
    The first thing that came to mind was 2012.

    The first thing that came to mind was 2012.

    3 votes
  9. Comment on Ordered list marker overflow in ~test

    Bauke
    Link Parent
    Yeah, it's a very useful Markdown feature, especially when want to remove one of the items in the middle. Now you don't have to go through each item and update the number so it's accurate again:...

    Yeah, it's a very useful Markdown feature, especially when want to remove one of the items in the middle. Now you don't have to go through each item and update the number so it's accurate again:

    1. One
    1. Two
    1. Three
    
    1. One
    2. Two
    3. Three

    Remove item 2:

    1. One
    2. Three

    Easy!

    2 votes
  10. Comment on ? in ~test

    Bauke
    Link Parent
    I don't know if Deimos keeps track of ~test but you can always report bugs through ~tildes (just create a topic and someone will likely create an issue for it, if you don't have a GitLab account)...

    I don't know if Deimos keeps track of ~test but you can always report bugs through ~tildes (just create a topic and someone will likely create an issue for it, if you don't have a GitLab account) or by creating an issue on the GitLab issue tracker yourself.

    As for this specific bug, I made an issue and the answer is basically "that's unfortunately just how it works".

    2 votes