As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
We're funding a new Acquisitions Incorporated series on Kickstarter right now! Check it out at https://www.kickstarter.com/projects/pennyarcade/acquisitions-incorporated-the-series-2

[Programming] Reinventing equality, one language at a time

11718202223100

Posts

  • EtheaEthea Registered User regular
    edited October 2017
    C++ developers go listen/watch Optimizing Code Speed and Space with Build Time Switches
    ( https://www.youtube.com/watch?v=9RFYVbHRoLg&t=0s ).

    Ignore the title, this is a great info dump on the reality of C++ compilers, performance, and the always misunderstood inline keyword.

    Ethea on
    ecco the dolphinLD50JasconiusGnomeTank
  • urahonkyurahonky Registered User regular
    edited October 2017
    Yea I started a new job today. I've been mostly programming chatting in a slack channel.

    New job is going to keep me busy I think but that's okay. It has one of those desks that you can press a button so you can stand or sit.

    Hmmm. It sounds like I'm saying it'll be okay because of the desk. Eh I'm too tired to change it.

    urahonky on
    ecco the dolphinJimmy Kingcrimsoncoyotemightyjongyoadmanbtemplewulf
  • dporowskidporowski Registered User regular
    urahonky wrote: »
    Yea I started a new job today. I've been mostly programming chatting in a slack channel.

    New job is going to keep me busy I think but that's okay. It has one of those desks that you can press a button so you can stand or sit.

    Hmmm. It sounds like I'm saying it'll be okay because of the desk. Eh I'm too tired to change it.

    Don't underestimate the desk's impact on your day to day levels of "not gonna burn the building down". It is really, really, all about the little things that keep us all from going full Milton.

    urahonkytemplewulf
  • EchoEcho ski-bap ba-dapModerator mod
    We have raisable desks here and it's pretty great. Took me a while to get used to it but now I try to stand for a third of the day or so.

    urahonkybowentemplewulf
  • CampyCampy Registered User regular
    We don't have fancy standing desks, but there's a standing height table that I've been using for the last coupla months. It's done wonders for my back.

    urahonky
  • urahonkyurahonky Registered User regular
    Yeah I'm going to try and stand for a bit after lunch. I have back issues so hopefully it helps.

  • crimsoncoyotecrimsoncoyote Registered User regular
    I have a desk that technically will raise, but I am lazy and half my wires are too short, unfortunately.

  • OrcaOrca Also known as Espressosaurus WrexRegistered User regular

    This is the first time I've heard of the second one. Gonna have to steal that.

    Echourahonky
  • a5ehrena5ehren AtlantaRegistered User regular
    Ethea wrote: »
    C++ developers go listen/watch Optimizing Code Speed and Space with Build Time Switches
    ( https://www.youtube.com/watch?v=9RFYVbHRoLg&t=0s ).

    Ignore the title, this is a great info dump on the reality of C++ compilers, performance, and the always misunderstood inline keyword.

    I don't have time to watch a 75 minute video right now, but I assume it is mostly "actually the compiler is way smarter than you so just write readable code you fucks"?

    thatassemblyguyASimPerson
  • EtheaEthea Registered User regular
    a5ehren wrote: »
    Ethea wrote: »
    C++ developers go listen/watch Optimizing Code Speed and Space with Build Time Switches.

    Ignore the title, this is a great info dump on the reality of C++ compilers, performance, and the always misunderstood inline keyword.

    I don't have time to watch a 75 minute video right now, but I assume it is mostly "actually the compiler is way smarter than you so just write readable code you fucks"?

    Lots of talk about how the inline keyword was a bad idea to start with, talk about why -O1 might not do what you expect, discussion on why ffast-math most likely shouldn't be enabled, discussions on LTO and profile guided optimizations.

  • SeñorAmorSeñorAmor !!! Registered User regular
    So where I can go about learning how to use asp.net (and C#, I presume)? We have a web app from a vendor that sucks and is done in asp.net and I'd like to be able to look at their coding and see if I can figure out why it's so terrible.

  • schussschuss Registered User regular
    Just finished my first hackathon where they were dumb enough to let commit code.fun stuff! Also - so very tired

    ecco the dolphinmightyjongyocrimsoncoyoteStabbity Style
  • schussschuss Registered User regular
    We got 3rd in our group, barely missing the finals

    Naphtali
  • jothkijothki Registered User regular
    edited October 2017
    I just learned a new trick.
    \*
    codeIDoNotWantToRun();
    \\ *\
    
    \\*
    codeIDoWantToRun();
    \\ *\
    

    This is going to make some things so much easier.

    edit: Looks like I can also do
    \*
    commentedCode();
    \**\
    

    jothki on
  • OrcaOrca Also known as Espressosaurus WrexRegistered User regular
    jothki wrote: »
    I just learned a new trick.
    \*
    codeIDoNotWantToRun();
    \\ *\
    
    \\*
    codeIDoWantToRun();
    \\ *\
    

    This is going to make some things so much easier.

    edit: Looks like I can also do
    \*
    commentedCode();
    \**\
    

    * Rejects your pull request with a poop emoji *

    EchoiTunesIsEvilbowentemplewulfthatassemblyguyDehumanized
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    ahh, bootstrap 4 beta... mana from heaven

    lighter markup, lighter classes, grid layout... fairly decent backward compatibility with bootstrap 3 plugins... nice

    urahonky
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    //*
    /*/
    /**/
    
    is a switch

  • dporowskidporowski Registered User regular
    Today I learned that contrary to I don't know how long's worth of history, accessibility_identifier is NOT exposed to the user via screen reader, and accessibility_label IS. Further, accessibility_label is only SOMETIMES seen by automation, because that's what the other one is for.

    I swear to god I tested this 6 months ago and it was the other way around. Either that or I am just a dumbass. Thankfully the only person I have inconvenienced is me, and I only have some shame to feel about having told people "nope I tested it and it doesn't work that way".

  • EchoEcho ski-bap ba-dapModerator mod

    Incidentally, next sprint I'm starting work on a new service that needs to deliver messages in the order they are received. 8->

    schussthatassemblyguyadmanb
  • bowenbowen How you doin'? Registered User regular
    jothki wrote: »
    I just learned a new trick.
    \*
    codeIDoNotWantToRun();
    \\ *\
    
    \\*
    codeIDoWantToRun();
    \\ *\
    

    This is going to make some things so much easier.

    edit: Looks like I can also do
    \*
    commentedCode();
    \**\
    

    giphy.gif

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
    LD50iTunesIsEvilmightyjongyotemplewulfa5ehrenASimPerson
  • schussschuss Registered User regular
    Echo wrote: »

    Incidentally, next sprint I'm starting work on a new service that needs to deliver messages in the order they are received. 8->

    Isn't this what mqs are usually for?
    Bonus over engineering solution - use blockchain

  • EchoEcho ski-bap ba-dapModerator mod
    Yeah, I'll get data from RabbitMQ. It's a service that will get data from an exchange into ElasticSearch and apparently message order was important.

    I'll chase down our data guy next week and see what it's about, feature spec was pretty skinny.

  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    edited October 2017
    schuss wrote: »
    Echo wrote: »

    Incidentally, next sprint I'm starting work on a new service that needs to deliver messages in the order they are received. 8->

    Isn't this what mqs are usually for?
    Bonus over engineering solution - use blockchain

    Blockchains do not preserve order though (at least not relative to multiple entities)

    Phyphor on
  • templewulftemplewulf The Team Chump USARegistered User regular
    edited October 2017
    Campy wrote: »
    We don't have fancy standing desks, but there's a standing height table that I've been using for the last coupla months. It's done wonders for my back.

    OMG Yes. We splurged on an adjustable desk from Ikea, and I like adjusting it more than I thought I would.

    I also got one of these chairs pogo-stick-chairs from my mother-in-law, and it turns out it's actually a great compromise when your body doesn't want to stand up all the way anymore.

    Between the desk, the chair, and my extra tall monitor arms, I'm actually enjoying my workstation instead of just tolerating it to enjoy my computer.

    templewulf on
    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
  • KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    Phyphor wrote: »
    schuss wrote: »
    Echo wrote: »

    Incidentally, next sprint I'm starting work on a new service that needs to deliver messages in the order they are received. 8->

    Isn't this what mqs are usually for?
    Bonus over engineering solution - use blockchain

    Blockchains do not preserve order though (at least not relative to multiple entities)

    You could always go the datafeed route. Create multiple channels and do channel arbitration based on sequence numbers.

  • Jimmy KingJimmy King Registered User regular
    So I spent a couple of days running through Tour of Go and their other official docs, then I made this: https://github.com/jmichalicek/tacofancy-slack

    It's a bot/app for slack slash commands to return random recipes from https://github.com/sinker/tacofancy and https://github.com/evz/tacofancy-api
    There are a couple github related files in there because I forgot I was working with someone else's repo and was planning on using github webhooks to have the bot notify a channel when a new recipe is added (which doesn't seem to be that often).

    There are definitely some things not done in a very go-like manner, but I've at least noted most of them for me to sort out. I will also ask here about them... at the moment it's mostly stuff about the most effective way to make use of interfaces and structs. The lack of inheritance seemed awesome at first, then I ran into the compiler complaining because I can't access attributes from the interface which seems to mean duplicating a bunch of getters/setters and using those from the interface unless I've misunderstood something.

    zeeny
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    got the call at 4:30 that my system 6 months in development is going live next week, at least 2 weeks ahead of schedule

    guess who is

    investing in coffee this weekend

  • NogsNogs Crap, crap, mega crap. Crap, crap, mega crap.Registered User regular
    I totally missed the creation of this "new" thread after the old one closed.

    So uh...hows things?

    Im working remote now, so thats cool. Except client has me doing java/groovy/hibernate, which i told them im not versed in. But whatever i guess, they still paying.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
  • Casual EddyCasual Eddy The Astral PlaneRegistered User regular
    so my course had me build a basic version of reddit, and create some helper functions to generate random sentences out of random letters that look like gobblygook. I was thinking about going back at some point and improving them so they make sensical words.

    pm9ylmo0og1g.png

    chrome thought the random letters were Polish :rotate:

    ecco the dolphinBucketmanJimmy Kingthatassemblyguy
  • EchoEcho ski-bap ba-dapModerator mod
    Is it purely random, or a Markov chain? If not, a Markov chain with 2-3 character token length makes pretty convincing words.

  • LD50LD50 Registered User regular
    Or you can use a markov chain and a dictionary and make actual sentences and such.

  • schussschuss Registered User regular
  • Jimmy KingJimmy King Registered User regular
    Sorted out most of my golang interface issues. yay for embedded structs. I still have some questions which I'll get to later, but they are mostly "A and B both are valid ways to do shit, which will be most expected" idiomatic go type stuff and may well be 100% situational.

  • urahonkyurahonky Registered User regular
    Is there really no way to find out if an eventListener exists already in Javascript? I have a bit of code that adds an eventListener to the window, but if the page is navigated around then the thing gets added more than once and fired more than once.

    I know you can do getEventListeners() in chrome console, but I need a way to do that in the code.

  • crimsoncoyotecrimsoncoyote Registered User regular
    googling for man pages (so I don't have to boot up my linux VM) is always an adventure

  • Casual EddyCasual Eddy The Astral PlaneRegistered User regular
    Echo wrote: »
    Is it purely random, or a Markov chain? If not, a Markov chain with 2-3 character token length makes pretty convincing words.

    just the rand ruby method and .sample
      def self.random_word
        letters = ('a'..'z').to_a
        letters.shuffle!
        letters[0,rand(3..8)].join
      end
    

    I'll definitely want it to look like actual text when I'm ready to start showing off a portfolio. How do I implement a markov chain?

    I did think to use a dictionary and sample from that.

  • InfidelInfidel Heretic Registered User regular
    urahonky wrote: »
    Is there really no way to find out if an eventListener exists already in Javascript? I have a bit of code that adds an eventListener to the window, but if the page is navigated around then the thing gets added more than once and fired more than once.

    I know you can do getEventListeners() in chrome console, but I need a way to do that in the code.

    If you're the one adding it then just make sure it only gets added once? Put an actual condition on it, or go to ref counting if you need to sometimes remove it.

    OrokosPA.png
  • gavindelgavindel The reason all your software is brokenRegistered User regular
    Business value is much like energy. It is everywhere, generally inaccessible, and when harnessed it nevertheless remains largely hot air.

    Angels, innovations, and the hubris of tiny things: my book now free on Royal Road! Seraphim
  • EchoEcho ski-bap ba-dapModerator mod
    edited October 2017
    I'll definitely want it to look like actual text when I'm ready to start showing off a portfolio. How do I implement a markov chain?

    I did think to use a dictionary and sample from that.

    There are a bunch of ways to do it, but the basic idea of a Markov chain is that you split data into tokens (for example, whole words).

    Then you go through your text and get statistics on how often tokens appear and which tokens follow that token, and how many times, so you can grab a random followup token.

    For example, the sentence "My hovercraft is full of eels" has the following token pairs: (ie, a token and its next token)

    My -> hovercraft
    hovercraft -> is
    is -> full
    full -> of
    of -> eels.

    You also note what the starting token is, in this case "My". This particular Markov chain can only ever generate the starting sentence because all tokens in the chain are unique - there's only one token to choose to follow up with.

    With a proper text to scan, you'd get the token "I" that (just to invent some numbers here) is followed by "am" 80% of the time, and "have" 20% of the time. The token "am" is followed by "a" 40% of the time, "an" 30% of the time, etc etc.

    I -> am (80%)
    I -> have (20%)
    am -> a (40%)
    am -> an (40%)

    So you pick a random starting token (or check the texts for the tokens a sentence can start with for something more realistic), find which tokens can follow that token, and do some randomness to grab one of the followup tokens. Repeat for the followup token.

    Here's a great visualisation of Markov chains. It uses other data than words but the idea is the same.

    If you use pairs of letters instead of full words you can get a decent approximation of English-like words.

    Echo on
    Jimmy KingtemplewulfthatassemblyguyCasual Eddy
This discussion has been closed.