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] djmitchella travelling through snow to rfind duplicate dates for singletons

17980828485100

Posts

  • iTunesIsEviliTunesIsEvil Cornfield? Cornfield.Registered User regular
    Just give him a whole Bootstrap setup and wash your hands of it. Even a doctor/researcher should be able to figure that out.

    bowen
  • hippofanthippofant ティンク Registered User regular
    edited February 2015
    Do different browsers still implement key CSS features differently? That drove me nuts back in the day - I think IE in particular misinterpreted W3C standards on whether padding was included in height and width, and so I had to stick an extra box inside each of my padded boxes to make things show up consistently.

    hippofant on
  • MvrckMvrck Dwarven MountainhomeRegistered User regular
    hippofant wrote: »
    Do different browsers still implement key CSS features differently? That drove me nuts back in the day - I think IE in particular misinterpreted W3C standards on whether padding was included in height and width, and so I had to stick an extra box inside each of my padded boxes to make things show up consistently.

    The answer is no, until you try to actually use something in the real world, and for some reason someone is still running Chrome 13.2.1 and refuses to auto update it. Basically as a rule I still include the -webkit and -moz in everything. Also, to fix your issue, you can use "box-sizing:border-box" which assumes any dimensions you set include both padding and borders into the overall calculation. You can force this for uniformity in display across most modern browsers and is a fucking godsend.

  • hippofanthippofant ティンク Registered User regular
    Mvrck wrote: »
    hippofant wrote: »
    Do different browsers still implement key CSS features differently? That drove me nuts back in the day - I think IE in particular misinterpreted W3C standards on whether padding was included in height and width, and so I had to stick an extra box inside each of my padded boxes to make things show up consistently.

    The answer is no, until you try to actually use something in the real world, and for some reason someone is still running Chrome 13.2.1 and refuses to auto update it. Basically as a rule I still include the -webkit and -moz in everything. Also, to fix your issue, you can use "box-sizing:border-box" which assumes any dimensions you set include both padding and borders into the overall calculation. You can force this for uniformity in display across most modern browsers and is a fucking godsend.

    Oh I don't do web development any more. I was just curious if/how they fixed the problem.

    I see box-sizing was a CSS3 property, and CSS3 was 1999, so that predates my web dev days, but it wasn't implemented in IE until v8, which is definitely post my web dev days. I'm kinda glad, because I'd have been pissed if I hadn't realised that existed. (Though I guess I probably still couldn't use it given older browser versions.)

  • ElaroElaro Apologetic Registered User regular
    Mr_Rose wrote: »
    Well… What do you want your website to do?

    I want to embed a java application into a page that would get input from the user and save a MIDI file on the server, but charge money (once per file, not per download) for downloading said MIDI file. Ideally, each user will have their own "account" (their folder on the server that they have to log into), but I'm just spitballing here.

    Children's rights are human rights.
  • NightslyrNightslyr Registered User regular
    hippofant wrote: »
    Mvrck wrote: »
    hippofant wrote: »
    Do different browsers still implement key CSS features differently? That drove me nuts back in the day - I think IE in particular misinterpreted W3C standards on whether padding was included in height and width, and so I had to stick an extra box inside each of my padded boxes to make things show up consistently.

    The answer is no, until you try to actually use something in the real world, and for some reason someone is still running Chrome 13.2.1 and refuses to auto update it. Basically as a rule I still include the -webkit and -moz in everything. Also, to fix your issue, you can use "box-sizing:border-box" which assumes any dimensions you set include both padding and borders into the overall calculation. You can force this for uniformity in display across most modern browsers and is a fucking godsend.

    Oh I don't do web development any more. I was just curious if/how they fixed the problem.

    I see box-sizing was a CSS3 property, and CSS3 was 1999, so that predates my web dev days, but it wasn't implemented in IE until v8, which is definitely post my web dev days. I'm kinda glad, because I'd have been pissed if I hadn't realised that existed. (Though I guess I probably still couldn't use it given older browser versions.)

    That's a bit misleading. CSS3 has been in the works since 1999. It's still not 100% adopted because the W3C is slow as shit. Browser compatibility has followed suit because, for a long time, the various CSS3 modules weren't locked down. There have been over 50 modules published, but only 4 have reached formal recommendation status: color, selectors level 3, namespaces, and media queries. So, everything else is still more or less up in the air with everything else.

    TLDR; fuck the way the W3C works.

    PSN/XBL/Nintendo/Origin/Steam: Nightslyr 3DS: 1607-1682-2948
    Switch: SW-3515-0057-3813 FF XIV: Q'vehn Tia
  • DelmainDelmain Registered User regular
    Elaro wrote: »
    Mr_Rose wrote: »
    Well… What do you want your website to do?

    I want to embed a java application into a page that would get input from the user and save a MIDI file on the server, but charge money (once per file, not per download) for downloading said MIDI file. Ideally, each user will have their own "account" (their folder on the server that they have to log into), but I'm just spitballing here.

    There are free versions of this, why would someone pay for one?

    Also, do you mean like, digitally playing instruments? Because it's like 15 years late for MIDIs otherwise

  • ElaroElaro Apologetic Registered User regular
    By "input" I mean "mathematical functions". It's experimental! Also using my application you can compose 20 to 60 minute interesting musical piece in maybe... 10 minutes to a half-hour?

    But maybe I'm getting ahead of myself. I still haven't finished the file reader and GUI, and I still have to put in the Javadoc... Uuuuugh.

    Children's rights are human rights.
  • ElaroElaro Apologetic Registered User regular
    Look I'm very junior, okay?

    Children's rights are human rights.
    Geth
  • Jimmy KingJimmy King Registered User regular
    urgh. one last try to get codeship to run my collectstatic and css/js compression. Once again using coffeescript early on and still not having been able to 100% strip it out bites me in the ass.

  • Jimmy KingJimmy King Registered User regular
    @elaro you're probably going to want to separate your web UI from that back end java app. You don't generally put a "java application" into a website anymore. There is technology for doing that called applets, but basically no one has used those in about a billion years because they are awful and also still probably won't do what you want.

    In general for something like you're doing you'd have your nice web front end using whatever tech you want -Django, Rails, PHP (don't do it!), if you're a java guy perhaps Play! or Grails (actually uses Groovy) would be up your alley. Then your app that does the hard work would do the processing asynchronously in the back end, outside of an http request, if it's something which will take more than 1-2 seconds at most.

    crimsoncoyoteDelmain
  • InfidelInfidel Heretic Registered User regular
    Yeah, you should consider having your Java program being a command-line one and skip the GUI, since you'll be using it as a back-end service really.

    The UI will really be a website that can accept files and pass them along to the program, and provide back the results asynchronously. This is where email notification typically comes in, assuming it is one of those processes that takes more than a few seconds.

    OrokosPA.png
  • urahonkyurahonky Registered User regular
    One thing Django needs to work on is it's error messages:
    workflow.models.DoesNotExist: Workflow matching query does not exist.

    That literally tells me nothing. Why don't you give me what I passed in or something useful?

  • a5ehrena5ehren AtlantaRegistered User regular
    edited February 2015
    Turns out that
    loc_name = getenv (_nl_category_names.str) 
                   + _nl_category_name_indxs[category];
    
    and
    loc_name = getenv (_nl_category_names.str 
                   + _nl_category_name_indxs[category]);
    

    Have pretty different results. The first will crash your system at boot, and the second will work.

    This is why patching glibc by hand is a bad idea, kids :P

    a5ehren on
    Daedalus
  • bowenbowen How you doin'? Registered User regular
    I sat here for 4 hours trying to figure out why this databind wasn't working.

    Turns out I was using a public variable instead of a property.

    Thanks .NET, you could've been a bit more helpful with why that wasn't working instead of just silently trudging along or saying "hey what's up I can't find this?"

    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
  • Jimmy KingJimmy King Registered User regular
    urahonky wrote: »
    One thing Django needs to work on is it's error messages:
    workflow.models.DoesNotExist: Workflow matching query does not exist.

    That literally tells me nothing. Why don't you give me what I passed in or something useful?
    You should be able to get at the info if you use pdb or log to something like sentry, it's all in the stack trace somewhere. We have everything log to sentry and the variables that were used are all logged there for us to see. So if there was something like
    workflow_id = 1234
    poopy = WorkFlow.objects.get(id=workflow_id)
    

    Only that raised an exception because it doesn't exist, it'd get logged to sentry and we'd be able to see the line and so know the query and see the variables which were in scope, like the workflow_id.

  • urahonkyurahonky Registered User regular
    @Jimmy King My other coworker says that he loves your av and username. He loves Ready to Rumble.

  • gavindelgavindel The reason all your software is brokenRegistered User regular
    So, more fun with exits in Spyder (an open source IDE for Python). I've figured out how callbacks and captures work in tkinter, thanks to a voluminous amount of examples on their tutorials. I cleared the extra example cruft from the professor's base, but still needed to make the menu "exit" button actually exit.

    So I set up an exit_callback() command:
    def exit_callback(self):
      print("Exitting!")
      sys.exit()
    

    As I type "exit()" into the program window, the Spyder kernel dies with an error message. Okay, weird. Kind of sloppy coding that typing a function into a program window executes it in the console.

    Load it again, run the program, click Exit button, Spyder kernel dies.

    Look online. This is a known issue. How dare you use exit() on a program launched from Spyder, after all.

    Never fear: Spyderlib Issue 1974 #4 has a solution! Define a function that raises an exception to stop your script without killing the kernel.
    def f(): raise Exception("What the fuck kind of exit is this?!")
    

    What kind of IDE is this?!

    Angels, innovations, and the hubris of tiny things: my book now free on Royal Road! Seraphim
  • Jimmy KingJimmy King Registered User regular
    urahonky wrote: »
    @Jimmy King My other coworker says that he loves your av and username. He loves Ready to Rumble.

    Hi five him for me! It's such an awesome movie. I need to watch it again, it's been a long time. I'm not even sure if I own it on DVD, I might only have it on VHS from back at the end of the VHS days.

  • NightslyrNightslyr Registered User regular
    Between learning:

    The basics of color
    Typography
    Sass

    From CodeSchool, and getting more comfortable with Bootstrap, I feel like I can actually become a minimally competent web designer. It's amazing. I've never actually felt confident about front end work before, but I think I got this.

    PSN/XBL/Nintendo/Origin/Steam: Nightslyr 3DS: 1607-1682-2948
    Switch: SW-3515-0057-3813 FF XIV: Q'vehn Tia
    an_alt
  • ElaroElaro Apologetic Registered User regular
    So I finished the file parser. I am now a god of music. A fickle god, who creates mostly shit, but as soon as I get that .mpart generator working...

    What's the etiquette for creating your own type of file?

    Children's rights are human rights.
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    99 standards to choose from
    99 standards to choose
    Create one more to unify them all
    100 standards to choose from

  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Basically don't expect anyone else to ever read the format, but if it's only your apps go ahead

    bowen
  • DaedalusDaedalus Registered User regular
    Today I learned: ECC point compression is pretty cool. It's not even really "compression" as such. You just take your Y coordinate, save one bit, and throw the rest of it in the garbage.

  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    It is cool, patented though. Woo patenting math!

    DaedalusPolaritiebowen
  • TryCatcherTryCatcher Registered User regular
    Elaro wrote: »
    So I finished the file parser. I am now a god of music. A fickle god, who creates mostly shit, but as soon as I get that .mpart generator working...

    What's the etiquette for creating your own type of file?

    standards.png

    iTunesIsEvil
  • DaedalusDaedalus Registered User regular
    edited February 2015
    Phyphor wrote: »
    It is cool, patented though. Woo patenting math!

    Fuck em, my company's customer has a license.

    Also this is basically a patent on the quadratic formula. Nice gig if you can get it...

    Edit: wait, that patent has you throwing out the X coordinate and recalculating it from Y later. That's way harder, why would you do that?

    Daedalus on
  • hippofanthippofant ティンク Registered User regular
    ... You're not supposed to be able to patent math.

    GethDaedalusTryCatcherVegemyteThe Anonymousa5ehrenan_alt
  • Jimmy KingJimmy King Registered User regular
    Daedalus wrote: »
    Phyphor wrote: »
    It is cool, patented though. Woo patenting math!

    Fuck em, my company's customer has a license.

    Also this is basically a patent on the quadratic formula. Nice gig if you can get it...

    Edit: wait, that patent has you throwing out the X coordinate and recalculating it from Y later. That's way harder, why would you do that?
    It says compression, so I assume the same as any other compression - store and/or transfer less data in exchange for requiring a bit more cpu to get at that data once it's transferred or when you need to retrieve it from storage.

  • urahonkyurahonky Registered User regular
    Woooo working on a Saturday.

    jjae2123
  • hippofanthippofant ティンク Registered User regular
    So... can someone explain to me why Python's regexes strips out new line characters, and how it can be made to stop doing that?

  • MahnmutMahnmut Registered User regular
    Really ought to have handled async web calls in Unity coroutines instead of trying to do it multithreaded. This shit is hard as hell to debug. :( I can't even see exceptions from the web threads unless I put breakpoints in dummy catch blocks, which, ugh why am I so bad!

    Steam/LoL: Jericho89
  • Jimmy KingJimmy King Registered User regular
    urahonky wrote: »
    Woooo working on a Saturday.

    Hi5 me too! Major website launch on Wednesday and naturally things were a bit over promised. Seriously hoping we don't crash and burn here.

  • Jimmy KingJimmy King Registered User regular
    hippofant wrote: »
    So... can someone explain to me why Python's regexes strips out new line characters, and how it can be made to stop doing that?
    Can you post what you're actually doing? I've never run into anything unexpected in Python's regex stuff. Either I'll learn something new myself or be able to help.

  • electricitylikesmeelectricitylikesme Registered User regular
    I do not understand the obsession with vim, I just really don't. I've always found the exalted Unix command line text editors obtuse and requiring of far too much mental investment to get things done.

    The only thing I can handle is nano because nano actually gives me some feedback on what the hell I need to press to accomplish the task I want.

    Carpyironsizidebowen
  • StarfuckStarfuck Registered User, ClubPA regular
    I'm far more productive in vim than anything else. When you use it long enough it's just second nature. I use VS or IntelliJ when appropriate, but I'm just at home in vim and I know lots of others are too. I try to use Emacs from time to time for Clojure stuff, but I find it's awkward to go back and forth, so I stick with vim. But I know devs that swear by Emacs and others swear by Sublime.

    jackfaces
    "If you're going to play tiddly winks, play it with man hole covers."
    - John McCallum
  • DehumanizedDehumanized Registered User regular
    There are a lot of benefits to vim (especially if you are actually developing over SSH) but there are also a lot of benefits to not having to spend hours and hours getting comfortable with an incredibly complex text editor when you can probably just use something like sublime or whatever your preferred IDE is and still edit text pretty damn fast.

    I use it and like it, but I still find the claims from vim evangelists that it just lets you edit text so fast to be pretty silly, because it's seldom that the bottleneck in any of my development projects is that I just can't possibly input the text quickly enough.

    ecco the dolphinironsizide
  • mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    I use it because the shortcuts are habit for me. I could be as fast in any other editor as I am in vim now but it would take time to unlearn and relearn shortcuts, so vim it is.

  • AnteCantelopeAnteCantelope Registered User regular
    I like using vim for editing config files and stuff like that, but I can't imagine doing actual development with it. IDEs offer so much more than typing speed, and how much of development is actually typing anyway?

    Evigilant
  • mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    eh, vim has plenty of plugins for browsing, autocompletion, syntax checking, and a bunch of other stuff you'd expect from an IDE, so I don't think I'm missing much there (plus, c++ on linux doesn't leave you with many options in any case).

    Geth
Sign In or Register to comment.