realitybites
Active Member
Mostly dealing with connecting things. Unity3D into Syphon and then out of Resolume. Me and my students are today creating a life size projection mapped car racing game..
How easy is it to pick up? How much better is it than php for a database based website?Ruby on Rails. I can feel myself really starting to get a decent grip on it now.
I don't know php well enough to make a comparison, and it may be that something like Cake is a better comparison. But I am enjoying ruby's oop nature and functional programming capabilities, and the framework feels nice to use. My biggest headache has been learning to debug - errors messages are highly accurate, and comprehensive, but rarely point you directly to the problem!How easy is it to pick up? How much better is it than php for a database based website?
That looks brilliant.
Yeah, it's quite quick and you have all of your asset tools in one window. (You can cut and paste the code from an editor but that's cheating.) More to the point, it's hard to waste time going off on weird fiddly tangents, so you get more done.That looks brilliant.
Have you actually made anything yet?
I don't know php well enough to make a comparison, and it may be that something like Cake is a better comparison.
Or you've just taken away someone's hero statusI've been having some relatively fun times at work gluing various things together...
Specifically, a pretty long chain of tech in order to bypass limitations of selecting right printer & paper tray in a web browser when generating various despatch documents in a factory.
The user interacts with the web-app as normal in their browser. The linux server is running apache/php/mysql and the server-side of the app is written with Laravel.
A C# program that is also running on their computer establishes a secure websocket connection to the server, which is running socket.io and node.js to provide the websocket server.
Laravel has event & broadcasting features. A Redis database is used to bridge between the php/mysql side and the node.js websocket server.
When the user reaches the appropriate stages in the web-app, Laravel is told to broadcast something on the appropriate websocket channel, a channel which is unique to that logged in user & company.
The C# program receives the broadcast on that channel, which includes a URL that it is told to save to a temporary file and then print to the appropriate printer/tray.
When it asks for that URL, Laravel sends a load of data to a linux command line tool which can create a pdf file, and then Laravel sends the resulting pdf file over https to the C# program.
Blah blah etc.
Not ready to go live yet but it's going to save a couple of overworked individuals from one of their hideously repetitive tasks (selecting the tray with a4 paper or the one with some special labels every bloody time) so it's one of those rare things someone will actually properly thank me for when its all up and running.
I haven't been following the thread (just watched it though,)
elbows can you not create queues for the tray(s) on the web server, write a pdf then exec() to lp to the relevant printer(s)?
Or you've just taken away someone's hero status
The webserver is offsite so I'd rather not explore those possibilities, if I've got the right end of the stick for what you are suggesting.
I've fiddled with it, but I'm probably not the nerd you are looking for.any capistrano users here? I'm struggling with something that should be extremely simple but I can't get it working and it's either difficult to search for and/or the docs on this bit are shite.
Well, in the hope that you know, I'll give you my problem anywayI've fiddled with it, but I'm probably not the nerd you are looking for.
cap uat deploy
set :branch, set(:branch) { Capistrano::CLI.ui.ask "Deploy branch => " }
cap uat deploy -S branch=feature1
inside the Capistrano recipe:
puts "the branch you passed in was: #{branch}"
output:
the branch you passed in was: feature1
set :branch, branch
set :branch, "#{branch}"
set(:branch), { #{fetch(branch)} }
set(:branch), { #fetch{:branch} }
Just so I've got this straight, you're not trying to assign a symbol, so much as set a Capistrano variable with the symbol to be the result of your string operation?Well, in the hope that you know, I'll give you my problem anyway
To deploy, we runAnd then within the code we set a :branch symbol by asking for CLI input, like so:Code:cap uat deploy
Now, I want to be able to pass in the branch on the command line so I can script this. In Capistrano you just add the -S flag, so it's nice and simpleCode:set :branch, set(:branch) { Capistrano::CLI.ui.ask "Deploy branch => " }
So now I have a local variable of branch inside my Capistrano script to use. This works:Code:cap uat deploy -S branch=feature1
All good.Code:inside the Capistrano recipe: puts "the branch you passed in was: #{branch}" output: the branch you passed in was: feature1
But as soon as I try to assign it to a symbol, it treats the variable as a string, no matter what I do. I've tried every combination I can because 1) don't fully understand Ruby/Cap, and because 2) I can't find any information about this anywhere online. It might that I'm doing this wrong, but it feels like an obvious thing to want to do
Some of those cause an error, some of them set the branch to the string "branch".Code:set :branch, branch set :branch, "#{branch}" set(:branch), { #{fetch(branch)} } set(:branch), { #fetch{:branch} }
Any clue? I'm completely stumped
Testing, don't you love it!Holy shit, I've done. Only two days to figure out how to pass a variable to a script
Turns out I was doing it right, but my debug code was wrong