<elomatreb>
jair: The script seems to be reallly old, I'm neither sure it'll work with Ruby 2.3 nor with recent versions of the required gems
<jair>
elomatreb: understand
<jair>
elomatreb: thank you very much
<matthewd>
The Gemfile specifies it wants mechanize 2.0
<jair>
I tried... I guess I will need to download manually, thank god I have another monitor
<jair>
in my desk
<matthewd>
Verity: Talk to me.. which part is unclear? Am I helping?
enterprisey has quit [Remote host closed the connection]
hutch34_ has joined #ruby
gix has quit [Ping timeout: 240 seconds]
armyriad has joined #ruby
<allisio>
Huh. Looks like MRI doesn't optimize `<<=`.
<allisio>
Granted, it shouldn't be expected to save fools from themselves, but it would've been interesting to find that they'd bothered to in that case.
hutch34_ has quit [Ping timeout: 240 seconds]
nobitanobi has joined #ruby
gix has joined #ruby
agent_white has joined #ruby
blackwind_123 has quit [Ping timeout: 240 seconds]
__Yiota has joined #ruby
nobitanobi has quit [Ping timeout: 240 seconds]
Channel6 has joined #ruby
blackwind_123 has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
astronavt has quit [Quit: Leaving...]
duckpupp1 has joined #ruby
duckpupp1 has quit [Ping timeout: 246 seconds]
claw has quit [Ping timeout: 240 seconds]
claw has joined #ruby
enterprisey has joined #ruby
IRCFrEAK has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
IRCFrEAK has left #ruby [#ruby]
_IRCFrEAK has joined #ruby
_IRCFrEAK has left #ruby [#ruby]
patarr has joined #ruby
milardovich has quit []
patarr has quit [Ping timeout: 246 seconds]
Pumukel has joined #ruby
enterprisey has quit [Quit: Leaving]
houhoulis has quit [Remote host closed the connection]
Verity has quit [Ping timeout: 246 seconds]
harfangk has joined #ruby
Pumukel has quit [Ping timeout: 258 seconds]
hutch34_ has joined #ruby
hutch34_ has quit [Ping timeout: 240 seconds]
tau has quit [Remote host closed the connection]
tau has joined #ruby
tau has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 240 seconds]
jdeen has quit [Remote host closed the connection]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
ydnpft has joined #ruby
Gabemo has joined #ruby
Pumukel has joined #ruby
Pumukel has quit [Remote host closed the connection]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
coatezy has quit [Ping timeout: 240 seconds]
vuoto has quit [Remote host closed the connection]
coatezy has joined #ruby
lxsameer has joined #ruby
faelkle has joined #ruby
tvw has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
pulkit4tech has joined #ruby
faelkle has quit [Client Quit]
jdm has quit [Remote host closed the connection]
patarr has joined #ruby
JeanCarloMachado has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
muelleme_ has joined #ruby
patarr has joined #ruby
muelleme_ has quit [Ping timeout: 264 seconds]
hutch34_ has joined #ruby
blackmesa has joined #ruby
montanonic has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
hutch34_ has quit [Ping timeout: 260 seconds]
zenguy_pc has quit [Ping timeout: 256 seconds]
JeanCarloMachado has quit [Ping timeout: 256 seconds]
xenops has joined #ruby
zenguy_pc has joined #ruby
cagomez has joined #ruby
cagomez has quit [Ping timeout: 260 seconds]
Rasi has quit [Quit: WeeChat 1.7]
tvw has quit []
pandaant has joined #ruby
nobitanobi has joined #ruby
Jackneill has joined #ruby
montanonic has quit [Ping timeout: 260 seconds]
nobitanobi has quit [Ping timeout: 240 seconds]
aryaching has quit [Ping timeout: 240 seconds]
latino31 has quit [Ping timeout: 240 seconds]
jane_booty_doe has quit [Quit: Leaving]
tvw has joined #ruby
teddysmoker has joined #ruby
tvw has quit []
spicerack has joined #ruby
Guest47800 has joined #ruby
yurikoles has quit [Read error: Connection reset by peer]
yurikoles has joined #ruby
leitz has joined #ruby
<leitz>
Is Mechanize still the best way to script a login to a website? I'm trying to save data from a forum.
maattdd has joined #ruby
dionysus69 has quit [Remote host closed the connection]
kent\n has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
Guest47800 has quit [Remote host closed the connection]
hutch34_ has joined #ruby
DoubleMalt has joined #ruby
nobitanobi has joined #ruby
hutch34_ has quit [Ping timeout: 240 seconds]
doublemalt__ has quit [Ping timeout: 268 seconds]
kent\n has joined #ruby
armyriad has quit [Ping timeout: 268 seconds]
armyriad has joined #ruby
nobitanobi has quit [Remote host closed the connection]
voloyev has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
armyriad has quit [Ping timeout: 240 seconds]
teddysmoker has quit [Quit: Konversation terminated!]
voloyev has quit [Quit: Leaving]
voloyev has joined #ruby
armyriad has joined #ruby
muelleme_ has joined #ruby
inersha has joined #ruby
<inersha>
Is it possible to run a ruby script that will change the directory of the terminal that ran the script? For example, I just want to `cd ~/folder`, and then exit, so my terminal is now in the new folder.
<inersha>
I don't know how to do this, because it seems that ruby runs in a sub-process, so when it exits the terminal goes back to its original folder.
_whitelogger has joined #ruby
User458764 has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davorb has quit [Read error: Connection reset by peer]
davorb has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
igniting has quit [Ping timeout: 240 seconds]
psychicist__ has joined #ruby
DoubleMalt has joined #ruby
madrat_ has joined #ruby
banisterfiend has joined #ruby
vuoto has joined #ruby
ydnpft has quit [Remote host closed the connection]
psychicist__ has quit [Quit: leaving]
psychicist__ has joined #ruby
codepete has quit [Quit: Connection closed for inactivity]
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lxsameer has quit [Quit: WeeChat 1.7]
voloyev has quit [Remote host closed the connection]
vuoto has quit [Remote host closed the connection]
igniting has joined #ruby
hutch34_ has joined #ruby
vuoto has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hutch34_ has quit [Ping timeout: 256 seconds]
yurikoles_ has joined #ruby
yurikoles has quit [Ping timeout: 240 seconds]
esObe__ has joined #ruby
sepp2k has joined #ruby
esObe_ has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
charliesome has joined #ruby
Verity has joined #ruby
brent__ has joined #ruby
vuoto has quit [Remote host closed the connection]
blur3d has quit [Quit: blur3d]
<Verity>
1. create a new packet consisting of only empty header 2. read 8 bytes in (total now 9 bytes)(if not enough byres available, PAD! 3. append crc byte. 4. add packet to list of packets
<Verity>
so multiple vars can refer to the same object
<Verity>
matthewd, I fell asleep last night. I'm reading through what you said now
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brent__ has quit [Ping timeout: 246 seconds]
__Yiota has joined #ruby
muelleme_ has quit [Ping timeout: 260 seconds]
<Verity>
kI dont know
<Verity>
this isnt productive
<Verity>
I'm just wasting a bunch of time guessing and looking at it
<Verity>
reading it over and over
<Verity>
trying different things
<Verity>
there is something fundamental about ruby I'm not understadning coming from C++
<Verity>
or my logic sucks
JeanCarloMachado has joined #ruby
<Verity>
yeah
<Verity>
hopeless
<Verity>
I dont even know why it worked fine before and doesnt now
<Verity>
debugging this one error is taking more time than it took to write it all in the first place
<Verity>
ill never get this time back
<Verity>
its not maing a fresh packet each tgime at packet = SOH
<Verity>
and I have no idea why.
<Verity>
this is such an incredibnle waste of time
psychicist__ has quit [Remote host closed the connection]
yurikoles_ has quit [Remote host closed the connection]
yurikoles has joined #ruby
<Verity>
this has to be ruby specific
<j416>
hopefully you are learning from it and so the time spent makes you a better developer :)
<Verity>
I'm not
<Verity>
I'm just getting frustrated and guessing now
<Verity>
I should have asked again for help sooner
<Verity>
its making me angry at ruby
<Verity>
(the language)
<Verity>
this is my first ruby program
<Verity>
it worked so well at first and I felt magic and love
<Verity>
now I feel anger and despair
<Verity>
I feel like I could write this again in a few minutes in C++ yet sit here all day and never figure out why its not working in ruby
<Verity>
I chose ruby to save time
<Verity>
and to learn a new lanigugae
psychicist__ has joined #ruby
yurikoles has quit [Read error: No route to host]
yurikoles has joined #ruby
cagomez has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
HoierM has joined #ruby
MrJoshua has quit [Quit: MrJoshua]
<leitz>
When frustrated, I usually take a break and try to mentally reframe the problem. It sounds like you're working on a deep technical issue and learning a new language at the same time.
cagomez has quit [Ping timeout: 260 seconds]
yurikoles has quit [Read error: Connection reset by peer]
bkxd has quit [Ping timeout: 268 seconds]
yurikoles has joined #ruby
<Verity>
wtf is going on here
<Verity>
"in `gets': No such file or directory @ rb_sysopen - -s (Errno::ENOENT)"
<Verity>
zero search results
neuraload has joined #ruby
hutch34_ has joined #ruby
<Verity>
starting to wonder if my code is even wrong
<Verity>
is this a bug?
* Verity
rages
hutch34_ has quit [Ping timeout: 240 seconds]
knight33 has joined #ruby
<Verity>
I had to put $stdin.gets
<Verity>
what the actual fuk
<Verity>
now I have no idea if my code is evenw rong
<Verity>
or if my ruby is all screwed up
kirun has joined #ruby
nobitanobi has joined #ruby
leito has quit [Ping timeout: 264 seconds]
tomphp has joined #ruby
blackwind_123 has joined #ruby
tomphp has quit [Client Quit]
nobitanobi has quit [Ping timeout: 240 seconds]
nadir has quit [Quit: Connection closed for inactivity]
duckpupp1 has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
leito has joined #ruby
blackmesa has joined #ruby
duckpupp1 has quit [Ping timeout: 240 seconds]
thadtheman has quit [Ping timeout: 240 seconds]
inersha has quit [Quit: Lost terminal]
CloCkWeRX has quit [Quit: Leaving.]
k3rn31 has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
despai has joined #ruby
k3rn31 has quit [Client Quit]
pulkit4tech has quit [Quit: Connection closed for inactivity]
blackmesa has joined #ruby
<Verity>
anyone./
<Verity>
?
<Verity>
I'm having some fun with irb and reading docs and trying stuff
<Verity>
but nothing I've tested fixes it
<Verity>
I'm moving ashead to the serial code since thats not giving me trouble
nadir has joined #ruby
Lord_of_Life has quit [Excess Flood]
thadtheman has joined #ruby
Lord_of_Life has joined #ruby
Azure has quit [Ping timeout: 258 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
jhack has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
HoierM has quit [Remote host closed the connection]
ahrs has quit [Remote host closed the connection]
muelleme_ has joined #ruby
hutch34_ has joined #ruby
Azure has joined #ruby
toretore has joined #ruby
<Verity>
matthewd, ?
ahrs has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 268 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
neuraload has quit [Quit: This computer has gone to sleep]
<Verity>
my end balance is screwed up and I have no idea why, and I'm not creating a new packet each time, howhow. Even using .clear didnt work
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
<Verity>
howhow?
<Verity>
I can't even type now its fried my brain
<Verity>
hmm
<toretore>
the way to debug this is to make sure the data is what it should be at each step
<toretore>
i.e. add a bunch of `p packet` between the lines
<Verity>
I did that for over an hour hehe
<Verity>
I put in dozens of puts
<Verity>
gets
<Verity>
etc
<Verity>
there is something VERY fundamental I'm just not getting
<Verity>
and I'm not sure I will ever figure this out
<Verity>
I just keep breaking it worse
<Verity>
now I have errors about my end keyword
<Verity>
so my blocks arent eve nbalanced anymore
<Verity>
I'm literally just guessing
<Verity>
I tried half of the methods in string class
<Verity>
just seeing if they could somehow solve it
<Verity>
just praying
<Verity>
but no go
despai has quit [Ping timeout: 260 seconds]
<Verity>
matthewd, knows my mistake
despai has joined #ruby
<Verity>
I should have just asked for solution
<Verity>
I've wasted hours now trying to debug it
<Verity>
and this is such a small part of the real program
<Verity>
the state machine for processing vbytes is where I need to be spending my time
<Verity>
not fighting with somne nuance in ruby causing things to happen diofferentl than I would expect
<Verity>
I thought ruby was supposoed to stay out of my way, let me think about the problem and not the code
<Verity>
what the hell is going on
daum has joined #ruby
<leitz>
This small part is real programming.
<Verity>
no it makes no sense
<toretore>
look at the indentation on lines 29-30
<Verity>
it worked before
<Verity>
I dont even know what I changed
<Verity>
it worked perfeflyt yhe first time I wrote the program
<Verity>
then it broke from the constants
<Verity>
so stupid
<Verity>
then I couldnt evne put it back
<Verity>
because I habe no fucking clue whats goijng on
<daum>
hi guys i just installed redmine and had bundler install everything into the vendor file, it looks like rake on my system though is at 11.2.2 versus the versoin in redmine which is 12.0.0 i can see the gem in the vendor folder but how do i run that version of rake rather than the one that is installed on the system?
<leitz>
You have no backup of the original file?
<Verity>
no
bkxd has joined #ruby
<Verity>
toretore, I did that for 20 mins
<leitz>
Programming Lesson #0.
<Verity>
no ide what its supposed to be
<toretore>
Verity: do you want help debugging it or do you just want to complain?
<Verity>
I was adding and deleting ends
<Verity>
I'm literally just guessing
<Verity>
so the help would need to be lower level, is what I meant
<Verity>
this level of help is too complicated for me to benefit from
<Verity>
indents dont even matter here
<Verity>
thats python I thought
<Verity>
I spend a good 154 mins just putting and deleting end
<Verity>
hoping it would work
<toretore>
if you're going to write ruby you have to understand its syntax
<Verity>
I did the ruby in 20 mins
<Verity>
I checked the docs
<leitz>
Verity, toretore asked a valid question. Is your response the one you want to give?
<Verity>
its all pointless really
<Verity>
I dont have time for games
<Verity>
if you know whats wrong please tell me
<Verity>
this isnt helping, trying to guess
<Verity>
I thought it would
<Verity>
thats why I asked matthewd for a hint instead of a soltuuioin
<Verity>
but all it did was make me rage
<Verity>
its ruining ruby for me now
<Verity>
I've been at this sin ce yesterday morning
despai has quit [Read error: Connection reset by peer]
despai has joined #ruby
<Verity>
not helpful
<Verity>
I'll just keep guessing
bkxd has quit [Ping timeout: 260 seconds]
<Verity>
thew worst part here is
<Verity>
im sure its some simple error
<Verity>
but its a sick game not to tell me
<Verity>
I see whatgs going on
<leitz>
We have told you what's wrong. Perhaps the problem isn't your code?
<Verity>
I must have missed that
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Verity>
ah
<Verity>
so the problem ISNT my code
<Verity>
that was my fear
<Verity>
its a corrupt ruby installation
<Verity>
that would explain why gets wasnt working either
<leitz>
No.
<Verity>
I will reinstall
<Verity>
try to get it reight this time
<Verity>
its probably because I chose the 3.3 version 64 bit
<Verity>
it warned not to
<Verity>
thats why im getting bizarre errors
<Verity>
like gets not exisitng
<Verity>
definitely not normal^
<Verity>
wish someone told me sooner
<Verity>
I wasted so much time
<Verity>
this explains why it runs differently under linux too
<Verity>
the identical code
<Verity>
(I'm on windows)
<toretore>
how about you stop whining and start answering our questions
<Verity>
how about I put a bullet into this fucking pc
<toretore>
maybe you should call your therapist
<leitz>
Verity, the problem is your approach to code, not your code. Until you fix yoru approach, your code will only work by chance.
<Verity>
the problem is ruby, nothing like this has ever happened in C++
<Verity>
which I've been using over a year
<leitz>
By chance it worked at first, and now by chance it doesn't.
<toretore>
the problem is you're missing an end between line 29 and 30
<leitz>
I had the same problems in several languages until I started to treat my coding process as a tool.
<Verity>
it broke when I changed my naming conventions of variables I think
<Verity>
due to someones suggestion here
michele has joined #ruby
<michele>
hi there
<Verity>
thats the best I can remember of when it last worked
<Verity>
toretore, I alrewady deleted the end I hads there
<toretore>
ffs
<Verity>
ive deleted and put end there a dozen times on that line
<leitz>
toretore, "ffs"?
<Verity>
doesnt help my damn editor doesnt show which they match
<Verity>
for fucks sake = ffs
<toretore>
^
<leitz>
"Friends for Seconds"?
despai has quit [Ping timeout: 260 seconds]
_aeris_ has quit [Remote host closed the connection]
<michele>
I have installed two gems because I want to run two different ruby scripts that requires them (not at the same time). However, these two libraries require a third gem in (apparently) a different version: `raise_if_conflicts': Unable to activate library1-1.19.1, because dependency-of-library1-2.0.1 conflicts with dependency-of-library2 (~> 1.8) -- is there a way to resolve this conflicting behavior ?
<Verity>
how the hell does the do and the until have their own end
_aeris_ has joined #ruby
<leitz>
michele, I'm a newbie so when someone better chimes in, listen to them. The first question is, can you install the latest version of the thrid library so that it works for both?
pwnd_nsfw has quit [Quit: Leaving]
<michele>
leitz no, apparently library2 requires dependency-of-library2 ~> 1.8
pwnd_nsfw has joined #ruby
<toretore>
michele: you should use real names, not made up ones
marcdel has quit [Ping timeout: 240 seconds]
<toretore>
michele: are you using bundler?
<michele>
no toretore
<michele>
`raise_if_conflicts': Unable to activate rspotify-1.19.1, because rest-client-2.0.1 conflicts with rest-client (~> 1.8) (Gem::ConflictError)
<leitz>
michele, I wonder what happens if you change the requires to 1.8 or higher.
<toretore>
you should consider using bundler
<michele>
toretore the second library is omdb
<michele>
toretore do I have to create a Gemfile in every directory of the two scripts?
<toretore>
in each directory yes
<michele>
hm ok
<michele>
toretore do you have a starting link where i can learn more about using bundler and my setup?
daum has quit [Ping timeout: 240 seconds]
<michele>
e.g. toretore , if I create a Gemfile do I have to remove all my "require" at the top of my .rb script?
<toretore>
tbh i don't use bundler much so i'm not sure
<elomatreb>
No, the Gemfile lists what gems you want and can be used to install them all at once. You still need to require them
mikecmpbll has joined #ruby
<Verity>
what is convention for function names
<toretore>
michael_mbp: if you actually do have a versioning conflict, meaning two different versions are required in the same program, then that's hard to solve
<michele>
elomatreb will it help with my problem of two libraries requiring another library in conflicting versions?
<michele>
toretore no, it's a different program
<leitz>
michele, can you install a pre-2.0 version of rest-client? That should work for both libraries.
<toretore>
how are you getting conflicts then?
<leitz>
I thing gem can let you specify versions to install.
<toretore>
michele: the error messages makes it sound like something is actually trying to require two conflicting versions in the same program
* leitz
is known for using old versions...
<michele>
leitz brilliant. you're right
<leitz>
I am. :P
<toretore>
versioning should be part of a programming language such that in each place where you require its functionality you specify a specific version, allowing more than one version to be imported in the same program
blackmesa has joined #ruby
<Verity>
how do i know if I shoud use a class
ncthom91 has joined #ruby
<leitz>
Verity, once you have the basics working without a class you'll have the option to use one if it makes sense. Adding a class before the basics work compounds complexity.
<Verity>
ok
<Verity>
that was my fear, I'll wait
<leitz>
That's what I normally do, anyway. I'm easily confused.
bitrauser has joined #ruby
bitrauser has quit [Client Quit]
<Verity>
yeah I have no clue wtf is going on
<Verity>
(I'm back to my original problem)
<Verity>
loop 22 isnt doing what I think it is
<Verity>
well its not doing what I need it to, I should say
<Verity>
I can see whaty it is doing
<Verity>
it should be SO simple, wtf
<Verity>
this is the SIMPLE part
<Verity>
the hard part is the state machine
<Verity>
so being stuck now = not good
<Verity>
1. create a new packet consisting of only empty header 2. read 8 bytes in (total now 9 bytes)(if not enough byres available, PAD! 3. append crc byte. 4. add packet to list of packets
<leitz>
On the contrary, being stuck on the simple, and learning how to fix it, prepares you for the complex.
<Verity>
my problem statement I wrote up
<Verity>
I'm fighting with ruby itself I feel like, right now
<Verity>
not my own logic
<leitz>
Disagree.
<Verity>
my logic seems ok (maybe its not) but ruby doesnt seem to be exectuing it
hutch34_ has joined #ruby
marr has joined #ruby
<Verity>
leitz, unless you know whats wrong thats really not helpful
<Verity>
why I don't end up with an array of 10 byte packets
<Verity>
like I did beforee i startted changing the way my vars were capitalized///named
<Verity>
then it all broke
<Verity>
I didnt even change the actual logic... unless it happened by accident
<Verity>
thats why this feels like RUBY and not a code issue
pulkit4tech has joined #ruby
<Verity>
it woked perferctly when I drafted it up
<toretore>
Verity: do you actually want us to help you with this?
<j416>
Verity: compare what you have now to the working state and see if you spot an error?
<Verity>
the working version is long gone sadly
<Verity>
toretore, is it a game?
<Verity>
or do you know hats wrong
<Verity>
because as I said
<Verity>
I'ver been stuck on one block of code for 14 hours
<j416>
I always try to keep working versions until the thing is done; helps in this situation. Maybe next time :)
<Verity>
its getting reallyh old
<Verity>
and now, sadly
<Verity>
its ruining my ruby experience
<Verity>
I'm desperate to fix it just to save that
<Verity>
because I want to LIKE ruby
<toretore>
Verity: i'm asking a simple question. you're not answering it. you're starting to trigger the troll detector
<Verity>
but this isnt helping
<Verity>
toretore, you're trolling me right now
<Verity>
matthewd, knows the answer
<Verity>
hje would just say it if he were here
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Verity>
why play games?
<j416>
Verity: what he probably means is you're ranting a lot about things not working without any info
<j416>
Verity: the signal-to-noise ratio is pretty bad right now.
<toretore>
^
<Verity>
I disagree
<Verity>
nobody here knows the solutiuon
<j416>
if you want help, present a concrete problem
<Verity>
thats ok.
<Verity>
I'll wait for someone who does
<leitz>
Verity, you've been giving us an uninterrupted frustrated stream of consciousness and ignoring attempts to help. How is that adult behavior?
<Verity>
if you dont know why even reply?
<Verity>
thats not helpful, ppl
<Verity>
THAT is what is trolling
<Verity>
pretending you know if you dont
<j416>
Verity: what is the problem you are experiencing?
<Verity>
or making me guess
hutch34_ has quit [Ping timeout: 240 seconds]
<Verity>
j416, I just posted this, but here it is again: 1. create a new packet consisting of only empty header 2. read 8 bytes in (total now 9 bytes)(if not enough byres available, PAD! 3. append crc byte. 4. add packet to list of packets
<Verity>
thats not what happens, it keeps adding to the packet
<Verity>
it worked as I expected when i first wrote it
<Verity>
I don';t know what changed. its a complete mystery
<toretore>
Verity: i told you exactly what the syntax error was, and you still ignored it and continued spewing bs
<Verity>
toretore, that was for the end statmeent
<leitz>
^
<Verity>
I fixed that a LONG time ago
<Verity>
this is about the packet generation loop
<j416>
Verity: what is "it"? can you show the code that is not working?
<Verity>
I've now been trying since yesterday morning, I've done nothing else since then
<j416>
Verity: writing a unit test for things like this can help a lot sometimes
<Verity>
1 meal per day + sleep
<Verity>
I skipped all classes yesterday
<Verity>
because I couldnt stop trying to fix it
<Verity>
this is getting bad
<toretore>
Verity: if you want help, stop ranting, answer our questions and follow our instructions
<Verity>
toretore, no ty
DLSteve has joined #ruby
<Verity>
not from ytou
<j416>
Verity: I don't care how much you slept or what you had or didn't have for lunch; keep focus on the issue please
<Verity>
j416, that was for toretore
<Verity>
to stop his trolling
<Verity>
ty for taking a look at my code, j416
<toretore>
i now consider you to be a troll and will stop engaging
<Verity>
thank you
t-recx has joined #ruby
<Verity>
since the fix is a single line and you're not saying it you werent helping nayway toretore, ust confusing a newbie further
<Verity>
not a good intro to the community, or helpful for someone wrtiting their first rb program
<j416>
Verity: do remember you are broadcasting to 853 people, not just toretore
<Verity>
I know
<j416>
well, 852
<Verity>
I want it known
ahrs has quit [Remote host closed the connection]
<j416>
we got the message.
<j416>
don't worry
Mon_Ouie has joined #ruby
<Verity>
open a file, until the end of file, make a packet with SOH, read 8 bytes, append crc, append packet to list
<Verity>
when end of file reached, done
ahrs has joined #ruby
<Verity>
I'm not convinced my ruby install inst corrupt
<Verity>
I'm going to try that now
<Verity>
as gets wasnt working properly who knows what else could be messed up
<Verity>
not one person has indicated a mistake in that block of code yet either, other than matthewd who is afk sadly
<Verity>
so the one person who knows whats wrong.. is gone :)
<Verity>
I'll have to check back later if I still cant get it
<j416>
so you have a description of what is wrong, but you have not understood it?
<Verity>
no I asked him not to tell me
<Verity>
stupid of me
<Verity>
I asked for a hint instead
<faraco>
hello
renchan has quit [Remote host closed the connection]
<leitz>
Well, that was funny! Put a "-" where a "=" was supposed to go. Took me a bit to see it.
<Verity>
his hint was to look at packet = SOH
<Verity>
I can see with puts its continuing to build th epacket beyond 10 bytes
<Verity>
and its NOT a fresh packet each time through the loop
<Verity>
but due to ruby specific things I have no idea why
<Verity>
or why it worked before, but not now
<Verity>
it feels like a giant mystery
<Verity>
in c++ I would throw some bps, open some containers, start stepping through
<Verity>
I even tried with gets and puts to do similar here
<Verity>
no luck.
<Verity>
I chose ruby to write this faster than I could in C++, this singular issue that I would likely never make a mistake about again if someone would just tell me what I did wrong --- is causing this to take far LONGER than with C++
<Verity>
it should build 10 byte packets and add them to the list
<Verity>
instead its making weird packets that are too big
Xiti has joined #ruby
<Verity>
and other things I can't explain or even put into words are happening
<Verity>
I'm sure its some fundamental misunderstanding on my parts of how variables work in rb
<Verity>
faraco,
<j416>
my ruby is quite rusty at this point so I can't spot what the error is; I'm sorry. More importantly perhaps; I don't know what the error is (what is the expected behaviour?)
<Mon_Ouie>
String#<< modifies a string in place, '=' never performs an implicit copy in Ruby
<Verity>
j416, it should build 10 byte packets from the file
<Verity>
for each time through the loop, it should:
<Verity>
1. add SOH character 2. read 8 bytes 3. pad if not enough bytes in file 4. append crc 5. append packet to list
<j416>
ah.
<nofxxxx>
Verity, hm...not sure but, utf8 ?
<Verity>
instead, I get stuff like [1, 97, 97, 97, 97, 97, 32, 98, 98, 191, 98, 98, 98, 32, 99, 99, 99, 99, 65, 99, 32, 100, 100, 100, 100, 100, 13, 13, 10, 101, 101, 101, 101, 101, 32, 102, 244] the third time through
<j416>
sorry, missed this; you wrote it earlier
<Verity>
packet isnt being reset
<Verity>
and at the end of the loop I tried packet.clear
<Verity>
then it was just empty packets.
<Verity>
so I'm totally stumped now
<Verity>
especially considering it worked before and I don't know what I did to break it
<Verity>
an argument for vc, for sure.
<Mon_Ouie>
Look at the value of SOH before and after each packet is generated
<j416>
ah, naturally
<Verity>
thats related to what matthewd was saying
<j416>
SOH is not constant
<Verity>
that SOH is just a const referance
<Verity>
but what it references inst constant
<Verity>
(this makes no sense)
<Verity>
coming from C++
<Verity>
a const var cant be changed in C++... but here?
<Verity>
it can?
<Verity>
let me try inspecting soh
knight33 has joined #ruby
<Mon_Ouie>
It's like a 'std::string * const' variable, instead of a 'const std::string *' variable
<ruby[bot]>
j416: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<j416>
be that way then, bot
<Verity>
ok
<Verity>
so
<Verity>
its just making packet another name for the string pointed to by SOH
oliv_____ has joined #ruby
<Verity>
thats not good
oliv_____ has quit [Remote host closed the connection]
<j416>
right
<Verity>
so it IS a ruby problem
<Verity>
in a way
<Verity>
let me see if I can fix this
bkxd has joined #ruby
vuoto has joined #ruby
<Verity>
fixed
<Verity>
(I think) testing more now
<j416>
cool
<faraco>
congratz
<j416>
out of curiosity, what made you pick Ruby for this task? processing bytes like this seems like an easy problem for something faster and more low-level?
<Verity>
I wanted to learn ruby, for a long time
<Verity>
and the professor said we could use any language this time
<j416>
ah I see.
<Verity>
and I don't like C# much, which is what we have been using
<Verity>
seemed like a good opportunity to learn ruby, and I was also hoping it would be less code for the same thing
<Verity>
and indeed, if not for this one stupid issue, I could have done in 20 mins with ruby what the rest of the class did in 3 hours with C# gui apps
<Verity>
mine is cli, we have the choice this time
bkxd has quit [Ping timeout: 240 seconds]
<j416>
sounds sane
<faraco>
much much saner.
<j416>
and you learnt something
<Verity>
yes, the more languages the better :)
<Verity>
(to a point, it seems)
<Verity>
ty for the help
<j416>
> using right right tool for the task
<j416>
> isolating to find errors
<j416>
> tests are useful
zeddan has joined #ruby
<Verity>
does anyone here use an IDE?
<Verity>
like rubymine, something with sytnax highliguthing, debugger, etc
<leitz>
IDE == "vi"
<Verity>
I used notepad for this ={P
<Verity>
trying vscode now
<Verity>
its got highlighting at lease but completion would be nice
davorb has quit [Read error: Connection reset by peer]
* leitz
breaks stuff on a regular basis
<Verity>
I used to know a few, I'll look into it again
<Verity>
although, it still doesnt explain why my code broke
<Verity>
actually yes it does
<j416>
Verity: you don't necessarily need a remote, but yes, something like that.
<Verity>
its because I added the constants
davorb has joined #ruby
<Verity>
ok
zeddan has quit [Ping timeout: 258 seconds]
<faraco>
do you guys find IDE (ignoring capable and powerful editor like Vim and Emacs, etc) and dynamic languages, really integrates with each other well?
rikkipitt has joined #ruby
<leitz>
faraco, I find myself a slow learner and do best as close to the language as possible.
<Verity>
I'm so spoiled by IDE
Pumukel has joined #ruby
<Verity>
like in qt-creator... hover mouse over a container and a popup appears with its contents
<Verity>
that would be great in ruby, I would have fixed this faster I'm sure
<Verity>
and possibly without even needing help
<faraco>
I'm trying to use this IDE (just for curiosity) - padre.perlide.org/ . I bet it's like Geany + syntax highlighting, just a better file manager and syncing.
mrwn has joined #ruby
<j416>
I used to use an IDE all the time; I found it useful in debugging and refactoring. Writing proper tests and having nice editor plugins completely replaces an IDE for me.
mrwn has quit [Remote host closed the connection]
<j416>
I almost never feel the need for step-debugging.
<j416>
when tests aren't enough, print-debugging is enough.
<leitz>
I started doing smaller functions which makes stepping manually easier.
<Verity>
I just threw a gets in and used it to single step
<Verity>
=P
<Verity>
it didnt help me fix this last issue though, but only because I wasnt looking at SOH
<Verity>
I was looking at packet
<Verity>
not reaalizing they were the samwe thing after the first tirm thru loop
dar123 has quit [Read error: Network is unreachable]
genq has joined #ruby
futilegames has quit [Quit: futilegames]
A124 has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
hutch34_ has joined #ruby
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
choke has joined #ruby
dionysus69 has joined #ruby
hutch34_ has quit [Ping timeout: 260 seconds]
ujjain has quit [Ping timeout: 240 seconds]
jdm has joined #ruby
vyirc has joined #ruby
jdm has quit [Remote host closed the connection]
Silthias has joined #ruby
ujjain has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
<vyirc>
hi
<vyirc>
hey guys
<vyirc>
i have made some code that permits running ruby on irc.
<vyirc>
i wish i could bring it here to show you, its really interesting.
<vyirc>
do you guys permit?
Xeago has quit [Ping timeout: 240 seconds]
Pumukel has joined #ruby
<adaedra>
It's not really a testing channel
<adaedra>
Furthermore, before running a bot that can execute arbitrary code on your machine on a public place, you should be 250% sure no one can do evil things
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
danielpclark has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pumukel has quit [Ping timeout: 246 seconds]
cfec0b8d has joined #ruby
__Yiota has joined #ruby
futilegames has joined #ruby
<vyirc>
adaedra this is a nice bot.
<vyirc>
adaedra it may be useful here.
<vyirc>
adaedra it permts one to drop multiple lines and have code executed.
<vyirc>
adaedra i'm suggesting you guys to use it here. is there some op with whom i can talk?
futilegames has quit [Client Quit]
t-recx has joined #ruby
psychicist__ has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tvw has joined #ruby
__Yiota has joined #ruby
pwnd_nsfw has joined #ruby
minimalism has quit [Quit: minimalism]
pwnd_nsfw` has quit [Ping timeout: 268 seconds]
choke has joined #ruby
patarr has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
latino31 has quit [Ping timeout: 240 seconds]
__Yiota has joined #ruby
<hanmac>
adaedra: specailly in this channel you need 300% sure it cant do bad shit ;P
ameliabot has joined #ruby
<vyirc>
=ruby
<vyirc>
def foo
<vyirc>
puts 'foo' * 10
<vyirc>
end
<vyirc>
foo
<vyirc>
=end
<ameliabot>
foofoofoofoofoofoofoofoofoofoo
<vyirc>
henmac thats the bot i told of.
jdm has joined #ruby
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has quit [Client Quit]
muelleme_ has quit [Ping timeout: 260 seconds]
choke has joined #ruby
mikeiniowa has joined #ruby
vuoto has joined #ruby
__Yiota has joined #ruby
__Yiota has quit [Client Quit]
montanonic has quit [Ping timeout: 258 seconds]
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 256 seconds]
hutch34_ has joined #ruby
olivi____ has joined #ruby
olivi____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
rikkipitt has joined #ruby
hutch34_ has quit [Ping timeout: 258 seconds]
Xeago has joined #ruby
A124 has quit [Ping timeout: 246 seconds]
Fernando-Basso has joined #ruby
olivi____ has quit [Remote host closed the connection]
blackmesa has joined #ruby
<baweaver>
=ruby
<baweaver>
`pwd`
<baweaver>
=end
ujjain has quit [Read error: Connection reset by peer]
_sfiguser has quit [Remote host closed the connection]
roflmyeggo has quit [Quit: Lost terminal]
leito has quit [Ping timeout: 260 seconds]
pwnd_nsfw` has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.7]
renchan has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
pwnd_nsfw has quit [Ping timeout: 240 seconds]
olivi____ has joined #ruby
jane_booty_doe has quit [Quit: Leaving]
<rizonz>
havenwood: let's say it starts with rizonz and I need to filter everything else behind rizonz and assign it to a new var ?
ujjain has quit [Read error: Connection reset by peer]
rikkipitt has quit [Quit: Leaving...]
CloCkWeRX has joined #ruby
<toretore>
rizonz: gist your code
<toretore>
then explain what you're trying to do
<toretore>
?xy
<ruby[bot]>
it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378