« first day (1599 days earlier)      last day (3356 days later) » 

7:00 PM
Ah. Npm only cares about the commonjs modules. The built files can be built but shouldn't be included in the repo...
 
@FlorianMargaine not in the repo, but they gotta be published, right? otherwise it's all pointless
I have a disconnect between what should end up in npmjs.com and what comes out of gulp
 
npm publish publishes the git repo
Do you use commonjs in your sources?
 
yes, ish
 
gulp runs babel and tests, produces stuff in dist/, that includes three versions of the lib (for different loaders)
 
7:03 PM
Ah...
 
I want to set up the package.json and .travis.yml so it builds in CI and publishes
 
mimosa is amazing
 
Hm dunno then, sorry.
 
that published version, I assume (this is the questionable bit), should be or include the dist/ folder mostly
 
7:04 PM
Oooh I know.
 
should package.json's root be "dist/lib-common.js" then?
 
But, uh.... I'm on mobile, will you still be there in 2 hours or something?
Yeah, basically
 
@FlorianMargaine yes.
 
And use the install hook to generate the sources when you run npm install foo
 
@FlorianMargaine wait, you distribute the source, then run the build tool on install? wtf?
but that means anyone who wants to use the module... has to have gulp installed?
 
7:06 PM
@SterlingArcher I'm pretty bad at playing the piano. On the pro side I never got CTS or anything like that.
 
@ssube put gulp as a dependency of your project
I think devDependencies are installed to run stuff at install time
It should be anyway
 
12 mins ago, by rlemon
maybe a silly solution: I wanna use screen <device> <speed> in node via child_process->spawn so I can see a live output from the terminal (and possibly send new commands) but it is bitching I need the stdout to point to a terminal
anyone used 'screen' via exec/spawn in node?
 
@copy but in this way don't you only get radiants from 0 to Pi?
 
@FlorianMargaine it's already in as a dev dependency
 
7:10 PM
@towc That's the minimum distance
 
@copy so I have to add what I get to the smallest radiant, right?
 
@SterlingArcher carpal tunnel syndrome
 
wait... d stays for distance! OOOOHhh
 
ahhh that's good at least lol
 
Nik
:) Hi Guys!
 
7:11 PM
hey @Nik
 
Nik
@NickDugger See, I dropped 'c'
 
ohh looky there you did
 
Nik
@rlemon Yup, I've gone the Russian/German way.
 
Nikoli would be proud, but he has vodka
 
Nik
@SterlingArcher I dislike alcohol... both in my chem course and in irl.
 
7:13 PM
I love vodka
 
Nik
@SterlingArcher i love humans.
 
I hate humans and love alcohol
which is why I'm single
 
Vodka makes me love humans
 
Nik
@NickDugger Gfy, the 1st step is realizing the problem.
@SterlingArcher Then, I shall not advocate against it in your case.
 
I love alcohol. I also make good cash, have a good woman, weight train avidly and recently stayed in a holiday inn express.
I win.
 
