|
Vanadium posted:If the user reassigns V, you've lost control of the loop. If they reassign _node, it's their own fault for touching a variable with a name starting with an underscore, they should know better. Makes sense, thanks. Kosani fucked around with this message at 04:32 on Aug 2, 2014 |
# ? Aug 2, 2014 02:34 |
|
|
# ? Jun 9, 2024 04:37 |
|
I had this crazy idea to help with scrolling RTS games on a tablet but I'm not sure how feasible it is. My thought was to take a windowed game, center it, and shrink it by about 20 pixels on all sides. Then, another blank window behind it would read touch events and pass along something like a keyboard event to the game to scroll around. So far what I've noticed with Warcraft 3 is that the second it loses focus to the app receiving touch input it will slow itself way down. I could spam SetActiveWindow() but I'm not sure how effective that is. Alternately there is using SetWindowsHookEx to prevent it from thinking it's lost focus, but I'm not sure if that would be detected by anti-cheat engines. Any thoughts?
|
# ? Aug 2, 2014 21:32 |
|
Anybody in here any good with LabVIEW? I'll crosspost my question from the DIY electronics thread: I'm using LabVIEW to control a set of stepper motors through an Arduino with LIFA. I would like for the stepper motors to have a smooth custom velocity profile. The subVI I'm using (Stepper Write.vi, I think this is a standard one), only gives a trapezoidal velocity profile. When I try to feed a new velocity value to the subVI, the motor stops, then enters a new trapezoidal profile. This makes coordinating motion between two motors difficult or impossible. Is there any way to use Stepper Write to get a smooth profile? Is there some other way to approach this? I'm looking into LINX but I don't really know anything about it and also I am pretty lovely at LabVIEW.
|
# ? Aug 2, 2014 22:00 |
|
Alfred P. Pseudonym posted:Anybody in here any good with LabVIEW? Well, one time I wrote a Brainfuck interpreter in LabVIEW. And some other stuff that talked over a USB or Firewire interface at one time. Alfred P. Pseudonym posted:I'm using LabVIEW to control a set of stepper motors through an Arduino with LIFA. I would like for the stepper motors to have a smooth custom velocity profile. The subVI I'm using (Stepper Write.vi, I think this is a standard one), only gives a trapezoidal velocity profile. A quick search shows https://github.com/labviewhacker/li...pper%20Write.vi which suggests there's a good chance this function is part of some kind of "LabVIEW Interface for Arduino". Alfred P. Pseudonym posted:When I try to feed a new velocity value to the subVI, the motor stops, then enters a new trapezoidal profile. This makes coordinating motion between two motors difficult or impossible. Is there any way to use Stepper Write to get a smooth profile? I don't know. I never used LabVIEW to work with Arduinos. If you can look at the source code for the .vi you're working with, you can figure out what interface it supports. In my experience, vi's in a library like this are either super-organized or a complete hairball mess, but there's nothing stopping you from understanding what it does. Alfred P. Pseudonym posted:Is there some other way to approach this? If it's impossible to smoothly transition from from one velocity profile to another (because it brings the velocity to zero and continues from there, instead of allowing you to smoothly accelerate to the different velocity), you should look at the source code of the .vi and make a modified version to suit your needs. You should see if it uses a lower-level API that would be useful to you. It probably does: it would be very weird for the most primitive interface to be one such that it had to stop before accelerating to a different velocity. I would expect your vi in question to either use some kind of "set the velocity to X" interface with a timer, or some kind of "set the position to X" interface with a timer -- I don't know much about stepper motors besides what they are.
|
# ? Aug 3, 2014 18:53 |
|
PS. Love the cabin posted:I had this crazy idea to help with scrolling RTS games on a tablet but I'm not sure how feasible it is. e: Nevermind, random loving around discovered the solution. PS. Love the cabin fucked around with this message at 03:54 on Aug 4, 2014 |
# ? Aug 4, 2014 01:46 |
|
shrughes posted:Well, one time I wrote a Brainfuck interpreter in LabVIEW. And some other stuff that talked over a USB or Firewire interface at one time. Thanks for the reply. The more I think about it, the more I think you're right. Those subVIs are some stuff I've never seen though and I'm reluctant to mess with things I don't understand but I'll look into it. I'm also interested in trying to look at the code that's on the arduino itself, but I remember the guy who was working on this program before me had some trouble dealing with that. I'm positive there has to be some reasonably simple way to do this that I haven't found yet. It seems like such a basic function.
|
# ? Aug 4, 2014 02:07 |
|
This is going to sound like a retarded as gently caress question, but here goes: How do you write a script to use an API? Our company is moving over to Highwinds as our CDN provider and I want to take a crack at writing some scripts to automate clearing cache for content when we update it on our servers. I realize the question is kind of open ended, so if details are needed please say so!@ P.S. Yes I'm a fucktard.
|
# ? Aug 5, 2014 05:19 |
|
Wicaeed posted:This is going to sound like a retarded as gently caress question, but here goes: How do you write a script to use an API? curl. Here is some random Google result that looked like it'd get you off the ground.
|
# ? Aug 5, 2014 05:34 |
|
I need to store and parse some structures - pools of objects and their configurations and associations and whatnot. I'm guessing something like JSON is a good bet, but does anyone have any good introductions to the subject so I can actually get a feel for how things are done, and what the pros and cons of different options might be? I realise this might be a bit vague but that's because I haven't had to do anything like this before
|
# ? Aug 5, 2014 22:56 |
|
baka kaba posted:I need to store and parse some structures - pools of objects and their configurations and associations and whatnot. I'm guessing something like JSON is a good bet, but does anyone have any good introductions to the subject so I can actually get a feel for how things are done, and what the pros and cons of different options might be? What language? Is the data at rest (saving to a file) or in motion (sending it through a network)? All I can suggest without knowing the above is don't use XML.
|
# ? Aug 6, 2014 02:53 |
|
Thermopyle posted:AutoIt solution: Just to follow up, this didn't work for me. I was receiving an ErrorStdOut (I believe, not at work at the moment). I tried changing the $hOutFile to several different paths, and I included <FileConstants.au3>. I'm guessing its probably user error. I ended up going old school and just brute forced it with key presses and a For loop.
|
# ? Aug 6, 2014 03:40 |
|
Hughmoris posted:Just to follow up, this didn't work for me. I was receiving an ErrorStdOut (I believe, not at work at the moment). I tried changing the $hOutFile to several different paths, and I included <FileConstants.au3>. I'm guessing its probably user error. I ended up going old school and just brute forced it with key presses and a For loop. Dunno. ~works for me~ ~wontfix~
|
# ? Aug 6, 2014 03:51 |
|
pokeyman posted:All I can suggest without knowing the above is don't use XML. I was like you, once. Then I learned the pain that comes with trying to parse a data structure without a fixed schema. Until you surrender to XML you'll never know the joy of only having to write code to handle well structured data.
|
# ? Aug 6, 2014 11:23 |
|
Blinkz0rz posted:I was like you, once. Then I learned the pain that comes with trying to parse a data structure without a fixed schema. That's cute, you assume that most XML sent is well formed and sensible.
|
# ? Aug 6, 2014 15:04 |
|
Blinkz0rz posted:I was like you, once. Then I learned the pain that comes with trying to parse a data structure without a fixed schema. But protobufs do have a fixed schema
|
# ? Aug 6, 2014 15:07 |
Blinkz0rz posted:Until you surrender to XML you'll never know the joy of only having to write code to handle well structured data. Except that JSON is about 10000x better at doing the same thing. Not to mention readability.
|
|
# ? Aug 6, 2014 15:26 |
|
down with slavery posted:Except that JSON is about 10000x better at doing the same thing. I hate XML as much as the next guy but this is absurd. While they are not a complete panacea, schemas are the single redeeming feature of XML and JSON can't compete in that regard (or at least standard JSON can't).
|
# ? Aug 6, 2014 15:45 |
|
XML schemas are great because they allow management to define all of the data interchange formats without having to consult the engineers
|
# ? Aug 6, 2014 15:48 |
|
Jabor posted:But protobufs do have a fixed schema We have a winner!
|
# ? Aug 6, 2014 18:27 |
|
pokeyman posted:What language? Is the data at rest (saving to a file) or in motion (sending it through a network)? Yeah it's going to end up as a config file that describes a particular setup, and the actual objects will be generated and connected according to whatever structure's described in that file. Some of them will be shared (multiple references to the same object basically) so if there's something more suited to managing shared elements, that would be nice This is in Java (well Android specifically) but I figured I'd ask here since it's a general question, I haven't really touched on this kind of thing before outside of HTML and a dab of XML here and there. Since I'm having to define my own structure, I figured I should probably look at some fundamentals first. And why yes, I was considering XML, funny you should mention it! Sorry if this is painfully low on detail, I don't really even know enough to describe what I need! Any reading material on the subject would be super appreciated e- I should say that the data will be generated and parsed in code, so while it would be nice to be able to gracefully handle hand-written config files, it's not a real priority at the moment baka kaba fucked around with this message at 18:57 on Aug 6, 2014 |
# ? Aug 6, 2014 18:55 |
|
Thermopyle posted:Dunno. I stepped in it. After someone higher up discovered my hacked together script that I created using AutoIt's Record tool, I've been asked something way beyond my knowledge. They want to create several virtual machines, and have a script execute at the same time on all VMs in order to stress test a network application. Essentially, simulating multiple users using an application. Is that something that AutoIt can handle? Can I load up a VM, start an AutoIt script that simulates mouse movements and key strokes, then start up another VM and do the same thing? The script would essentially simulate checking boxes and typing in blank fields. *I'm not a programmer or an IT guy. I'm a nurse who recently started a clinical informatics position. I'm thinking I flew too close to the sun. My objections about having no clue what I'm doing went unheeded.
|
# ? Aug 6, 2014 22:05 |
|
Hughmoris posted:I stepped in it. you've learned lesson 1: never tell anyone you wrote a script I can't be much help re: autoit scripting but this task sounds like a lovely thing to me. is this a web app? if so i hear jmeter is good for stress testing. if not, then the thing they are asking you to do is kind of hosed unless load testing means "like 2 or 3 users at once" because you're not gonna load up a lot more VMs than that on a regular machine.
|
# ? Aug 6, 2014 22:42 |
Hughmoris posted:I stepped in it. I think you might be better off simulating the network requests themselves rather than running an instance of the actual application. So instead of running a bunch of VMs that run the application you are just running curl commands or something that make it seem like the application is being used, if at all possible. At any rate, if you want to go down the VM route, Vagrant would probably be appropriate for this.
|
|
# ? Aug 6, 2014 23:17 |
|
fletcher posted:I think you might be better off simulating the network requests themselves rather than running an instance of the actual application. So instead of running a bunch of VMs that run the application you are just running curl commands or something that make it seem like the application is being used, if at all possible. this is what jmeter does
|
# ? Aug 6, 2014 23:51 |
|
Hughmoris posted:I stepped in it. If you really had to, you could make a VM where autoit would run when you booted the VM (just put it in the startup items folder), and you could use powershell or puppet or whatever to spin up the VMs. However, step back from the technical. You're focused on one of the questions. There are three: a) What are you measuring, and why? b) How are you going to collect it? c) Who wants the data, and why? You're focused on b). I'd worry more about a) and c).
|
# ? Aug 7, 2014 01:02 |
|
Bruegels Fuckbooks posted:If you really had to, you could make a VM where autoit would run when you booted the VM (just put it in the startup items folder), and you could use powershell or puppet or whatever to spin up the VMs. I agree with this post. If you have to do this ridiculous thing, Docker might be the way to do it.
|
# ? Aug 7, 2014 01:09 |
|
Thanks for the input, everyone. Now that I'm off work, I can explain a little more about what's going on.Bruegels Fuckbooks posted:If you really had to, you could make a VM where autoit would run when you booted the VM (just put it in the startup items folder), and you could use powershell or puppet or whatever to spin up the VMs. The scenario is this. I work for a hospital that uses electronic charting and medical records. We have a Live environment, and we have a Test environment which are almost identical. Our medication-entry module was temporary taken offline due to bugs and complaints of slowness. We are bringing it back online in the Test environment. We want to simulate multiple doctors and nurses being in the module, ordering medications. We will time how long it takes to enter a list of medications for multiple patients. The list of medications being used is the same throughout the scenario. The hospital would like 50 people using the medication module at the same time but we don't have 50 people available for testing. The current idea is now to use a number of VMs to log into the module and act as "doctors/nurses", and the VM will run through a AutoIt script in the module using keystrokes and mouseclicks. We aren't worried about the amount of time the VM takes to complete the process, we just want them to act as a load on the network/system. At the same time the, there will be live people running the medication script through the module. We will be timing those people. To answer your question: A) What are you measuring, and why? We are testing the application responsiveness and network latency for this medication module when multiple users are on at the same time. B) How are you going to collect it? We will use a stop watch to measure the amount of time it takes the live testers to run through a script, while the VMs "users" act as additional loads on the module. C) Who wants the data, and why? The higher ups want the data, to show the physicians that the fixes to the medication module have improved the latency and response time. Now, I know jack squat about VMs other than the basic idea of them. I will have nothing to do with setting them up. From what I was told by some random IT guy in a conference call, they will image everything I need. I will then essentially remote in to the VM, start the script, then move on to the next VM. I realize its probably much more complicated than that but that's what I got from them today.
|
# ? Aug 7, 2014 01:31 |
|
Your IT people should be working with your emr vendor on this. It's in no way your problem and the fact that they're asking you makes your IT department sound like a clown show.
|
# ? Aug 7, 2014 02:23 |
|
LeftistMuslimObama posted:Your IT people should be working with your emr vendor on this. It's in no way your problem and the fact that they're asking you makes your IT department sound like a clown show. Yeah this whole thing is garbage town. Here is one reason. You remoting into VMs and starting your script is not consistent and repeatable. That is, if you do it again the timing will be totally different. That will make the results from test to test not comparable. That's not even mentioning the stop watch bit for showing timing the latency. jfc this whole thing is amateur hour. The worst part is that this should not even remotely be your problem. IT should be working with the software vendor to develop a benchmark process. Either IT, the vendor, or both are incompetent.
|
# ? Aug 7, 2014 04:43 |
|
Hughmoris posted:To answer your question: There are multiple problems: a) You can't rely on stopwatch measurements. Taking a bunch of numbers with a stop watch is really boring, and you won't get consistent results even with same person, different day, exact same scenario. If you get a bunch of different people, half won't understand the direction. b) It's going to be very difficult to repeat the results with some autoit script that bangs on the keyboard anyway, to say nothing about using VMs and lack of controlled environments. You'll get different numbers every day of the week. c) There is no scenario where the physicians are going to give a gently caress about your numbers. You probably don't have enough information to know if you're even reproducing the problem or not, so it's unlikely that your script is going to reproduce the problem in the old version, and demonstrate that the problem goes away in the new version. What you need to do is get the impact analysis of the fix - e.g. what did the vendor say was the problem? What was the fix? How did they test it? I work for a pretty major medical software company, I used to do this kind of testing for them for a living - if you don't have a dedicated group doing software testing in your hospital, your IT department is going to end up with serious problems when they install all this bullshit medical software that doesn't work.
|
# ? Aug 7, 2014 07:52 |
|
Edit: On second thought, I realize me complaining won't do any good. I guess I need to spend some time on the AutoIt forums and see what I can figure out.
Hughmoris fucked around with this message at 17:49 on Aug 7, 2014 |
# ? Aug 7, 2014 17:27 |
|
The person/team that should be doing this work for the software vendor is almost certainly compensated better than your role. This sounds increasingly ridiculous that you're on the hook for this effort.
|
# ? Aug 7, 2014 17:59 |
|
Hughmoris posted:Edit: On second thought, I realize me complaining won't do any good. I guess I need to spend some time on the AutoIt forums and see what I can figure out. Just send CYA emails stating that you have no idea whether your code is HIPAA compliant and suggest an external audit of anything you produce.
|
# ? Aug 8, 2014 00:05 |
|
They created the VM this evening and I had a few minutes to play with it before I went home for the day. I'm 99% sure I can't do what they want by Monday but I can say I've learned a lot about using AutoIt to manipulate GUIs, so I guess this isn't a total loss.
Hughmoris fucked around with this message at 02:30 on Aug 8, 2014 |
# ? Aug 8, 2014 02:26 |
|
Thanks thread for the help with installers. Turns out Innosetup was remarkably simple to set-up and use for my particular usecase! New question though. For a test framework, we want to automate resetting the databases (drop the tables, recreate the tables, reupload csv files into the tables) that would support most big DBs and would be reasonably easy to add a new DB into the framework unless it requires some special bit (like how Oracle doesn't have a time column type). I got recommended Hibernate and Liquibase. Hibernate seems like massive overkill for what we want, while Liquibase isn't necessarily used for what we want, but it could be wrangled to do it. What else is there beyond Liquibase as this isn't really the proper usage it seems for Liquibase (as I'd most likely use rollback to rest things, before re-adding the tables). Most threads I've found seem to compare it to Flyway but I'm not doing a "migration" really. The build system utilizes gradle and the project is in Java. Master_Odin fucked around with this message at 20:42 on Aug 11, 2014 |
# ? Aug 11, 2014 20:03 |
Master_Odin posted:New question though. For a test framework, we want to automate resetting the databases (drop the tables, recreate the tables, reupload csv files into the tables) that would support most big DBs and would be reasonably easy to add a new DB into the framework unless it requires some special bit (like how Oracle doesn't have a time column type). I got recommended Hibernate and Liquibase. Hibernate seems like massive overkill for what we want, while Liquibase isn't necessarily used for what we want, but it could be wrangled to do it. What else is there beyond Liquibase as this isn't really the proper usage it seems for Liquibase (as I'd most likely use rollback to rest things, before re-adding the tables). Most threads I've found seem to compare it to Flyway but I'm not doing a "migration" really. Do you mean set up databases on a central server? Or on each student's own machine? Is it really a good idea to want to support multiple different database systems? For the central server case, I'd write some DBMS-specific scripts to do it. I think most serious databases support some kind of template database system, meaning you can set up a pre-filled template database and then basically issue a command to clone it. For those that don't, there's a good chance you might just be able to set up a template database anyway, copy its files on the filesystem, then run some GRANT/REVOKE commands on it to get permissions set up.
|
|
# ? Aug 11, 2014 20:59 |
|
nielsm posted:Do you mean set up databases on a central server? Or on each student's own machine? Is it really a good idea to want to support multiple different database systems? It was suggested to me that Liquibase would be the easiest thing to setup for it, and it would be doable with their changelog (with one change being adding the tables, then another inserting the data) which would support rollbacks for resetting. I do see the appeal of doing something like this instead, but mainly, I'm just looking for various options at this point before committing to anything. Master_Odin fucked around with this message at 22:45 on Aug 11, 2014 |
# ? Aug 11, 2014 22:43 |
|
What might be a good way to document a somewhat complex asychronous system at a high level? I have a system with a number of distinct threads which need to interact with each other in different ways (not just a bunch of worker threads running a similar loop). Even as I code this up, I'm getting a bit lost in the complexities of some of the synchronization that has to happen and what each thread relies on. I don't think it's really that bad, but it's definitely going to be difficult code to come back to, and difficult to read without some sort of plain english or visual documentation.
|
# ? Aug 12, 2014 21:28 |
Can you describe the system in terms of message passing and responses? If you can describe each "message" (even if it technically isn't done by message passing) in short, and what purpose it serves, then describe high-level tasks by what messages they involve, that might lets others get an understanding. Obviously this needs to be a hypertext document.
|
|
# ? Aug 12, 2014 22:10 |
|
|
# ? Jun 9, 2024 04:37 |
|
SintaxError posted:What might be a good way to document a somewhat complex asychronous system at a high level? I guess this isn't standard nomenclature, but we used to draw "Feynman Diagrams" that described interactions between various parts of a system. Add more lines for more agents, show expected flow of complex or representative transactions. Is there a better name for this type of diagram I'm unaware of?
|
# ? Aug 12, 2014 22:22 |