|
dougdrums posted:Ah, that's is a common, sensible, and difficult problem. I guess the first thing I would do (and you've probably already tried) is figure out what encoding the device qualifies as "normal", and see if there's something to go from utf-8 to moon encoding. This is going to be the best result. Even if the device can only handle say Latin-1, that covers a lot of cases (leaving Cyrillic and Asian scripts, among a host of others, out in the cold of course). dougdrums posted:Names are a strange thing. I believe Stallman is attributed with saying, "names are just names" when asked about the name of emacs. If I recall the story correctly, ed and emacs were named after an ice cream store, which was named after two deceased homeless men. Ken Thompson wrote "ed", which is just short for "editor". Editor MACroS was almost certainly named for being, well, editor macros. You wanted "bolio" (which may have been named for Emack & Bolio's after EMACS had already named). Finally, is your name one of those Eastern European of-course-W-is-a-vowel types?
|
# ? Dec 6, 2016 00:14 |
|
|
# ? May 15, 2024 04:32 |
|
ulmont posted:Ken Thompson wrote "ed", which is just short for "editor". Nah it just has an odd pair of consonants that you'd have to guess if you can't bring to memory a time when you've heard it ... I guess. I figured I messed that up somehow I also figured it was bs. ed seems more reasonable as a hobo's name too though. dougdrums fucked around with this message at 01:51 on Dec 6, 2016 |
# ? Dec 6, 2016 01:48 |
|
Ciaphas posted:Never heard of it, but I'll take a look. We only currently have the one production server running at a time, though. (Potentially multiple clients watching the server, but only one production server. A dev server too but that'd be a completely separate entity.) If you have multiple processors per server, or maybe even multiple cores per processor, you might still be able to use Condor. However, I won't swear that it will work on old hardware, and it may very well not be the solution to your problem at all.
|
# ? Dec 6, 2016 01:54 |
|
Peristalsis posted:If you have multiple processors per server, or maybe even multiple cores per processor, you might still be able to use Condor. However, I won't swear that it will work on old hardware, and it may very well not be the solution to your problem at all. Looks like it doesn't support Solaris/SPARC anyway, which would be a requirement for however much longer we have to use these loving things. Probably forever, given my luck. If I'm gonna home-roll something for this though I need to work out where to start. Don't even know how to do THAT, given my lack of knowledge on client/server applications and threading, hence my original post!
|
# ? Dec 6, 2016 02:53 |
|
I am taking baby steps into programming and need to step it up and learn proper repository methods and practices. Is there a good common book or site to explain this from a beginner's standpoint? I'm coding on my own within my team at this point and have been keeping everything locally which seems like a terrible habit I need to break.
|
# ? Dec 6, 2016 03:10 |
|
Ciaphas posted:If I'm gonna home-roll something for this though I need to work out where to start. I would take a long, long time to figure out if there's anything out there that's even close. It's a dev nightmare mixed up with ops horrors. Is every possible machine in the pool able to run any possible job? If not, then you've got pools to manage, jobs to crack own & analyze to figure out where they can or should run. Can users log directly into the machines and kick things off? If yes, do the batch jobs get kicked off or continue? If no, are all the log files copied off the machine so a user can poke through to figure out what broke? How's authentication handled? Back in my college days the SPARC unix machines would be hotly contested by the end of the quarter. I was in a parallel computing class where speedup was critical, some jerk running their AI against itself would take a core away and make my work look worse. I made a utility that would scan a dozen hosts, find one with acceptable load and none of the ai process name, then hop on and run my test there. If it's one pool of machines, well-intentioned knowledgable users, common jobs without too much differentiation, it might be manageable. Still, I'd pluck something OTS if at all possible. PierreTheMime posted:I am taking baby steps into programming and need to step it up and learn proper repository methods and practices. Is there a good common book or site to explain this from a beginner's standpoint? I'm coding on my own within my team at this point and have been keeping everything locally which seems like a terrible habit I need to break.
|
# ? Dec 6, 2016 03:46 |
|
JawnV6 posted:I found the Atlassian git workflow tutorial very helpful when I started working with bigger teams. Is your team already using version control in a way you want to learn or are you bringing it to the unwashed masses? It's me, I'm the unwashed mass. Our new enterprise software has a Java API and everyone else on the team either is resisting learning programming or doesn't have the time to learn, even though giant chunks of processes can only be handled by that or SQL queries (which they also don't want to learn). So I, having a mighty 8+ months of Java under my belt, am the go-to for coding and want to get some best-use practices established for the good of myself and any fool to follow me. Our company has a thorough version control and review process but because our team is not officially programming-related I'm in a weird zone where no standards are expected or dictated.
|
# ? Dec 6, 2016 04:08 |
|
JawnV6 posted:So you want something on this list? Googling would be some combination of "distributed batch job scheduler". I'll look into those things, thanks. They're almost certainly much more than we'd need, though; as far as the complicated job queuing part goes there's one program--two if you count the slower extreme-time-accuracy fork--that's ever going into a processing queue. It just doesn't have well known memory usage (or CPU but I'm mostly concerned about memory) patterns with some of the newer sets of data we have to process, which leads to the operators unknowingly kicking off too much stuff from the schedule at once and making everything die when the system runs dry. (Our current submission GUI that I was aiming to replace does queue, but it has multiple smaller queues running simultaneously for historical reasons so it can still get overrun.) It's also one (1) production machine because my org is a cheap bastard that's chronically 20 years behind so distributed processing's not bloody likely to ever happen
|
# ? Dec 6, 2016 04:39 |
|
PierreTheMime posted:Our company has a thorough version control and review process but because our team is not officially programming-related I'm in a weird zone where no standards are expected or dictated. The most important thing I learned when using version control is to stop worrying about what the next person will think. At least in the sense of "oh no, what if they see this and think I'm stupid!" leading to huge commits when features have to go live. Realistically, everyone sussed out my stupidity unassisted by my code history and the person most likely going diving back there was me anyway. Ciaphas posted:It's also one (1) production machine because my org is a cheap bastard that's chronically 20 years behind so distributed processing's not bloody likely to ever happen Then a little service to re-start killed jobs. Then a little tracker so folks can see how long their job has been queued or running...
|
# ? Dec 6, 2016 05:22 |
|
JawnV6 posted:Psh, forget I said anything. It almost seems more appropriate to have a little daemon that kills the last started job when a certain memory threshold is hit if that's your immediate problem. Doing something little like that in the short-term is a good idea, thanks. In the longer term I still want to roll a new version of our job control GUI for a lot of other reasons (but today especially because Exceed crashing and taking all the jobs with it because this code is ancient crap really sucks) [today really loving sucked]
|
# ? Dec 6, 2016 05:40 |
If you're going to be writing your own job control daemon, consider if making it web-based wouldn't be simpler, you won't have to invent a network protocol with de/serialization, won't have to implement it twice on client and server, and there's a decent chance you can use an off-the-shelf framework. Unless maybe you need the operators to upload datasets or similar, then a HTTP-based thing may be more trouble than worth.
|
|
# ? Dec 6, 2016 08:33 |
|
e: pfft answered my own question
QuarkJets fucked around with this message at 10:15 on Dec 6, 2016 |
# ? Dec 6, 2016 09:35 |
|
PierreTheMime posted:It's me, I'm the unwashed mass. The Atlassian stuff is great (as in its actually readable) and it gets into collaborative workflows later, so you can see how to organise things for your team. Also your IDE probably has git integration or a plugin, so you can do a lot of work in the GUI, which is nice for learning and just getting people using it with the least friction Just start a small project and create a git repo in it, do an initial commit and then go wild. You'll get to a point where you're all 'why wasn't I doing this earlier' because it makes it so much easier to do stuff and know you can put any of it back exactly how it was before
|
# ? Dec 6, 2016 11:50 |
|
I have an HTML file with about 1,000 lines. A coworker was editing the file and accidentally created a misplaced bracket < so the bracket symbol appears outside of the page content, at the very top-left of the screen. Unfortunately since its an HTML file there are about 552 other opening brackets and they all look exactly the same. I tried searching with the exact word but that didn't work, and I tried searching for << in case she doubled one up but no luck. I also tried pointing at it with Firebug but it didn't reveal the location since the page was already rendering it incorrectly. Would there be a regular expression I could use to find it? I have no idea if there's anything we can do.
|
# ? Dec 6, 2016 18:26 |
|
me your dad posted:I have an HTML file with about 1,000 lines. A coworker was editing the file and accidentally created a misplaced bracket < so the bracket symbol appears outside of the page content, at the very top-left of the screen. Do you have source control and know when the coworker made the change? Go back and look at diffs from around that timeframe to narrow your search down. Otherwise, it's just a 1000-line-long file. Shouldn't take you too long to read it.
|
# ? Dec 6, 2016 18:28 |
|
Not that sophisticated around here We're reading through it now. She sent me the file and we're both going through it.
|
# ? Dec 6, 2016 18:31 |
|
me your dad posted:I have an HTML file with about 1,000 lines. A coworker was editing the file and accidentally created a misplaced bracket < so the bracket symbol appears outside of the page content, at the very top-left of the screen. Run it through an HTML validator like this one: https://validator.w3.org/. It should do a decent job of telling you what's wrong. It will probably also tell you that a bunch of other things are wrong, but the error you're looking for should say something like "end tag for <X> omitted". Alternatively you can probably use the Developer Tools in Chrome or other browsers to figure it out. Also, I don't know what this HTML document is for, but judging by the fact that it's 1,000 lines and also the fact that multiple people are working on it, you really should be using source control. If you're already using source control, just do a diff between the versions before and after your coworker messed up the tags. (Edit: You were already asked about this.)
|
# ? Dec 6, 2016 18:35 |
|
me your dad posted:Not that sophisticated around here Would using an HTML formatter help at all? Something like http://www.freeformatter.com/html-formatter.html might show you the error. If you have to find it manually, comment out all the content between <html> and </html>, and reintroduce blocks of it at a time to determine which block has the error.
|
# ? Dec 6, 2016 18:35 |
|
Thanks - I'll try the validator and format checker. It was just a local HTML file she was working on for an HTML email - nothing fancy. She is the only person who works on it but when she sent me a test of the email I noticed the bracket up in the corner. Peristalsis posted:If you have to find it manually, comment out all the content between <html> and </html>, and reintroduce blocks of it at a time to determine which block has the error. This ended up doing the trick. Thanks! me your dad fucked around with this message at 18:48 on Dec 6, 2016 |
# ? Dec 6, 2016 18:35 |
|
nielsm posted:If you're going to be writing your own job control daemon, consider if making it web-based wouldn't be simpler, you won't have to invent a network protocol with de/serialization, won't have to implement it twice on client and server, and there's a decent chance you can use an off-the-shelf framework. Sadly I know even less about web server programming than I do about general sockets and networking, read: gently caress all compared to "I can write an echo server/client ". I guess I'd get Apache (or something) installed on our compute hardware to start with but everything from there forward is a total unknown.
|
# ? Dec 6, 2016 19:55 |
|
me your dad posted:Would there be a regular expression I could use to find it? I have no idea if there's anything we can do. I know you already sorted it, but you could maybe do a script that scans through collecting angle brackets, and flags up any < that was preceded by another < (meaning the previous one wasn't closed). You could probably do that with a regular expression, I bet Satan knows how
|
# ? Dec 7, 2016 01:40 |
|
baka kaba posted:I know you already sorted it, but you could maybe do a script that scans through collecting angle brackets, and flags up any < that was preceded by another < (meaning the previous one wasn't closed). You could probably do that with a regular expression, I bet Satan knows how <.*(?!>).*< I think.
|
# ? Dec 7, 2016 05:16 |
|
Fergus Mac Roich posted:<.*(?!>).*< I think. you can't do paren matching with a regular expression
|
# ? Dec 7, 2016 05:39 |
|
Can't you with the weird not-technically-regular backtracking PERL flavor?
|
# ? Dec 7, 2016 06:15 |
|
leper khan posted:you can't do paren matching with a regular expression We're not actually trying to do balanced matching here. HTML doesn't put tags inside other tags, so if you simply look for two <s without a > in between, you're only going to have false positives from like, inline javascript and stuff. And you could even build a regular expression that would ignore inline javascript and not have false positives, though it'd be pretty horrendous.
|
# ? Dec 7, 2016 06:25 |
|
I'd like to learn about design patterns and so I'm looking for a book or some website. Any recommendations? I'm thinking about getting Head First Design Patterns Le0 fucked around with this message at 07:53 on Dec 7, 2016 |
# ? Dec 7, 2016 07:42 |
|
Jabor posted:We're not actually trying to do balanced matching here. HTML doesn't put tags inside other tags, so if you simply look for two <s without a > in between, you're only going to have false positives from like, inline javascript and stuff. <p id="<b>">
|
# ? Dec 7, 2016 13:35 |
|
Jsor posted:Can't you with the weird not-technically-regular backtracking PERL flavor? yes
|
# ? Dec 7, 2016 13:38 |
|
Le0 posted:I'd like to learn about design patterns and so I'm looking for a book or some website. Well, there's the canonical treatise on the subject: https://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612 I read it, and found it to be pretty dense and not as life-altering as I had hoped. If you use C++ for a lot of enterprise-level stuff, it's a pretty good reference. If you don't, you'll spend a fair bit of energy translating it to something more relevant in your mind. If you happen to be a Ruby programmer, Olsen's Design Patterns in Ruby is a decent, ruby-specific port of the first book.
|
# ? Dec 7, 2016 16:31 |
|
This is still sitting in my Amazon cart and I haven't read it yet, but I was recommended Smalltalk Best Practice Patterns as the best design pattern book. It supposedly is useful across languages and doesn't require smalltalk experience.
|
# ? Dec 7, 2016 19:55 |
|
I was thinking of trying to write a better replacement for Headphones (the music management app). I basically am imagining an imperative script which you pass a directory, it queries the determines how the files are converted/copied/ignored, output format/tagging, filenames, etc and then you get a directory out that you copy to your MP3 player. I have mostly been writing Java at work for several years now so that's my comfort zone. I have really come to appreciate the Java build/testing/deployment ecosystem and I'm loathe to leave it. I am really leery about writing non-trivial projects in Python, I don't like dynamic languages that much and previously I have got bitten by the GIL when I wanted to run previous projects in parallel (although in theory something like Flask should handle that appropriately). I can read it and I use it to write scripts when I need, but that's about as far as I go with Python anymore. There's also a lot of good Java libraries for handling the complex file parsing poo poo and so on - a lot of this is essentially written, I just need to plug pieces together. However, Python does seem like a good for for letting users design their own scripts - it's dirt simple and there's no need for anyone to compile code or anything like that, you could just import and away you go. Is there a good way to do this kind of "scripting" within Java without writing your own interpreter and creating an inner platform? What I am sort of imagining is breaking the conversion logic out into an API or microservice call. The microservice could be Python or anything you want - you pass it an identifier for a directory for an album and it returns you what should be done with each file in a JSON object. Both of them could talk to the same database so you could allow logic like "is this the highest-quality copy of the album that I have" that's outside the scope of a single album, and so on. Then the main app can take the JSON object containing the logic of what happens to each file and handle the business of actually converting and so on. The logic microservice doesn't have to happen day-1 but I could easily design it with that in mind for later, and the implementation of the microservice should be really straightforward to implement in whatever language. Is this at all a good idea? Is there a better way to do any of this / am I drastically overengineering this task? Or should I just suck it up and write Python? Paul MaudDib fucked around with this message at 02:13 on Dec 8, 2016 |
# ? Dec 8, 2016 02:05 |
My go-to recommendation for small embeddable language is Lua. It's designed for embedding and solving small tasks in bite sizes, and there's bindings for almost anything that matters. Specifically for the combination of Java and Python, there's also Jython, but I don't know if it's actually useful, or easy to use, or even updated.
|
|
# ? Dec 8, 2016 16:15 |
|
You're probably looking for JSR-223/javax.script if you want to embed a scripting engine in Java. That's the standard API that many different engines support including Jython, and you can pass a string when you construct the engine to tell which language you want, meaning that it supports any number of languages at once.
|
# ? Dec 8, 2016 16:48 |
|
nielsm posted:Yeah in the hardware architecture course I took, the major project was to implement a subset of the MIPS instruction set in a circuit simulator. One of the big advantages IIRC is that all instructions are exactly one word long, simplifying decoding a bunch. Well, this is true of any classical RISC (excluding e.g. ARM Thumb and for that matter MIPS16).
|
# ? Dec 8, 2016 20:17 |
|
Hammerite posted:This document is hideous - why is this person trying to represent matrix mathematics in plain ASCII text? It's nigh-unreadable. Version 1.21 30th November 2003 What would you use for the web in 2003?
|
# ? Dec 9, 2016 00:40 |
|
I have a crazy idea. PostgresSQL has row-level security and I don't see why you couldn't write all your app with embedded modules or by writing a thin layer that connects it to a backing service through RabbitMQ or something like that. Then you give your clients direct DB access. Can you tell me why this is a bad idea before I go ahead and do that
|
# ? Dec 9, 2016 01:37 |
|
Can someone describe abstraction? I understand what it is for the most part, but I'm not sure how to describe it in a way that isn't vague and wishy-washy, and I haven't been able to find a single concise, clear explanation on the entire Internet.
|
# ? Dec 9, 2016 03:30 |
|
Subyng posted:Can someone describe abstraction? Ahem. In general I'd characterize it as being the process of identifying categories and characteristics that allow you to deal with an entire class of things instead of one specific thing. E.g. instead of writing code to draw a circle, you write code that can draw shapes, of which circles are one possible type. Or instead of writing code that will graph the temperature in your area, you write code that can graph any arbitrary data. Instead of writing a 2D platformer game, you write a 2D physics engine, which can be used to create any number of different games. In general this means being "one step back" from the problem, which has its upsides and downsides. On the good, your code becomes more flexible and easier to re-use in other contexts. On the bad, your code becomes (sometimes substantially) harder to write, and writing it doesn't actually directly solve the problem you had in the first place. Go ahead, guess how many of those examples I'm guilty of.
|
# ? Dec 9, 2016 03:37 |
|
Subyng posted:Can someone describe abstraction? I understand what it is for the most part, but I'm not sure how to describe it in a way that isn't vague and wishy-washy, and I haven't been able to find a single concise, clear explanation on the entire Internet. It's vague and wishy-washy by definition and, if you're anything like me, understanding comes through usage and not description. At some point it will just click. Smoke a bunch of weed and read this. - an abstraction is a description of a concretion without using terms of the concretion - a pipe is a concretion, a painting of a pipe is an abstraction - a class is a concretion, the interfaces it implements are abstractions
|
# ? Dec 9, 2016 03:39 |
|
|
# ? May 15, 2024 04:32 |
|
Abstraction is fundamentally about hiding irrelevant details - this allows users of the abstraction to ignore what's going on underneath, and instead focus on what's important. An example is a car. A car is a horrendously complicated machine with all manner of valves, springs, pistons, pumps, spark plugs etc. all working in concert. If the driver had to keep all that in mind in order to drive a car, it'd be essentially impossible for any human to drive safely. Thankfully, there is an abstraction, the steering wheel and pedals. This abstraction lets the driver mostly ignore what's going on under the hood, allowing them to instead focus on the important things - what direction to go, and how fast.
|
# ? Dec 9, 2016 04:04 |