|
Who knows anything about constraint handling rules (CHR)? I've been looking to do some type inference and program analysis and it looks to be a simple way to write one. I've found some work on embedding CHR into HM, but I was wondering if anyone had any pointers?
|
# ? Apr 26, 2009 20:04 |
|
|
# ? May 14, 2024 02:41 |
|
I'd say go with Haskell, it's purely functional and really fun to boot. Here's a list of tutorials, also drop by #haskell on freenode and ask questions if you don't get stuff, it's a really friendly channel.
|
# ? Apr 26, 2009 20:19 |
|
Thanks guys. I'm not necessarily looking to learn a specific language, just to get a grounding in some of the general theory and the paradigm vs OO for example. I'll take a look at some of the Haskell tutorials though and see if I can't get somewhere with that.
|
# ? Apr 26, 2009 21:29 |
|
tef posted:Who knows anything about constraint handling rules (CHR)? AFAIK Martin is the one really pushing type-analysis through CHRs, or at least he was before he became Gainfully Employed. The thing to remember about CHRs is that they're basically a full computation engine, so you quickly become bound by the restrictions of the solver you use. With that in mind, when I was looking into it Chameleon was a purely deterministic solver, and only supported equality constraints as the primitive constraint type, so you were pretty strictly limited in what you could do with it. It's also definitely research software, so don't expect it not to be horrifically buggy beyond the bare minimum required to get papers out the door.
|
# ? Apr 26, 2009 21:50 |
|
I'm working on automating some testing tasks in a very low-level way, and I'd like to do this by emulating a USB keyboard/mouse. I know it sounds silly, but I'd like to run an application that presents itself as a USB device and makes keyboard/mouse messages this way. Are there any drivers that you guys know of that I can interface with to do this? I imagine there'd be a driver running that my application would talk to, or something. I'm only confusing myself now, so please tell me one of you knows what the hell I'm talking about.
|
# ? Apr 26, 2009 23:22 |
|
Ugg boots posted:I'm working on automating some testing tasks in a very low-level way, and I'd like to do this by emulating a USB keyboard/mouse. I know it sounds silly, but I'd like to run an application that presents itself as a USB device and makes keyboard/mouse messages this way. Most operating systems / windowing environments / Java have some sort of API for injecting simulated system input events; it's all unportable, of course, but it's easier and more portable than writing a driver, which seems like what you're talking about. Is there a reason why such a solution wouldn't work?
|
# ? Apr 26, 2009 23:29 |
|
rjmccall posted:Most operating systems / windowing environments / Java have some sort of API for injecting simulated system input events; it's all unportable, of course, but it's easier and more portable than writing a driver, which seems like what you're talking about. Is there a reason why such a solution wouldn't work? It's a series of weird bugs in a DirectX program, and using any of the Windows API functions for moving the mouse around and stuff don't work with the application as far as the bug goes. The only way we've been able to do it is by hand with a real mouse, and the bosses want us to automate this. I tried AutoIt, and it didn't work either, which is why I wanted to pretend as low level as possible to be a mouse.
|
# ? Apr 26, 2009 23:35 |
|
Ugg boots posted:It's a series of weird bugs in a DirectX program, and using any of the Windows API functions for moving the mouse around and stuff don't work with the application as far as the bug goes. The only way we've been able to do it is by hand with a real mouse, and the bosses want us to automate this. I tried AutoIt, and it didn't work either, which is why I wanted to pretend as low level as possible to be a mouse. Worse comes to worst, you can buy one of Silabs' usb "toolsticks" and make it pretend to be a mouse
|
# ? Apr 26, 2009 23:39 |
|
Otto Skorzeny posted:Worse comes to worst, you can buy one of Silabs' usb "toolsticks" and make it pretend to be a mouse I did have an idea of using a second computer to interface with the first computer's USB port, and have them communicate over the network for everything else, but then I'd have to figure out some sort of solution for that. Edit: Or maybe running it in a virtual machine and somehow interfacing in that way would work... POKEMAN SAM fucked around with this message at 23:44 on Apr 26, 2009 |
# ? Apr 26, 2009 23:42 |
|
Ugg boots posted:I did have an idea of using a second computer to interface with the first computer's USB port, and have them communicate over the network for everything else, but then I'd have to figure out some sort of solution for that. Actually having a laptop connected to the usb port impersonating a usb mouse might be a really easy solution, provided there's not some auto-magic networking daemon that would interfere
|
# ? Apr 27, 2009 00:06 |
|
Otto Skorzeny posted:Actually having a laptop connected to the usb port impersonating a usb mouse might be a really easy solution, provided there's not some auto-magic networking daemon that would interfere USB is not a symmetric protocol; most host controllers are incapable of impersonating slave devices, so you'd need special hardware to mediate the exchange.
|
# ? Apr 27, 2009 00:24 |
|
ShoulderDaemon posted:USB is not a symmetric protocol; most host controllers are incapable of impersonating slave devices, so you'd need special hardware to mediate the exchange. I want to go hang all the execs of companies that make host controllers where you can't write raw bits; I fear the amount of rope necessary would be expensive.
|
# ? Apr 27, 2009 00:31 |
|
You guys know any way to send USB bits to a VirtualPC VM? This sounds like a good bet right now, I had forgotten about VMs for this problem.
|
# ? Apr 27, 2009 01:01 |
|
rjmccall posted:AFAIK Martin is the one really pushing type-analysis through CHRs, or at least he was before he became Gainfully Employed. Thanks - it seems that constraint programming is mostly ignored for type systems, although they seem perfectly suited for them quote:The thing to remember about CHRs is that they're basically a full computation engine, so you quickly become bound by the restrictions of the solver you use. I'm planning on implementing success typing using chr in swi/prolog. I don't think it's as limited as the chameleon prototype, or as academic. But if you know any more I would be grateful.
|
# ? Apr 27, 2009 01:09 |
|
I am having trouble with java. I am trying to call a variable from another class. say I have int someint[] = {1234}; how would I call that in another class. I assume I would need to use a getter, but I must be having some weird syntax problem, because all I get is error's from eclipse. I have googled and still couldn't really find what I was looking for, but I could just be doing it wrong.
|
# ? Apr 27, 2009 03:43 |
|
JadeRaven posted:I am having trouble with java. I am trying to call a variable from another class. Variables can't be called. Only functions (and methods) can be called. If you mean accessing it via a getter, you just return the value.
|
# ? Apr 27, 2009 03:45 |
|
Avenging Dentist posted:Variables can't be called. Only functions (and methods) can be called. Oh gently caress me. I see what I have done. Thanks.
|
# ? Apr 27, 2009 03:46 |
|
tef posted:Thanks - it seems that constraint programming is mostly ignored for type systems, although they seem perfectly suited for them Well, it depends on what you're trying to do. Again, if you have a solver which works for the sorts of constraints and rules you want to use, then yes, it's very convenient to just state the problem in terms of constraints and CHRs. But constraints at their full generality can be arbitrary-rank theorems in a first-order logic with rules of inference given by the CHRs, so really, whether or not a cookie-cutter solver will work for you is something you actually need to explore. I found that writing programs in CHR was sometimes an interesting formalization strategy, but didn't really have significant practical advantages over writing them in a general-purpose language once the rules got sufficiently subtle and execution-order-dependent. tef posted:I'm planning on implementing success typing using chr in swi/prolog. I don't think it's as limited as the chameleon prototype, or as academic. Yeah, I should've guessed that, really. My experience with it is pretty minimal. I mean, it's incomplete (in the formal sense), just like all the other CHR implementations.
|
# ? Apr 27, 2009 06:28 |
|
barking frog posted:I'm writing a C# program and this will seem pretty basic, but I'm not sure on the "proper" control flow. Bump
|
# ? Apr 27, 2009 07:12 |
|
barking frog posted:Bump .NET questions megathread
|
# ? Apr 27, 2009 12:28 |
|
csammis posted:.NET questions megathread
|
# ? Apr 27, 2009 17:05 |
|
barking frog posted:It's a general GUI control flow question.
|
# ? Apr 27, 2009 17:10 |
|
Ok, so I've been going nuts wanting to strangle a combination of myself and the google results I've read... I'm trying to set an alias in my .tcshrc file so that it not only runs the command like it does now, but first gives a colored echo command. I've tried tons of different variations on escape sequences, and nothing seems to be working. It doesn't help that I think teriminal.app for OSX is a piece of poo poo... I'm running Tiger OSX, and trying to do this out of tcsh... it can't even do something basic like on the command line: echo \033[34mHello,World I don't see this -e flag I keep hearing everyone talk about in the help pages Im reading, but when I try putting that in, the computer just goes: "-e \033[34mHello,World" echo seems to be taking me far too literally. I must not know how to handle escapes right on tcsh or something... I'm pretty lovely at this... I'm sorry if this is the wrong place for this, I can't figure out where else to put it.
|
# ? Apr 27, 2009 23:37 |
|
tcsh provides a builtin echo command which covers the basic functionality of the standard echo utility with substantially less overhead. If you want something beyond that, you'll need to explicitly invoke /bin/echo.
|
# ? Apr 28, 2009 01:58 |
|
the bash built in echo works, /bin/echo doesn't (on osx) sh -c 'echo -e "\033]0;title prefix\007"' tef fucked around with this message at 02:32 on Apr 28, 2009 |
# ? Apr 28, 2009 02:28 |
|
both of those explicitly just returned everything following the echo command... Thanks for trying, though.
|
# ? Apr 28, 2009 02:32 |
|
I edited my post, but code:
this also works.
|
# ? Apr 28, 2009 02:34 |
|
tef posted:the bash built in echo works, /bin/echo doesn't (on osx) Ok, so this works in the terminal, but when I try to add it into the alias, it has a meltdown. I'm right now just trying to do it in the shell before going into the .tcshrc file and mucking around with sourcing a million times. code:
code:
I suspect that it's reading the ; as a command break, but I don't see why as it's within the echo command.
|
# ? Apr 28, 2009 14:42 |
|
Does nesting single quotes work like that?
|
# ? Apr 28, 2009 17:02 |
|
zootm posted:Does nesting single quotes work like that? No. Also all users of tcsh should hang themselves
|
# ? Apr 28, 2009 17:36 |
|
I don't use tcsh, but, why not simply define a function (instead of an alias)? In my bash experience, anytime you find yourself cursing any limitation of the alias functionality, that's when you should be doing a function. Just a thought.
|
# ? Apr 28, 2009 18:57 |
|
Otto Skorzeny posted:No. Also all users of tcsh should hang themselves I use tcsh because it's much nicer with IRAF, which uses xgterm and xterm a plenty. Well... that's what one of my professors told me anyway, and I trust him as his linux knowledge is far better than mine. bitprophet posted:I don't use tcsh, but, why not simply define a function (instead of an alias)? In my bash experience, anytime you find yourself cursing any limitation of the alias functionality, that's when you should be doing a function. Just a thought. This could work. I have a meeting now, but I'll get back to y'all.
|
# ? Apr 28, 2009 19:43 |
|
I'm not 100% sure I follow what you were originally asking for, but if it's simply "echo before actually running a command" you could do something like this, again in bash syntax which may or may not work in tsch:code:
|
# ? Apr 28, 2009 22:43 |
|
I've got an Apache problem that's a real jerk. I'm writing a RESTful API using Groovy on Grails. When I run the API locally to test against it, I can make PUT requests just fine. When running the API on Glassfish (our application server) on a different box, PUT requests do not have any parameters passed along with. Does apache require any special configuration in order for PUT requests to pass along parameters? I know the requests are getting through, they just don't have any parameters (either through Javascript or PHP access to the API) I've already upgraded the remote server's version of apache. It was at 2.2.6 (Sept 08), and a yum update brought it up to 2.2.9. (July 2008). I did find a email posting from Oct 2007 indicating that there was a bug but it was found and fixed, and I'd assume it was done by the July 2008 release I currently have. Anyone have any ideas before I rebuild apache on the remote machine? (I can't use yum, as our netops team is keeping all our boxes on Fedora 8. greaaaaaat...)
|
# ? Apr 28, 2009 23:09 |
|
bitprophet posted:I'm not 100% sure I follow what you were originally asking for, but if it's simply "echo before actually running a command" you could do something like this, again in bash syntax which may or may not work in tsch: Best as I can tell from my googling, there is no function support for csh/tcsh. tcsh is complaining about "badly placed ()s" when i try anyway... I ended up doing something similiar to this though, I just wrote a shell script with the two commands, threw them somewhere safe, and aliased <scriptname> to 'sh <location>/<scriptname>' Thanks everyone!
|
# ? Apr 28, 2009 23:12 |
|
deleted
Versus Boredom fucked around with this message at 01:08 on Apr 30, 2009 |
# ? Apr 29, 2009 00:03 |
|
theEZkill posted:I posted in the RoR thread but was told this may be a better area. I'm a total coding newb and my boss wants me to run this RoR script for Twitter. Edit - where did your boss get this rakefile? I googled the task names and I came up with nothing.
|
# ? Apr 29, 2009 03:58 |
|
I've been asked to set up a cruise control installation. It's been fun so far. Unfortunately I've now managed to get it so that after scheduling a build, it is successful but ignored. [cc]Apr-30 12:25:36 jectController- build-cdm-trunk Controller: build result event: build successful This appears in the cc logs, but the dashboard remains ignorant. I'm struggling to find documentation on what feels like an awful, awful, awful product. Any ideas, or good sources about kicking cruisecontrol until it bleeds? Alternatively, if there are similar pieces of software for ci that suck a lot less I'd be interested too
|
# ? Apr 30, 2009 12:28 |
|
tef posted:Alternatively, if there are similar pieces of software for ci that suck a lot less I'd be interested too
|
# ? Apr 30, 2009 15:52 |
|
|
# ? May 14, 2024 02:41 |
|
I am having a new webiste built and need a bit of advice. The site is pretty much a standard ecommerce site with an ordering system, shopping cart, etc. A local programmer (programmer A) who was reccomended to me proposed programming the site in php and using mysql for database management. However our current hosting company does not support php or mysql. They reccomended someone (programmer B) who proposed programming the site in asp with ms access databases. We have used our hosting company since the beginning nearly a decade ago and would like to stick with them, but I get the feeling that our site might be better off in the hands of programmer A. Is php more widely used than asp? When we need to find someone to make adjustments or updates to the site down the road, will it be easiter to find someone who does php or asp? Are there any other factors here that are important? Any help with this would be very much appreciated.
|
# ? Apr 30, 2009 17:57 |