|
DrankSinatra posted:In general, I agree, but if the data the function is applied to is say, some nightmare frankendata blob, that may not be the case. Admittedly that's the degenerate case, but I've seen that degenerate case frequently in production code using imperative programming. I'm wondering if it isn't just the case that functional programming [by virtue of comparative mathematical and formal sophistication] tends to attract developers who are more conscientious and thoughtful designers. I imagine there are low-to-average skill developers who could work some real nightmare magic with monads for example. You keep giving examples where the tool is being used improperly and blaming the tool. Of course the functional paradigm can't stop Bob from making subtle changes to break my code, no language/paradigm can. Functional programming, if adhered to, can create a code base that is easier to reason against and make assertions as to its correctness. You can't make assertions about any codebase whose programmers are actively trying to defeat its purpose.
|
# ? May 7, 2014 22:31 |
|
|
# ? Jun 6, 2024 08:57 |
|
carry on then posted:You keep giving examples where the tool is being used improperly and blaming the tool. Sorry! I was! Your point is really well made, and I agree with it. I'm just really cynical about people in general today [especially programmers], and most of the stuff I'm reading about FP has been so optimistic that it rubbed me the wrong way. Edit unrelated to responses: "People today" means today in the literal sense. Not "URGH kids these days." DrankSinatra fucked around with this message at 23:33 on May 7, 2014 |
# ? May 7, 2014 22:36 |
|
The thing about functional, I find, is that you really really have to train people in it before they can start contributing to a code base, especially if they learned imperative/OOP first. Which definitely should be taken into account when deciding to use it, and which the issues you brought up do apply: you can't just make your program functional and expect all bugs ever to disappear.
|
# ? May 7, 2014 22:38 |
|
DrankSinatra posted:I'm just really cynical about people in general today [especially programmers], and most of the stuff I'm reading about FP has been so optimistic that it rubbed me the wrong way. That's a good attitude to have and it happens with every regurgitated paradigm that hits the streets. People discover alternative ways of doing things and get really enthusiastic about it. Just pick the good things and try to use a language that doesn't force you into one particular paradigm, because that leads to the object-oriented FactoryFactoryFactory architecture astronautics mess.
|
# ? May 7, 2014 23:26 |
|
|
# ? May 7, 2014 23:39 |
|
There's an element of the functional programming crowd that are just mediocre crazies but there are also some otherwise sane employable people. Well actually the only ones I can think of stopped caring about FP. You see all these people crying about how Haskell is so great and then giving merits that apply to any statically typed language. Anyway it's great for any language to have tools to explicitly limit the capabilities of its units of computation. Whether it's the fact that arguments must be of the specified type, or that a function cannot have a side effect, or that a function only reads from the world (which is an impurity) but doesn't modify it or the fact that your class only has certain public methods exposed, allowing you to prove that it remains in a consistent state without having to look at the entire project, you benefit from being able to say what your code is not doing. There is still some benefit if that isn't language-guaranteed either, too -- you can still cast away constness in C++ or reinterpret_cast and start doing undefined behavior, but that doesn't mean it doesn't prevent errors. (You can also use unsafeCoerceIO, or whatever it's called, in Haskell.) Then there's "functional programming" of the weak-rear end variety where some squibs use blocks in Ruby or lambdas somewhere and call it functional programming. That's not functional programming except in some "Oh, there's a definition of functional programming that means you pass functions as objects" but that's not interesting or special in any way.
|
# ? May 8, 2014 00:02 |
|
At some point, I wonder if it's viable to augment arbitrary pieces of code with logical predicates, and embed a theorem-prover into the compiler. Type-checking really is just a subset of that anyway. There's plenty of cool stuff you can do that doesn't ram you right into the brick wall that is Rice's Theorem.
|
# ? May 8, 2014 00:28 |
|
ashgromnies posted:Does anyone know of a good resource on Linux system and application profiling? Something that goes over tools to analyze network, disk, CPU, memory, hard disk, etc. usage and tuning? I would say LKML is probably number one. Unfortunately documentation is rather weak for this topic and the tools are quite diverse. CPU: everything from gperf, oprofile, and apparently the kernel has some tool now. Memory: glibc malloc has built in tools, also tcmalloc and also the freebsd/firefox allocator thingy. You can find them all in Chrome. Valgrind and plenty of friends for leak detection, heap issues. Coding: thread sanitizer, various static analysis tools in the kernel. Network & disk are interesting and probably most difficult as they are very diverse topics from 10mb to 40Gb+ fibre, from floppy disks to 8-bit flash proms to hard disks to solid state storage to pNFS, Ceph and friends. Google is probably a good starting point also: https://code.google.com/p/gperftools/
|
# ? May 8, 2014 00:44 |
|
A little bit of background: I'm a CS university student pretty early on in my education, only my 2nd semester of it, but I'm pretty confident this is where I'm going to go with things after futzing around with other stuff for my first 2 semesters. My questions are: 1. If I want to familiarize myself with a revision control / project hosting service, is Github the best option for me to go with and is it even worthwhile to invest time doing this? If it's relevant I'm okay using Linux but I'm much more comfortable on a Windows machine and I don't really know if my work in the future is going to involve one platform predominantly over the other. 2. I'm not taking a summer semester and I'd like to keep myself involved with programming while I'm out of class. Are there any good language agnostic projects I can attempt or things to involve myself in that would work well for this? Something I can show off on a resume would probably be even better but I'm not sure I'm at the point where my knowledge is sufficient to take on a project like that, though I'm a pretty quick learner. I've taken a class of both Java and C/C++, I found the courses super easy but we didn't really go into anything super complex. I'm not particularly partial to either language, though I like Visual Studio a lot more than Eclipse so I'm a little biased in that way. I think next semester will be focused on data structures or something, so I suppose I could try to get ahead of the curve on that, but I'm a bit worried that'll leave me hopelessly bored in class if I already know everything so I'd rather avoid that.
|
# ? May 8, 2014 00:52 |
|
Read posted:A little bit of background: I'm a CS university student pretty early on in my education, only my 2nd semester of it, but I'm pretty confident this is where I'm going to go with things after futzing around with other stuff for my first 2 semesters. I'd actually recommend getting accustomed to using a Unix command line interface, to the point where you find it as comfortable as a Windows machine. That paid dividends for me in terms of my programming productivity. As a student, it was pretty cool to just SSH in and work from my apartment, a bar, the library, wherever, and not fuss with the GUI, while everybody else was trapped in the lab. That's really far from the only or the biggest benefit, but I liked it. Even in an environment where you're required to use Windows, that sense of ease maps pretty well into, say, learning PowerShell. I know you are interested in the languages you already know, but learning a scripting language like Python or Ruby is a pretty fun goal. It lets you make little one-off tools, or bigger projects that still don't require machinery of a compiled language pretty quickly. If you do that, I'd recommend learning a couple things about data structures, specifically arrays, linked lists, stacks, queues, and hash tables - knowing those five things will let you do lots of fun and cool stuff. They're not complicated, and if that's all they're covering in your class, you'd be bored by the class anyway. Alternative left-field, but kind of nifty option: Read and do the exercises in SICP http://mitpress.mit.edu/sicp/ DrankSinatra fucked around with this message at 01:05 on May 8, 2014 |
# ? May 8, 2014 00:57 |
|
DrankSinatra posted:I'd actually recommend getting accustomed to using a Unix command line interface, to the point where you find it as comfortable as a Windows machine. That paid dividends for me in terms of my programming productivity. As a student, it was pretty cool to just SSH in and work from my apartment, a bar, the library, wherever, and not fuss with the GUI, while everybody else was trapped in the lab. That's really far from the only or the biggest benefit, but I liked it. Even in an environment where you're required to use Windows, that sense of ease maps pretty well into, say, learning PowerShell. I do use Cygwin a lot on my Windows machine for a variety of tasks but I've never really done any programming work through it, maybe I'll set up an Arch Linux or whatever install and try to use that for some work! I think there might be a thread on this topic already, but do you have any personal preference between Python and Ruby? I know one application I'd actually want to use it for is writing some scripts for Weechat, an IRC client, and it supports both languages (as well as Perl, and some others). Is one or the other better for that? I actually know how arrays, linked lists, stacks and queues work because we covered it a little in the tail end of my C/C++ course but I've never actually implemented anything but arrays and vectors. I guess it didn't occur to me those would fall under the purview of data structures though it's obvious in hindsight. Hash tables I have no idea though. Maybe you hash a bunch of objects and then store the hashes and a link to the original object so that the objects can be referred to by their hash but I don't see how that would be useful \o/. I'll look it up! Read fucked around with this message at 01:08 on May 8, 2014 |
# ? May 8, 2014 01:04 |
|
Arch seems like it could potentially be a pain to use for production stuff, but that's probably a really fun and good choice for learning and setting up a Linux environment, especially if you aren't too frustrated by false starts or mistakes. They also have an astonishingly good wiki - I don't even use Arch, and I end up going there pretty frequently. I'd probably recommend Python at first - Ruby's way of doing stuff is something I prefer, but there are things that I think would be a bit weird for someone just starting out. Both are really good languages with lots of community guides, so you won't go wrong either way [although I don't know too much about scripting for IRC clients - it might depend on which is supported better for that area]. Read posted:Hash tables I have no idea though.
|
# ? May 8, 2014 01:13 |
|
Being able to use the API for a data structure shouldn't be covered in the course. Coursework should be understanding the qualitative tools we use to reason about different data structures and assess them for particular use cases. Learning to set up a linux environment is IT work. IT work is good work, but I don't understand why everyone recommends programmers watch a package manager run for a few hours.
|
# ? May 8, 2014 01:14 |
|
DrankSinatra posted:Arch seems like it could potentially be a pain to use for production stuff, but that's probably a really fun and good choice for learning and setting up a Linux environment, especially if you aren't too frustrated by false starts or mistakes. They also have an astonishingly good wiki - I don't even use Arch, and I end up going there pretty frequently. I actually set up an Arch installation once before and I found it pretty interesting to see how some of the stuff worked under the hood, but yeah it was also kind of a pain. I think I'll take your advice then and go for Python, that or this SICP thing you linked me which seems like a packaged course with textbook and assignments which is pretty neat. e: I looked up some Ruby code and the fact that you don't have to put a ; at the end of every statement horrifies me, which I find kind of hilarious since I thought it was really obnoxious to have to do that like a year ago. Read fucked around with this message at 01:42 on May 8, 2014 |
# ? May 8, 2014 01:15 |
|
JawnV6 posted:Learning to set up a linux environment is IT work. IT work is good work, but I don't understand why everyone recommends programmers watch a package manager run for a few hours. Eh. That's true to an extent, but I've worked my share of poo poo-rear end jobs where I had to do every goddamn thing myself, or needed to set up a test environment because the CTO couldn't be arsed to expend the IT resources. Plus it's just plain useful if you're playing at home, or setting up an AWS instance for yoruself [or as a proof of concept for your boss]. Self sufficiency is nice! Also, just setting up an environment gives you a decent goal to work towards [which is hard to find sometimes, as a new programmer]. Setting up the environment isn't the key, IMO, it's just feeling more comfortable with the command line and really getting the sense that you won't cut your head off. Until you do cut your head off. Then you learn to make backups. For the package manager thing, yeah that alone won't teach you much. That's why it's good to make fun of Gentoo users. JawnV6 posted:Being able to use the API for a data structure shouldn't be covered in the course. Coursework should be understanding the qualitative tools we use to reason about different data structures and assess them for particular use cases. No argument here. Not sure what it's in response to, though. DrankSinatra fucked around with this message at 02:11 on May 8, 2014 |
# ? May 8, 2014 01:15 |
|
DrankSinatra posted:At some point, I wonder if it's viable to augment arbitrary pieces of code with logical predicates, and embed a theorem-prover into the compiler. Type-checking really is just a subset of that anyway. There's plenty of cool stuff you can do that doesn't ram you right into the brick wall that is Rice's Theorem. There are quite a few languages that let you do this. Most of them are primarily theorem provers rather than primarily designed for practical programming, but there's a spectrum. The problem that is not totally obvious is that programming anything becomes a major exercise in theorem-writing — not theorem-proving, although obviously there's a lot of that too, but just deciding what actually needs to be proved, which is in some ways harder. Writing a significant program and proving its correctness top to bottom often feels a lot like creating a new branch of mathematics devoted solely to the study of the exact behavior of your program.
|
# ? May 8, 2014 08:08 |
|
This is a really, really dumb question, but whatever: I'm working as a programmer in Spain, and since I'm one of the few that knows any english (because ), it's my job sometimes to translate design documents. There's a silly doubt I've had ever since I started. We define tasks as either "Correctivo" or "evolutivo" which means "this task is about correcting a mistake that we made and that it diverts from the design document", and "this task is about new functionality that wasn't in the design document". Now, my colleagues and bosses (yeah, they know very little english, too) say that they should translate as "Corrective" or "evolutionary" which is translating things too literally. Corrective is fine, but how do you guys call "new functionality" tasks? I keep writing it as "new functionality" but nope, "IT'S EVOLUTIONARY, Hugoon Chavez!". I doubt I can make the webpage develope gills and walk on land, but we'll see.
|
# ? May 8, 2014 08:48 |
The latter is called "scope creep"
|
|
# ? May 8, 2014 08:54 |
|
Read posted:1. If I want to familiarize myself with a revision control / project hosting service, is Github the best option for me to go with and is it even worthwhile to invest time doing this? If it's relevant I'm okay using Linux but I'm much more comfortable on a Windows machine and I don't really know if my work in the future is going to involve one platform predominantly over the other. As others mentioned getting comfortable with Linux and Python would be a smart thing to do and will help you in the future. Git-wise, install Git on Windows and get comfortable with Git Bash. If you're more of an IDE guy you can use a GUI tool later but get to know the low level commands first. Hugoon Chavez posted:I keep writing it as "new functionality" but nope, "IT'S EVOLUTIONARY, Hugoon Chavez!". I doubt I can make the webpage develope gills and walk on land, but we'll see. We just call it new features over here in former-Spain.
|
# ? May 8, 2014 09:29 |
|
Hugoon Chavez posted:This is a really, really dumb question, but whatever: "Fix" and "feature".
|
# ? May 8, 2014 09:34 |
|
shrughes posted:There's an element of the functional programming crowd that are just mediocre crazies but there are also some otherwise sane employable people. Well actually the only ones I can think of stopped caring about FP. You see all these people crying about how Haskell is so great and then giving merits that apply to any statically typed language. cf. this cool comment thread, starting with the reply by bitemyapp. He compares programmers who are not enlightened enough to use Haskell to anti-vaccers: https://lobste.rs/s/h9vu5h/what_to_know_before_debating_type_systems/comments/7d7y0x
|
# ? May 8, 2014 10:51 |
|
If you work in a software organization with systems engineers in it, what are they supposed to be doing, and what do they actually end up doing?
|
# ? May 8, 2014 17:56 |
|
Rocko Bonaparte posted:If you work in a software organization with systems engineers in it, what are they supposed to be doing, and what do they actually end up doing? Nb. many (most?) software companies use the term "systems engineer" to mean something other than classical systems engineering. Often it's taken to mean something like a super "SRE"+devops type position. Eg. they'll wind up doing stuff with Chef and Puppet rather than applying Bode-Nyquist control theory or whatever.
|
# ? May 8, 2014 18:03 |
|
DrankSinatra posted:At some point, I wonder if it's viable to augment arbitrary pieces of code with logical predicates, and embed a theorem-prover into the compiler. Type-checking really is just a subset of that anyway. There's plenty of cool stuff you can do that doesn't ram you right into the brick wall that is Rice's Theorem. LiquidHaskell lets you do this directly by embedding an SMT solver into a preprocessor
|
# ? May 8, 2014 18:16 |
Having trouble coming up with the right name for a column. Trying to come up with a schema for defining Groups and GroupMembers. A GroupMember can be a Person or another Group (nested groups). So something like: Person * id * name Group * id * name GroupMember * id * group ? * person * sub_group ? Are there some better terms for group/sub_group?
|
|
# ? May 8, 2014 22:21 |
|
fletcher posted:Having trouble coming up with the right name for a column. Trying to come up with a schema for defining Groups and GroupMembers. A GroupMember can be a Person or another Group (nested groups). In our product we a many to many join table between person and group so it is a two part key consisting of person id and group id. For tables that can have linked records of multiple types we have a link table column and link id column. You would have to implement both of these basically.
|
# ? May 8, 2014 22:47 |
|
Hello all, I'm trying to start a website for a local gaming group and I'm having a hard time identifying if its possible to add a certain function to the website. I've tried googling and searching various websites, but I think what I'm wanting is so specific that its either not out there or my keywords are poorly chosen. And then I noticed this part of SA... Basically, I'm looking for the equivalent of everyone drops a declared action into a hat/cup/bowl/whatever and then they are drawn out one at a time and resolved in that order. I would like it to be website based to prevent scheduling difficulties. Instead of everyone waiting for the day that we could all meet up at the local store, each player can turn in their action (I'm Player A and I'm going to attack Player B) and then once everyone participating has turned in an action, they all get spit out in random order. I want to play in this campaign, so I want it anonymous until all the actions are declared, so no one feels that I'm gaining an unfair advantage. The only thing that I as an end user would need to adjust would be the number of players, so that the script knows when to stop accepting actions, or an override feature if someone is taking way too long to make an action. Is this something possible to program for a website? Would any particular language be better? I have no programming experience what so ever. If I haven't been clear enough, feel free to ask for more info. Thanks
|
# ? May 9, 2014 07:06 |
|
Yes, it's possible. Regarding which language would be better: you're asking a holy war question because it's really a question of which language is the best for web dev. And best for a complete newbie doing web dev. Meh maybe it's PHP.
|
# ? May 9, 2014 11:12 |
|
I would like to write a style checker and fixer so I can quickly reformat code (Matlab) provided to me from a third-party. Obviously this could be done by a series of regular expressions but I feel like a better solution may be to use a parser to figure out the structure of the program and format it that way. Matlab has a built-in linter which will actually provide intermediate results from yacc and lex which I feel like I could then use to enforce some style guidelines. Does anyone know of any references or examples of how to use this type of output to perform style checking, or is there a better approach?
|
# ? May 9, 2014 19:46 |
|
Modern Pragmatist posted:Obviously this could be done by a series of regular expressions e: jesus yes use the yacc output and go rooting around the tree to figure out if it matches your style
|
# ? May 9, 2014 19:50 |
|
JawnV6 posted:
Well the only reason I bring up regex is because I believe that's what PEP8.py uses. Then again, maybe that works well for python since it is a whitespace-sensitive language
|
# ? May 9, 2014 19:53 |
|
regexes are used for lexing, not parsing.
|
# ? May 10, 2014 02:16 |
|
Read posted:1. If I want to familiarize myself with a revision control / project hosting service, is Github the best option for me to go with and is it even worthwhile to invest time doing this? If it's relevant I'm okay using Linux but I'm much more comfortable on a Windows machine and I don't really know if my work in the future is going to involve one platform predominantly over the other. quote:2. I'm not taking a summer semester and I'd like to keep myself involved with programming while I'm out of class. Are there any good language agnostic projects I can attempt or things to involve myself in that would work well for this? Something I can show off on a resume would probably be even better but I'm not sure I'm at the point where my knowledge is sufficient to take on a project like that, though I'm a pretty quick learner.
|
# ? May 10, 2014 21:47 |
|
BigRedDot posted:There should be no "if" --- you absolutely do want to do this, as it is a requirement for working on any real software project of any size. GitHub is common and perfectly fine to start with though be aware that git itself can be ridiculously complex in its entirety. Stick to the simple and common tasks. Popping in again to say Please just get a GUI right click explorer extension for Git (TortoiseGit for Windows). There's absolutely no reason you should be using a command line git, at least not for your first time using git. Maybe if you need all the extra options in the future after you know what they do, sure, but even then, GUI git like TortoiseGit pop up a window when you click "Push" which has tickboxes for the options, or another window when you click "Merge" that has a lot of other options. Stuff so you don't have to learn an new syntax, worrying that you could gently caress up your entire project every step, while trying to code. Also maybe read a little of http://git-scm.com/book for some syntax/names on what "Pushing" and "Stashing" and "Commiting" really is. But otherwise it should be a lot easier to get off and running with a GUI. Edit: Supposedly for Mac a good one is GitX(L) Edit2: And for linux: Rabbit VCS
|
# ? May 11, 2014 00:49 |
|
BigRedDot posted:There should be no "if" --- you absolutely do want to do this, as it is a requirement for working on any real software project of any size. GitHub is common and perfectly fine to start with though be aware that git itself can be ridiculously complex in its entirety. Stick to the simple and common tasks. That was my thinking in considering familiarizing myself with it, better to get used to it now and it has the side effect of reducing the barriers I have to contributing to projects while I'm still studying. I was considering trying to find an open source project to contribute to but I feel like I'd just be stumbling around kind of blindly, I've never interacted with a very large codebase. Thank you for the offer though, if you think that my relative inexperience won't be an issue that sounds promising to me, I might shoot you a PM! I find pretty much everything in the world interesting, data visualization included. Jewel posted:Popping in again to say Please just get a GUI right click explorer extension for Git (TortoiseGit for Windows). There's absolutely no reason you should be using a command line git, at least not for your first time using git. Maybe if you need all the extra options in the future after you know what they do, sure, but even then, GUI git like TortoiseGit pop up a window when you click "Push" which has tickboxes for the options, or another window when you click "Merge" that has a lot of other options. Stuff so you don't have to learn an new syntax, worrying that you could gently caress up your entire project every step, while trying to code. I'm pretty comfortable on the command line, but regardless a GUI extension sounds like a good idea! Navigating directories in Cygwin is a pain anyhow. I understand the basic concepts behind Git but it can't hurt to have a more formal understanding of them, I'll check out that link. Thank you!
|
# ? May 11, 2014 01:02 |
|
Jewel posted:Edit: Supposedly for Mac a good one is GitX(L) SourceTree is the only git GUI I've ever liked more than the command line. The thing it does better than everything else is fine-grained control over what parts of your code you stage and what parts you don't want to commit right now. OS X and Windows.
|
# ? May 11, 2014 01:08 |
|
SourceTree's great. It has performance issues with large repositories, but it's perfect for managing anything else.
|
# ? May 11, 2014 01:10 |
|
ultrafilter posted:SourceTree's great. It has performance issues with large repositories, but it's perfect for managing anything else. It struggled a bit on Facebook's fbobjc git repo, which was large, but that was mitigated pretty well by turning off automatic updating. I decided to turn that off for even small repos, because it tends to lock the repo for brief periods of times, which nobody usually cares about but me, plus it's not inconvenient to just press apple-r.
|
# ? May 11, 2014 01:43 |
|
I've got some Python work that I need to bundle up into executables for distribution. I run Linux and I've got windows covered with Dual Boot, but what's a cost effective way for building on Mac if you don't own one? Pony up and get a used MacMini, or are there other options?
|
# ? May 11, 2014 03:05 |
|
|
# ? Jun 6, 2024 08:57 |
|
There's OS X VPSes and such that might be more cost-effective, but your only legal option for doing it locally is buying some Mac hardware.
|
# ? May 11, 2014 03:54 |