Nik
Um, guys, I suck at asking questions. In my time here at stackoverflow, I have failed time and time again to ask a good question. My latest disappointment here. I think you guys understand the intention of my post. Could someone tell me how to make it better? (-2 is the standard score for my Q's :( )
 
hi all
 
> I wish to effectively build something like mangareader. I'm interested on how to work up to that from the ground level. What about sites like xkcd, smbc, [insert your fav webcomic site here], etc, etc.? How do they work?
 
@Nik your question is too broad.
 
@Nik problem is, this cannot be salvaged to meet the SO requirements
 
7:18 PM
@Nik you're asking opinionated questions like "what is the best" etc
 
you need to attempt to make your site, then come here and ask when you hit problems.
 
Stack is for specfic, reproducable programming issues
 
Nik
O_O so, yeah, too many mistakes.
 
SO isn't intended to help you choose a tech stack to start making a site.
 
codereview is good when you are done and want people to tell you how much you fucked it up.
 
Nik
7:18 PM
@ssube then, what is?
 
We've all been there
 
If you ask SO to tell you which language you should use, we'll debate it forever.
You need to have the requirements and be moving on them already. If you run into roadblocks then, SO can help.
 
> what is the best way to add two numbers? <- not good
> when I add input.value and 10 together I get unexpected results: here is my code .... <- better
 
Nik
@SterlingArcher =_= Maybe one day, I'll ask a decent question. hope I won't be blocked by then
 
@Nik there really isn't a site for that. You're the only one who knows your requirements well enough to choose the stack.
 
Nik
7:20 PM
@taco Hi taco! :D
 
SO exists to comment on problems with the implementation, we can't help you with requirements.
 
@Nik you'll get there, check out my lowest questions. It all gets better with experience
 
@ssube speaking of which, you node yes?
er. misping @SterlingArcher
 
Not for a while but yes
 
7:21 PM
D:
 
cc @SecondRikudo you might enjoy this
 
Nik
... I was expecting someone to say Drupal or PHP something... Effectively switching between the pages with reloading the same content. That's what I'm looking for. Isn't it obvious!? — Nik 13 mins ago
Is that a specific question?
or again, is it too broad?
 
no, not it is not obvious :P — rlemon just now
 
Nik
@rlemon lol, I really have to work on my communication skills.
 
research template engines
I think that is mostly what you want
 
Nik
7:25 PM
@rlemon This looks like a deep rabbit hole. Well, hope I find the right thing.
@rlemon Btw, Is there anyway to salvage myprevious main site question?
 
@Nik you using a database at all?
 
Nik
Would asking "How does XKCD manage its content?" be any more better than what I'm asking now.
 
jekyllrb.com might be a good fast/simple solution
 
Nik
@Loktar ................. nope.
 
@rlemon I'm not sure at the moment
@Nik no
we don't know how XKCD does it
 
Nik
7:28 PM
@ssube O_O I feel it's some weird voodoo of jquery, php, some cms, image maps and ... nasa stuff.
 
<? include('todayscomic.php') >
lol
anyway that looks pretty simple man I think you are over thinking how you should do it honestly
 
Nik
@Loktar I am. Overthinking is the only way to think.
@Loktar wtf is that!?
 
@BenjaminGruenbaum Are you "Benjmain" from the article?
 
@Nik joking about just doing php includes for the content :P
 
7:31 PM
@BenjaminGruenbaum Got scared there for a second
 
You gotta use the full php tag nowadays, unless you modify your config
 
Nik
@Loktar It seems everywhere I turn in my adventure (yes, that's what I'm calling it) I find PHP, Drupal or Wordpress. This is all too scary. I need results soon. Otherwise, I'll give up like the loser I am :(
 
PHP, Drupal, Wordpress oh my!
 
and the Travis docs are... wrong and/or incomplete
 
use node, mix with ejs, rejoice
 
7:34 PM
@Nik I mean you don't need any of those you could just have a ton of different .html files and load them in via js
 
is it actually impossible to deploy things to npm?
 
ohhh ohhh ohhhh use fragbuilder.js
it is rock solid
 
or is it just that nobody has a CI deployment?
 
Nik
@Loktar ... lol, I thought about that but... that sounds.. stupid. But, I guess, something that stupid to a stupid might not be stupid.. but yeah, maintenance. I want that low.
 
yeah its very bad maintainability wise
 
7:38 PM
@ssube ci is handled with travis usually
 
Nik
well, thanks for the help. I guess I'll search for the path myself. There's got to be an easy way.
Bye, Guys! You're wonderful!
 
Yes. Yes I am.
 
@FlorianMargaine yet travis' docs are wrong or incomplete, depending on the page, npm doesn't cover any of that, nor does anyone explain how you indicate the files that need deployed.
 
TIL about Should.js... interesting
 
publishing to npm is like learning maven, except it doesn't work at the end
 
7:40 PM
foo.should.be.an.instanceOf(Array); .... pretty smart
 
var cp = spawn('./script.sh', [devicePath, baud]);
cp.stdout.on('data', function() { console.log(data.toString()); });
cp.stderr.on('data', function() { console.error(data.toString()); }); // execvp(): Permission denied
:(
 
@ssube just publish as somebody else so they look like the fool
 
like http://docs.travis-ci.com/user/deployment/npm/
what does it release? how is your pakcage supposed to be set up?
 
script.sh just has this (i'll move the args to variables later):
#!/bin/sh
screen /dev/ttyO4 57600
 
thats not much
 
7:41 PM
npm is just like "enter stuff in package.json" but doesn't even enumerate the allowed keys
 
chmod +x ./script.sh @rlemon
 
okay
new error
 
> "May you please prescribe a resource"
.__.
 
> stdout Must be connected to a terminal
how solve ?
 
7:43 PM
screen is a tool to create a new tty which you can exit out of
and let run in the bg
 
yes
 
/me loves screen
 
I have two devices connected via serial port. I need to create a tty I can control via node
tty.js doesn't wanna compile on the device. so I'm trying to crappily re-create whjeels here
 
@FlorianMargaine covers most of it, but none of the docs for any of those tools explain how to get the compiled library to exist in npm
 
Cool
 
7:44 PM
I liked screen when i was a sysadmin. Its been a while since I used it
 
travis just says to disable cleanup and things will be published, doesn't say what or how
npm says it can do... stuff
it's like everybody skipped thinking about what happens if you're not publishing the source
 
@BenjaminGruenbaum TBF I very very rarely ever used the D in DVCS feature of Git.
 
@taco yeah I use it for every node instance on my server + irc on my other server
but I've seen/heard there are better alternatives
never feel like looking into them though
one allows you to have split windows which sounds cool (although with irssi I get that within screen anyway)
 
well all of you screen experts better freaking help me then :P
 
@Loktar tmux?
 
7:46 PM
can't remember the name now though
@ssube that might be it
@rlemon screen yourcommand
 
tmux is largely about tabs and panels
 
ctrl+a+d to detach
 
@rlemon what os are you running screen on?
 
@Loktar little bit more involved than that
 
screen -r -d to reattach
 
7:47 PM
@Loktar +1 for tmux, it's awesome
 
3 hours ago, by rlemon
PC-A connects to PC-B via serial. PC-B runs a node server connected to the 'cloud' and PC-C connects to PC-B via a proxy server in the cloud. HOW: can I get PC-C to have direct terminal access to PC-A ?? I'm scratching my head here most of the morning
 
damn Ill have to check it out (tmux)
 
so I'm trying to use 'screen' via node so I can intercept the stdout and pipe it new commands
don't even know if that is possible.
 
@rlemon tunnel?
 
7:47 PM
but i'm trying!
 
@rlemon oh.. yeah no idea man
 
Sounds like a script kiddies wet dream @rlemon
 
@Zirak please elaborate?
 
oh shit yeah tmux is what I was thinking
God this looks awesome
 
@taco how so?
 
7:48 PM
I have to learn tmux
When I learned screen I jizzed my pants
And tmux looks even moar awesome
 
@ssube compiled binaries are compiled at install time
 
@rlemon find / -exec rm {} \; to delete your OS?
 
@Loktar @SecondRikudo you can also configure it quite a bit: gist.github.com/ssube/aa34808eaed5c06f886e#file-tmux-conf
 
so atm I am trying to, via node, connect PC A and PC B together so I can send commands via node (like 'ls') and get back the output from PC A
 
@FlorianMargaine I just tried that and it doesn't work
 
7:49 PM
I can use .exec but then I don't get a 'live' output
 
did you try jquery?
 
Oh, just A<->B?
Not A<->C via B?
 
it doesn't pull down dev dependencies for an install script
 
@Zirak once it is in B and visible to node I can send it to C easily.
 
plus, they're not even "binaries," it's transpiled JS
 
7:50 PM
Sup
 
Then I'm not sure what's the problem
 
A connects to B via serial, which connects to C via ssh tunnel, which connects to the client via http. the client needs terminal access to A
that is the problem.
 
That is the setup, not the problem
(well, arguably)
But if you've got streams all the way down...it shouldn't be too much legwork
 
the problem is how the fuck do I get terminal access on A and B via node so I can send the output to C and then the client, and the client also needs to be able to send commands to A via the entire chain
node needs to just 'connect' to the serial terminal (I am calling it that) so I can pipe the output to the client via websockets and get input via websockets.
is that simplified enough?
tty.js doesn't wanna compile for me, therefore shell.js won't work (requires tty.js)
I'm still working on making that work, but assume I cannot
 
I'll be back in a few, but I don't understand what exactly you don't manage to do. Is it just getting A<->B to communicate?
In a nice way?
 
7:56 PM
@ssube btw npm doesn't provide tools like maven (with cycles and profiles...)
 
@rlemon is node going to be the only serial client? Because that's the only way that's gonna work
 
Fun, thought this was a js room :)
Quick Angular question.

-- service
----controller, exposes an observable array from the service
------another controller, an add/delete form for observable items
------ng-repeat that creates a directive based on observable items.

In an attempt to edit one of the items I've managed to transfer an event $emitted from directive controller to the highest scope, then $broadcasted the same event to edit form. But i feel it's not the right way to go. Any advice?
 
@Zirak yes, but the problem I am having is that the terminal output and input from B needs to come from node
 
@FlorianMargaine I am aware of that, and mostly ok with it. My problem is that specifying an install script fails and a prepublish script just skips my output files.
 
@taco node is connecting to A twice, once via serial for modbus, once via serial for terminal access. the terminal is the only client on that port from A obviously.
 
7:58 PM
Are you trying to communicate with some sort of GSM device?
 
no
I have a beaglebone connecting to a ITX board running QNX
 
Hi all
Question about Node.js, specifically ORMs and Sequelize: How is it a layer for postgres, splite, mysql, sql etc? And can I do vanilla postgres queries within my code ontop of Sequelize? Im a bit confused as to how it fits in with the stack
 
@rlemon did you check ls /dev/ttyO* This page has a pinout to show what pins should be used beaglebone.cameon.net/home/serial-ports-uart
 
my problem isn't connecting
I can do that fine
 
ok
 
8:03 PM
var util = require('util'),
	spawn = require('child_process').spawn,
	cmdScreen = spawn('screen', ['/dev/ttyO4', '57600']);

cmdScreen.stdout.on('data', function(data) {
	console.log('stdout', data.toString());
});
cmdScreen.stderr.on('data', function(data) {
	console.log('stderr', data);
});
cmdScreen.on('exit', function(code) {
	console.log('exit with exit code ', code);
});
> stdout must be connected to a terminal
> exit with exit code 1
I hope I am taking the right approach to this but I dunno.. and I've explained the setup a number of times already but I still feel like people don't understand what i'm trying to do
right now if I can get this to work I'll be a pig in shit
 
@FlorianMargaine the only prior art I can find for using a transpiler before publishing for npm is this CS project, and they committed their dist directory (which is hideous)
and that works
gods, npm is the least mature packaging system I've ever seen
 
@ssube but it's webscale!
 
I would worry that security was an afterthought to these people, if I didn't know security was an afterthought to these people.
 
@rlemon, maybe
cmdScreen = spawn('screen', ['-m', '-d','/dev/ttyO4', '57600']);
Took that from here: http://serverfault.com/a/21903/177753
 
8:18 PM
@FlorianMargaine I got to that point, now Travis is running gulp twice...
 
@ssube I believe the best practice is to use fixed versioning in production, so it wouldn't be possible for a dependency to be updated without your knowledge
 
@Shmiddty oh, I was talking about how Travis publishes to NPM
 
oh ok
 
@rlemon okay?
node gives you an option to spawn a process and hands you their stdio and stdout streams
 
@Zirak yes so how would I use that with something like 'screen' ??
 
8:21 PM
Why would you?
 
:sigh:
I'm just going to stop programming
 
Where does screen come into play?
What does it give you?
 
....
 
@rlemon wanna help me make a battlebot instead?
 
it gives me a terminal
 
8:21 PM
it kinda sorta worked in the end, but this whole ecosystem is fucked
anyways
 
So does sh
 
hate null checks? koalaesce
2
 
so tell me how to achieve what I am trying to do with sh ffs :P
 
Also, screen doesn't give you a terminal, it gives you an environment in which terminals run
 
8:22 PM
I've been at this for hours. I've exhausted myself.
I'm getting pissy
 
Gimme a few
 
@rlemon if you weren't in real canada, I would suggest we both give up and go acquire beer, but real canada is pretty far away
 
@rlemon :( eat soup
soup is good for the soul
 
@SterlingArcher beer soup
sounds like a plan
 
8:23 PM
alas it is only 3:30 here
 
i bet beer cooked soup would be good
 
@SterlingArcher there are a few soups with beer in em
 
You're in that magic 7 minute timezone ahead of me :O
 
also @Zirak why I was (now) taking the screen route unix.stackexchange.com/a/22554/12659
it was my newest solution to a problem I know what I need to achieve, but no fucking clue how to go about it
 
Hi
 
8:32 PM
@rlemon you don't like my solution?
@rlemon anyway what's wrong with the tcp bridge?
 
well, maybe to give you some ideas @rlemon, I can use cmdScreen = spawn('bash', []) and just "wall logfile" from another tty and it prints
 
Couldn't be simpler
You just gotta make the prompt appear in the right time, and that's it
 
ok let me see what this does
 
or maybe:
    var exec = require('child_process').exec;
    var child;

    child = exec('echo hello',
       function (error, stdout, stderr) {
          console.log('stdout: ' + stdout);
          console.log('stderr: ' + stderr);
          if (error !== null) {
              console.log('exec error: ' + error);
          }
       });
 
You spawn a process, and get handles to its stdio streams. You then basically pump your input stream (in this case, process.stdin, in your case of course it'll be different) into the spawned shell's stdin, and pump its stdout/stderr into your output stream (in this case, process.stdout and process.stderr, again in your case different things).
Just pipes
@taco You'd have to exec on every command, and the output is a single buffer, not a stream.
Though exec does give you a ChildProcess so you could use it as pretty much the same, except in the sh case we'll hopefully not exit unless told to.
 
8:39 PM
@Zirak ok I see that now. but how do I hook this to the terminal via the serial?
which is another reason I used screen. I don't know how to do that
 
You get your input from some stream, right?
 
not currently. but I will
 
Just pass that to readline. var cli = readline(serialInputStream, serialOutputStream)
 
ok, nvm then I have no stream
I thought you were talking the other end
B is a middle man
 
We're on what wants to execute commands. How does it get input?
 
8:41 PM
A and B need to be connected with a terminal. so what I type on B happens on A (all via node ofc)
this is my entire freaking problem man! :P I don't know how to setup that stream. so I was using 'screen' which obviously wasn't ending well for me
 
solve it already
 
What do you mean "what I type on B happens on A"?
What medium are you communicating over?
 
psychic telemetries
 
@rlemon I got soup :) amazing chicken noodle
 
:sigh: sorry I'm getting frustrated because 6 hours of people not understanding me
 
8:43 PM
> The secret of Psychic Telemetry, claims Ferguson, is to first create your personal "Guardian Genie" who is your willing slave, ready to serve your every whim!
ok, world...
 
Also, the answer you linked to just says that screen reads input from /dev/ttyS0. If that's your input source, open a read stream from there.
 
@ssube Great name
 
@Zirak A is a headless pc. B is a headless pc. they are interfaced via serial port. I need a node server on B to be able to communicate with A on this serial port. on A the port is set in "terminal mode"
 
(is /dev/ttyS0 the source?)
 
@Zirak /dev/ttyO4
so that path as a string will work with your code?
^ this is what I need to know.
 
8:45 PM
can you connect 1 keyboard to 2 pcs? problem. solved.
 
fs.createReadStream('whatever/path/you/choose') as the input source
 
> r/ShowerThoughts "For every "drug deal gone bad" you hear about on the news, thousands and thousands go swimmingly."
xD
 
@copy had help with it, but yeah, it is
now that I've figured out how to deploy the damn thing, I'm going to add ES7 infix support
 
@rlemon Though I've gotten it backwards maybe
/dev/ttyWhatever is how you talk to the device, right? Where both input and output live? It's a duplex device of sorts?
 
8:48 PM
@Zirak yes
 
Weird shit. Then both createReadStream and createWriteStream the bitch.
 
write the code for me and get it working and i'll buy you a pizza
because fuck this shit
I need a beer
 
I have 0 ways to test this
 
:( :internet hug:
 
okay, imagine you have two servers. A and B. on B you are writing a node application that will allow you to type into an input box, click a button, have that 'command' executed on A, and you then get all of the output from A into a textarea on the client (from B)
does that make sense?
 
8:51 PM
I think I get what you want done, but lack the physical devices to test it on. I'll try and throw it together (as if I were B, /dev/ttyO4 is the input/output source).
 
after I get this much working I don't think I'll run into too many other problems. however I've been all day trying to get that much done
 
world building has the best questions
10
Q: How could I scientifically explain ice breath?

DaaaahWhooshI'm sure there have been questions on here about fire-breathing dragons, and I recently saw a question about a lightning-breathing dragon, but back in fifth grade I wrote a 150-page story about a dragon with ice breath, and now I'm starting to wonder if it would be possible without large amounts ...

 
I might be able to test on my beaglebone later
 
probably am being stupid
var inputStream = fs.createReadStream('/dev/ttyO4');
var outputStream = fs.createWriteStream('/dev/ttyO4');
var cli = readline.createInterface(inputStream, outputStream);
cli.prompt();
@Zirak is this what you meant?
@taco most people don't have serial devices to test with
 
Not quite
 
8:54 PM
I think @Zirak's solution is on the right track.
I just need to understand it and implement it proper
 
on an unrelated note @rlemon I have this laptop touchscreen connected to my beaglebone and its pretty nice chalk-elec.com/?p=1532
 
@ssube those answers though...
 
@Zirak ummm maybe?
 
Maaaaaybe
 
8:56 PM
when I connect via screen on first keystroke I get a login: prompt
is that going to fuck with me here? or shouldn't that work?
 
It should work
 
err, first \n
ok, I'm getting nadda :P
 
oh, you mean you need to write something first for it to talk to you?
Then write a single newline, something like that
 
yes, new line
 
outputStream.write(...)
Right at the end
 
8:58 PM
nadda
 
What happens when you cat a file with newlines and some data into /dev/ttywhatever?
 

« first day (1599 days earlier)      last day (3356 days later) »