|
MononcQc posted:pretty much any web server could work fine there honestly. Cowboy would be the standard HTTP server to use in a small app with Erlang though. It comes with static file handlers and otherwise let you use raw Erlang code with web requests fairly easily. i know, i just want an excuse to try erlang for something
|
# ? Jan 13, 2016 23:16 |
|
|
# ? May 25, 2024 09:22 |
|
fart simpson posted:i know, i just want an excuse to try erlang for something https://github.com/ninenines/cowboy/tree/master/examples/static_world is a demo of using cowboy to do that. Unless you really really love makefiles and want to use erlang.mk (the cowboy's author homebrew build system framework made out of makefiles), I recommend you use rebar3 instead (which is the homebrew build system I work on)
|
# ? Jan 13, 2016 23:32 |
|
Barnyard Protein posted:what is the current hotness w/r/t java we bapp development? spring boot would be needs suiting in terms of functionality, but i remember shaggar saying to use something else, i forget. vaadin
|
# ? Jan 14, 2016 02:24 |
|
tps: turns out trying to analyse an out-of-memory heap dump on the machine that ran out of memory isn't actually the greatest idea ever
|
# ? Jan 14, 2016 02:27 |
|
Soricidus posted:tps: turns out trying to analyse an out-of-memory heap dump on the machine that ran out of memory isn't actually the greatest idea ever You may be able to use ulimit to limit the memory of the process then attach to the running process via gdb, then no problem. Usually you can tell a lot earlier with Valgrind.
|
# ? Jan 14, 2016 03:00 |
|
Barnyard Protein posted:what is the current hotness w/r/t java we bapp development? spring boot would be needs suiting in terms of functionality, but i remember shaggar saying to use something else, i forget. I haven't done java webapp dev in a while. asp.net is too good
|
# ? Jan 14, 2016 05:14 |
|
update re: butts.mvc i refactores to remove the interface and just piled the properties i needed to bind into the base class regardless of whether the inheritors needed them or not, but i kept the inheritor classes which then have their own methods attached for population so i can still have class specific cshtml editor templates and don't have to maintain one mega editor file. now all i need to do is figure out how to implement lists of checkboxes in razor without it failing to bind. Ps. It it also total bullshit that .net mvc will let you reference an editor via @html.editorfor but not actually error when no editor exists or when you have an editor for that model but the cshtml filename doesn't match the classname. I spent a good hour trying to work out why my breakpoints were invald because there was a silent validation fail on this poo poo.
|
# ? Jan 14, 2016 23:03 |
|
I think you can manually specify a template for an editor if the class name doesn't match the template name but idr. also if you have a bunch of unused things in ur model u may be overcomplicating something, but if it works it works I guess.
|
# ? Jan 14, 2016 23:06 |
|
Shaggar posted:I think you can manually specify a template for an editor if the class name doesn't match the template name but idr. also if you have a bunch of unused things in ur model u may be overcomplicating something, but if it works it works I guess. i think the nature of the underlying database model (which is effectively a list of mixed types) means that the base class returned to the model will always have to be a list of different types of Butt so somewhere along the line there will have to be a class that holds more properties (or classes) than it will ever use/need. otoh my original implementation didn't even have types, it was just crammed into the methods to work out what to populate on the base class with so even though i have wasted about two days on this it's (probably) better code than before.
|
# ? Jan 14, 2016 23:23 |
|
im making some assumptions, but there are maybe a few other ways you could do it. Lets assume we fix the model and have a base butt interface or abstract class and then individual butt types for each butt type in your db. If you have an IEnumerable<ButtBase> or IEnumerable<IButt> in your model you could, inside your view, pick different partial views based on the actual concrete class. The problem here is what happens when the butts are changed and submitted? The default binder wont know how to bind buttbase (and in fact it think it will tell you to get bent if its an interface or abstract class). You could then create a custom model binder that would handle the logic of determining the butt type and desterilizing it from the form input. This would give you very nice clean views and models at the expense of the extra dev time on the custom binder. a really gross other way to do it would be to have in your model a list for each butt type. so IEnumerable<BigButt> BigButts and IEnumerable<LittleButt> LittleButts. then in your view you essentially enumerate all these collections and display them in a way that's transparent to the user. If they can add new butts to the input form you make sure they get added with the input name of the proper butt type list. This way is probably the least effort if you've never done custom model binding before (it really isn't that hard) and the tradeoff is a gross view
|
# ? Jan 14, 2016 23:35 |
|
Shaggar posted:im making some assumptions, but there are maybe a few other ways you could do it. yeah i've fortunately avoided having list for each type, that wouldn't really work anyway because the mixed types have to be ordered in a specific way. I think I could do it by using a list of <Butts> where Butts can contain ButtType1, ButtType2 etc. but even then a given instance of Butts will have properties that can never be filled so it hasn't really made anything neater in that sense. a custom binder for the interface would probably work if I bound the enum that defines ButtType and seems to have been done before but tbh i think what I'm trying to do is a $50 solution to a $0.50 problem and is putting purity of model over readability of code. Edit: hmmm, on looking into it custom binders might not actually be as bad as I thought because I can add the type enum to the model so potentially all that my binder needs to do is look at that attribute to know what type of class to bind to, but that might be optimistic on my part. edit 2: holy gently caress this person is doing almost exactly what I am i.e. taking a clusterfuck of a form (though not 100 pages of a word form in my case lol wtf) and using an interface to represent the different types of form item that can exist under it, then using a bound "section type" to force the binder to create an instance of the appropriate concrete class. god drat, i knew i couldn't have been the only person that thought that interfaces should be usable in mvc for this exact case. Powerful Two-Hander fucked around with this message at 00:36 on Jan 15, 2016 |
# ? Jan 14, 2016 23:57 |
|
we took a chance hiring a guy who was pretty inexperienced and so far he's like quadrupled our new hire /start up/how to do things documentation
|
# ? Jan 15, 2016 02:30 |
|
I have a dumb math question because I'm terrible at both math and programming. I'm doing cryptopals and I'm on challenge 36: http://cryptopals.com/sets/5/challenges/36/ The part I'm having trouble with is that ruby is bitching that my 'u' values and 'x' values are too large to do exponentiation on. With the previous Diffie Hellman challenges this wasn't an issue because I was using modexp. However in the lines below I don't see how I can simplify them because I need to give the output of exponents to my modexp function. There might be some algebraic way I can use modexp to avoid the issue, but I'm too dumb to know how to do it or if it's even possible. quote:Generate S = (B - k * g**x)**(a + u * x) % N
|
# ? Jan 15, 2016 08:37 |
|
ErIog posted:
Check out http://math2.org/math/algebra/exponents.htm In particular, y = B - k * g**x Then the first expression is the same as y**a * y**(u*x) % N And y**a * (y**u)**x % N And (y**a % N) * (y**u % N) **x % N Note that you CAN'T just mod N the exponent. See here for more details: http://www.dragonwins.com/domains/getteched/crypto/modular_arithmetic_intro.htm#Modular Exponentiation I know it's not complete (God I hate typing maths on my phone) but it should be enough to get you started. When I get home from work I'll give you a better answer if nobody else has. Honestly the math thread in S, A & L might be a better fit for this question as crypto often passes the nonexistent line from programming to pure maths.
|
# ? Jan 15, 2016 09:49 |
|
ErIog posted:I have a dumb math question because I'm terrible at both math and programming. https://en.wikipedia.org/wiki/Exponentiation_by_squaring
|
# ? Jan 15, 2016 09:54 |
|
JewKiller 3000 posted:my work wants to move a couple databases from oracle to postgres. i looked into enterprisedb "postgres plus advanced server" initially for their oracle sql compatibility, but those guys charge a big yearly license fee just like oracle, so now we're leaning toward standard open source postgres. I guessing this in unneccessary to point out, but if you haven't yet you should grep the whole codebase after '\(\+\)' to get rid of those oracle left outer joins
|
# ? Jan 15, 2016 12:51 |
|
I have no idea who our target customer is meant to be. We have options to accommodate everything under the sun but they are all either broken, incompatible, or impossible to use correctly.
|
# ? Jan 15, 2016 15:09 |
|
I've been working on a library thing at work and im horrified that maybe I've constructed a monument to myself
|
# ? Jan 15, 2016 16:05 |
|
thats the only kind of monument worth building, grats
|
# ? Jan 15, 2016 16:38 |
|
tfw the most suitable library you find on github is licensed WTFPL e: and your company is so strict about licenses you can't use anything that even includes a "can not use this for evil" clause
|
# ? Jan 15, 2016 19:03 |
|
Clockwerk posted:thats the only kind of monument worth building, grats not if you want other people to use your work
|
# ? Jan 15, 2016 19:23 |
|
Flat Daddy posted:tfw the most suitable library you find on github is licensed WTFPL oh, you're in advertising?
|
# ? Jan 15, 2016 19:33 |
|
Flat Daddy posted:e: and your company is so strict about licenses you can't use anything that even includes a "can not use this for evil" clause i've spent a week waiting for a repository to be created to move code around because of license review of a public domain project that's been in the codebase for 7 years
|
# ? Jan 15, 2016 19:59 |
|
tps: replaced a large hashmap with a couple of arrays and binary search, watched the code that uses it get 10x faster
|
# ? Jan 15, 2016 23:43 |
|
discovered datamaps.js today, only wish it was a little more mature
|
# ? Jan 15, 2016 23:46 |
|
git blame is a great and wonderful feature
|
# ? Jan 15, 2016 23:53 |
|
Arcsech posted:git blame is a great and wonderful feature I mean sometimes this happens: "what loving moron wrote this poo poo?" *runs git blame* "oh it was me" BUT when it's not you it's great
|
# ? Jan 15, 2016 23:54 |
|
it's 11pm on a Friday night and instead of being drunk I have been fixing mvc binding to an interface, turns out I removed one important line in my lazy C&P of the custom binder so nesting didn't work properly. that said, even though its documentation is basically godawful and things that should logically work out of the box a)don't and b) don't always throw errors when they don't*, .net mvc owns bones *ffs if you're going to make your syntax 100% reliant on filenames matching class names you should at least show an error when @Html.EditorFor points to nothing because you refactored the class but didn't change the template name, instead you just get a "breakpoint won't be hit, symbols not loaded error" which is the Visual Studio equivalent of "gently caress you I hope you enjoy spending an hour loving with settings and running rebuilds to work out why you can't debug dipshit"
|
# ? Jan 16, 2016 00:04 |
|
what does git blame do
|
# ? Jan 16, 2016 00:28 |
|
attributes each line to the last person who modified it (with commit hash, time stamp etc)
|
# ? Jan 16, 2016 00:33 |
|
wow so it gives you traceability? awesome
|
# ? Jan 16, 2016 01:04 |
|
Arcsech posted:I mean sometimes this happens: i'm usually happy when it's me, because then i don't have to worry about the current code working around some non-obvious problem that i'm not aware of, and if it's bad for a reason that i should have noted in a comment then i usually remember that reason as soon as i seen the context in which it was written
|
# ? Jan 16, 2016 01:12 |
|
worked out how to add a custom role provider to my asp.net project and then use moq to fake the IPrinciple so that i could test my controllers properly, feels good
|
# ? Jan 16, 2016 01:26 |
|
Bloody posted:wow so it gives you traceability? awesome CVS could do this, unless your vcs is .bak files you too have these powers
|
# ? Jan 16, 2016 01:56 |
|
MALE SHOEGAZE posted:we took a chance hiring a guy who was pretty inexperienced and so far he's like quadrupled our new hire /start up/how to do things documentation
|
# ? Jan 16, 2016 02:11 |
|
Brain Candy posted:CVS could do this, unless your vcs is .bak files you too have these powers
|
# ? Jan 16, 2016 02:12 |
|
craisins posted:my goal when the next new person is hired is to make them write down every step and every question they have so the next person who gets hired doesn't have to go through the same poo poo i did yeah i mean that's the idea like every time right? difference is this guy actually did it.
|
# ? Jan 16, 2016 02:18 |
|
MALE SHOEGAZE posted:yeah i mean that's the idea like every time right? difference is this guy actually did it.
|
# ? Jan 16, 2016 02:41 |
|
Brain Candy posted:CVS could do this, unless your vcs is .bak files you too have these powers let me tell you about source_code_20161501.zip
|
# ? Jan 16, 2016 02:41 |
|
|
# ? May 25, 2024 09:22 |
|
craisins posted:he sounds like a keeper. at least until you have everything documented or he realizes he doesn't want to be "documentation guy" anymore. that's when you promote him to unit test guy, obviously
|
# ? Jan 16, 2016 02:42 |