charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
johnzorn has joined #ruby
skweek has quit [Ping timeout: 256 seconds]
blackbombay has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
millerti has joined #ruby
millerti has quit [Max SendQ exceeded]
reverberations has joined #ruby
brent__ has joined #ruby
icharlie_ has joined #ruby
blackbombay has joined #ruby
millerti has joined #ruby
j0sephDive has quit [Ping timeout: 252 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
j0sephDive has joined #ruby
millerti has quit [Max SendQ exceeded]
millerti has joined #ruby
icharlie has quit [Ping timeout: 264 seconds]
<zenspider>
cippaciong: because that is what bundler does. minites ships as a gem in ruby, and bundler rewrites reality so you only see what is in the gemfile
<zenspider>
(and the transitive closure of their deps)
charliesome has joined #ruby
<zenspider>
cippaciong: bundle into a private repo and don't use bundle exec... you'll get the same benefits of bundler w/o the lags in startup
<zenspider>
bundler is slow as fuck
<zenspider>
well... without AS MUCH of the lags in speedup
<cippaciong>
zenspider: I see..
<cippaciong>
what do you mean with 'bundle into a private repo'?
quazimodo has quit [Ping timeout: 240 seconds]
<zenspider>
export GEM_HOME=/path/to/my/apps/gems
<zenspider>
bundle install
ruby394 has quit [Ping timeout: 260 seconds]
<zenspider>
I use ohmygems to do this: omg myappname
<zenspider>
then it exports GEM_HOME=~/.gems/repos/myappname
<cippaciong>
and then I can simply run with `ruby something.rb` right?
Koirishima has quit [Changing host]
Koirishima has joined #ruby
AustinMatherne has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous_ has joined #ruby
<cippaciong>
I took a look at ohmygems, that's interesting. Thanks zenspider
AustinMatherne has quit [Remote host closed the connection]
<zenspider>
cippaciong: yup. just use ruby after that. Assumes you're NOT depending on bundler's autorequire or that you're using bundle_require if you do
<zenspider>
(which is where the other lags in bundler come from and is horrible imhfo)
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
icharlie_ has joined #ruby
Alina-malina has quit [Ping timeout: 250 seconds]
icharlie has quit [Ping timeout: 246 seconds]
redpants has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
Nicmavr has quit [Read error: Connection reset by peer]
icharlie_ has quit []
Alina-malina has joined #ruby
redpants has quit [Quit: Lost terminal]
redpants has joined #ruby
<AliG1000>
I'm looking for someone to set this up: https://github.com/boonrs/transitmix on Ruby on Rails one-click application on Digital Ocean. Where is a good place to start?
bruce_lee has quit [Ping timeout: 250 seconds]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
statelesscode has quit [Ping timeout: 258 seconds]
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
libastral has quit [Ping timeout: 258 seconds]
tubuliferous_ has joined #ruby
statelesscode has joined #ruby
libastral has joined #ruby
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
quazimodo has joined #ruby
arescorpio has quit [Ping timeout: 268 seconds]
tubuliferous_ has quit [Ping timeout: 265 seconds]
agent_white has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
n008f4g_ has quit [Ping timeout: 268 seconds]
pwnd_nsfw has quit [Ping timeout: 264 seconds]
statelesscode_ has joined #ruby
h1fuelcell has joined #ruby
pwnd_nsfw has joined #ruby
statelesscode has quit [Ping timeout: 265 seconds]
statelesscode_ is now known as statelesscode
ruby-lang690 has joined #ruby
Rodya_ has quit [Remote host closed the connection]
bayed has quit [Quit: Connection closed for inactivity]
chouhoulis has quit [Remote host closed the connection]
ruby-lang690 has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
reverberations has quit [Ping timeout: 250 seconds]
Koirishima has quit [Quit: WeeChat 1.5]
hanmac has quit [Ping timeout: 258 seconds]
redpants has quit [Quit: Lost terminal]
AliG1000 has quit [Ping timeout: 258 seconds]
lel has quit [Ping timeout: 240 seconds]
AliG1000 has joined #ruby
reverberations has joined #ruby
lel has joined #ruby
fullofcaffeine has joined #ruby
Pachonk has joined #ruby
gtaylor1 has left #ruby ["WeeChat 1.5"]
chouhoulis has quit [Remote host closed the connection]
al2o3-cr_ is now known as al2o3-cr
quazimodo has quit [Ping timeout: 250 seconds]
quazimodo has joined #ruby
rgiscard has joined #ruby
hanmac has joined #ruby
boon_ has joined #ruby
nankyokusei has joined #ruby
boon_ has left #ruby [#ruby]
Alina-malina has quit [Ping timeout: 245 seconds]
nankyokusei has quit [Ping timeout: 240 seconds]
h1fuelcell has quit [Remote host closed the connection]
harai_ has quit [Ping timeout: 258 seconds]
teclator has quit [Remote host closed the connection]
kuSuSE has quit [Ping timeout: 248 seconds]
h1fuelcell has joined #ruby
jaguarmagenta has joined #ruby
reverberations has quit [Ping timeout: 265 seconds]
jaguarmagenta has quit [Ping timeout: 258 seconds]
hahuang61 has joined #ruby
Rodya_ has joined #ruby
Alina-malina has joined #ruby
harai_ has joined #ruby
dviola has quit [Quit: WeeChat 1.6]
braincrash has quit [Ping timeout: 250 seconds]
hahuang61 has quit [Ping timeout: 258 seconds]
nicoulaj has quit [Remote host closed the connection]
ghostlight has quit [Ping timeout: 260 seconds]
JoshS has quit [Ping timeout: 258 seconds]
<Rich_Morin>
egghead.io is pretty sweet - Do you know what limitations affect non-Pro users?
<Rich_Morin>
(Sorry; wrong tab :-/)
Pachonk has quit [Read error: Connection reset by peer]
arescorpio has joined #ruby
bronson has joined #ruby
Pachonk has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
bronson has quit [Ping timeout: 252 seconds]
zotherstupidguy has joined #ruby
<zotherstupidguy>
join #bundler
Pachonk has quit [Ping timeout: 264 seconds]
h1fuelcell has quit [Remote host closed the connection]
c355e3b has quit [Quit: Connection closed for inactivity]
h1fuelcell has joined #ruby
cdg has quit [Remote host closed the connection]
rgiscard has quit [Quit: Gone fishing]
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
boon_ has joined #ruby
braincrash has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.6]
h1fuelcell has quit [Ping timeout: 250 seconds]
hotpancakes has joined #ruby
beilabs_ has joined #ruby
blackbombay has joined #ruby
tubuliferous_ has joined #ruby
bradleyprice has quit [Ping timeout: 250 seconds]
ghostlight has joined #ruby
alireza has joined #ruby
Pachonk has joined #ruby
Alina-malina has quit [Ping timeout: 258 seconds]
BTRE has quit [Read error: Connection reset by peer]
gix has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Ping timeout: 264 seconds]
cdg has joined #ruby
blackbombay has quit [Ping timeout: 258 seconds]
tubuliferous_ has quit [Ping timeout: 265 seconds]
BTRE has joined #ruby
braincrash has quit [Ping timeout: 265 seconds]
cdg has quit [Ping timeout: 258 seconds]
jamto11 has quit [Remote host closed the connection]
gix has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
BTRE has joined #ruby
Devalo has joined #ruby
harai_ has quit [Ping timeout: 250 seconds]
boon_ has left #ruby [#ruby]
fullofcaffeine has quit [Remote host closed the connection]
howdoi has joined #ruby
fullofcaffeine has joined #ruby
jamto11 has joined #ruby
jamto11 has quit [Remote host closed the connection]
Devalo has quit [Ping timeout: 246 seconds]
arescorpio has quit [Quit: Leaving.]
fullofcaffeine has quit [Ping timeout: 246 seconds]
ResidentBiscuit has joined #ruby
Guest54 has joined #ruby
Guest54 has quit [Client Quit]
pwnd_nsfw` has joined #ruby
Guest54 has joined #ruby
pwnd_nsfw has quit [Ping timeout: 268 seconds]
brent__ has quit [Quit: Connection closed for inactivity]
ResidentBiscuit has quit [Ping timeout: 258 seconds]
blackbombay has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
jamto11 has joined #ruby
boon_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
rgiscard has joined #ruby
Rodya_ has joined #ruby
h1fuelcell has joined #ruby
jamto11 has quit [Remote host closed the connection]
beilabs_ has quit [Remote host closed the connection]
beilabs has joined #ruby
boon_ has left #ruby [#ruby]
h1fuelcell has quit [Ping timeout: 258 seconds]
chouhoulis has joined #ruby
beilabs has quit [Ping timeout: 268 seconds]
hfp_work has quit [Ping timeout: 250 seconds]
johnny56 has quit [Read error: Connection reset by peer]
enterprisey has joined #ruby
johnny56 has joined #ruby
hfp_work has joined #ruby
Guest54 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 258 seconds]
h1fuelcell has joined #ruby
tmtwd has joined #ruby
Koirishima has joined #ruby
jaguarmagenta has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
fredolinhares has joined #ruby
nankyokusei has joined #ruby
pwnd_nsfw has joined #ruby
koldbrutality has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 265 seconds]
<koldbrutality>
how do i create a new process in ruby but not a subprocess?
<koldbrutality>
basically i want to launch a separate program
nankyokusei has quit [Ping timeout: 240 seconds]
LuckyABA has joined #ruby
Koirishima1 has joined #ruby
Koirishima1 has quit [Client Quit]
Koirishima has quit [Ping timeout: 248 seconds]
elevan has joined #ruby
d0nn1e has quit [Ping timeout: 250 seconds]
function has joined #ruby
d0nn1e has joined #ruby
h1fuelcell has joined #ruby
Guest54 has joined #ruby
codfection has joined #ruby
montanonic has joined #ruby
milardovich has joined #ruby
hahuang61 has joined #ruby
milardovich has quit [Ping timeout: 252 seconds]
last_staff has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
Pachonk has quit [Ping timeout: 256 seconds]
rgiscard has quit [Quit: Gone fishing]
Swaggn has joined #ruby
skweek has quit [Remote host closed the connection]
yaewa has joined #ruby
bradleyprice has joined #ruby
moei has quit [Ping timeout: 252 seconds]
fredolinhares has quit [Quit: WeeChat 1.6]
h1fuelcell has quit [Remote host closed the connection]
skweek has joined #ruby
jamto11 has joined #ruby
bradleyprice has quit [Ping timeout: 245 seconds]
<koldbrutality>
i think i fixed it... was an mistype with an argument --url should have been --uri. it looked like it was hanging.
hotpancakes has joined #ruby
fullofcaffeine has joined #ruby
hotpanca_ has joined #ruby
hotpancakes has quit [Read error: Connection reset by peer]
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
<koldbrutality>
i used spawn also
bronson has joined #ruby
fullofcaffeine has quit [Ping timeout: 250 seconds]
<koldbrutality>
okay when i do a ctrl-c it killed my process. how do i stop that?
<matthewd>
koldbrutality: You probably want a double fork
bronson has quit [Ping timeout: 258 seconds]
milardovich has joined #ruby
tubuliferous_ has joined #ruby
milardovich has quit [Ping timeout: 258 seconds]
j0sephDive has quit [Ping timeout: 250 seconds]
<koldbrutality>
okay i just set the :pgroup=>true and it seemed to work
antoniobeyah has joined #ruby
tubuliferous_ has quit [Ping timeout: 250 seconds]
PaschalsWager has joined #ruby
lightstalker has quit [Ping timeout: 265 seconds]
nowz has joined #ruby
dnicole has quit [Remote host closed the connection]
Dimik has quit [Ping timeout: 252 seconds]
xall has joined #ruby
lightstalker has joined #ruby
h1fuelcell has joined #ruby
Rodya_ has quit [Quit: Leaving...]
<xall>
i spent some time being confused about why my hash keys were evaluated as a strange mix of strings and symbols
<xall>
so i learned that 1.9 hash colon syntax is for symbols only
<xall>
XD
dionysus69 has joined #ruby
sp4rrow_ has quit [Quit: Textual]
Guest54 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
enterprisey has quit [Remote host closed the connection]
montanonic has quit [Ping timeout: 240 seconds]
function has quit [Quit: found 1 in /dev/zero]
skydiver has joined #ruby
milardovich has joined #ruby
tubuliferous_ has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 260 seconds]
tubuliferous_ has quit [Ping timeout: 268 seconds]
Guest54 has joined #ruby
<jidar>
matthewd: you need to have the app respond to SIGINT
ResidentBiscuit has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 256 seconds]
JoshS has joined #ruby
beilabs has joined #ruby
montanonic has quit [Ping timeout: 258 seconds]
Madplatypus has joined #ruby
saneax is now known as saneax-_-|AFK
last_staff has quit [Quit: poof]
hahuang61 has joined #ruby
toretore has joined #ruby
h1fuelcell has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
tildes has joined #ruby
djbkd_ has joined #ruby
Jackneill has joined #ruby
beilabs has quit [Remote host closed the connection]
hotpancakes has joined #ruby
bradleyprice has joined #ruby
Salih has joined #ruby
hotpanc__ has joined #ruby
hotpanca_ has quit [Ping timeout: 258 seconds]
PaschalsWager has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bradleyprice has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Ping timeout: 256 seconds]
lenwood has joined #ruby
rippa has joined #ruby
sepp2k has joined #ruby
bronson has joined #ruby
SpiffTR has joined #ruby
Macaveli has joined #ruby
bronson has quit [Ping timeout: 250 seconds]
andrzeju_ has quit [Ping timeout: 252 seconds]
tildes has quit [Ping timeout: 250 seconds]
hotpancakes has joined #ruby
milardovich has joined #ruby
Fernando-Basso has joined #ruby
hotpanc__ has quit [Ping timeout: 245 seconds]
milardovich has quit [Ping timeout: 268 seconds]
SpiffTR has quit [Quit: Leaving.]
j3r0 has joined #ruby
beilabs has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
FastJack_ has joined #ruby
skydiver has quit [Quit: WeeChat 1.6]
skydiver has joined #ruby
FastJack has quit [Ping timeout: 264 seconds]
blackbombay has quit [Ping timeout: 265 seconds]
_main_ has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
_main_ has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
jamto11 has quit [Ping timeout: 252 seconds]
_main_ has quit [Read error: Connection reset by peer]
__main__ has joined #ruby
quazimodo has quit [Ping timeout: 265 seconds]
blackbombay has joined #ruby
UKRoma has joined #ruby
djbkd_ has quit [Remote host closed the connection]
UKRoma has quit [Remote host closed the connection]
djbkd_ has joined #ruby
UKRoma has joined #ruby
UKRoma has quit [Client Quit]
vuoto has joined #ruby
montanonic has joined #ruby
Swaggn has quit [Ping timeout: 246 seconds]
hutch34 has quit [Ping timeout: 258 seconds]
pandaant has joined #ruby
jshjsh has joined #ruby
iooner has joined #ruby
Guest54 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
JoshS has quit [Ping timeout: 258 seconds]
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
harai_ has joined #ruby
Devalo has joined #ruby
yaw has joined #ruby
johnzorn has quit [Ping timeout: 258 seconds]
hotpancakes has quit [Remote host closed the connection]
h1fuelcell has quit [Remote host closed the connection]
montanonic has quit [Ping timeout: 258 seconds]
hotpancakes has joined #ruby
tubuliferous_ has joined #ruby
nowz has quit [Quit: Leaving]
tmtwd has quit [Quit: Leaving]
FastJack_ has quit [Quit: leaving]
nowz has joined #ruby
FastJack has joined #ruby
hotpancakes has quit [Ping timeout: 256 seconds]
tubuliferous_ has quit [Ping timeout: 258 seconds]
djbkd_ has quit [Remote host closed the connection]
milardovich has joined #ruby
Mia has quit [Ping timeout: 264 seconds]
toretore has quit [Quit: Leaving]
<koldbrutality>
how do i check if a process is alive nonblocked?
lenwood has quit [Ping timeout: 248 seconds]
milardovich has quit [Ping timeout: 258 seconds]
pawnbox has joined #ruby
vuoto has quit [Read error: Connection reset by peer]
aidalgol has quit [Quit: zZzZZzzzz]
hotpancakes has joined #ruby
pawnbox has quit [Remote host closed the connection]
nankyokusei has joined #ruby
nankyokusei has quit [Ping timeout: 264 seconds]
Mia has joined #ruby
<CalimeroTeknik>
is there an equivalent to execvp in ruby? to do safe stuff unlike system() and other backticks. example: execvp("ls", "-l", "--", file)
milardovich has joined #ruby
symm has joined #ruby
lxsameer has joined #ruby
charliesome has joined #ruby
xall has quit [Ping timeout: 250 seconds]
QualityAddict has quit [Ping timeout: 250 seconds]
milardovich has quit [Ping timeout: 264 seconds]
yaw has quit [Ping timeout: 250 seconds]
Salih has quit [Quit: Leaving]
Definity has quit [Ping timeout: 260 seconds]
symm has quit [Ping timeout: 250 seconds]
cibs has quit [Ping timeout: 268 seconds]
cibs has joined #ruby
hahuang61 has joined #ruby
hutch34 has joined #ruby
yaw has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
cats is now known as catsmas
hutch34 has quit [Ping timeout: 256 seconds]
yaw has quit [Read error: No route to host]
quazimodo has joined #ruby
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
h1fuelcell has joined #ruby
<apeiros>
CalimeroTeknik: a number of commands to execute subcommands accept multiple arguments to bypass the shell
montanonic has joined #ruby
<apeiros>
system() being one of them
<apeiros>
spawn() another
minimalism has quit [Ping timeout: 258 seconds]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
bradleyprice has joined #ruby
Devalo has quit [Ping timeout: 246 seconds]
h1fuelcell has quit [Ping timeout: 248 seconds]
<CalimeroTeknik>
oh! good
bronson has joined #ruby
minimalism has joined #ruby
hotpancakes has quit [Remote host closed the connection]
bradleyprice has quit [Ping timeout: 250 seconds]
yaw has joined #ruby
minimalism has quit [Client Quit]
bronson has quit [Ping timeout: 268 seconds]
jphase_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
h1fuelcell has joined #ruby
jphase has quit [Ping timeout: 245 seconds]
yaw has quit [Ping timeout: 248 seconds]
pandaant has quit [Quit: Lost terminal]
matp has joined #ruby
<CalimeroTeknik>
I see… spawn will see whether there is whitespace in the first argument, and run a shell or not accordingly
<CalimeroTeknik>
(from strace'ing irb)
matp_ has quit [Read error: Connection reset by peer]
armyriad has quit [Read error: Connection reset by peer]
ddffg has joined #ruby
xall has joined #ruby
koooge has joined #ruby
codfection has quit [Quit: Leaving]
montanonic has quit [Ping timeout: 245 seconds]
conta has joined #ruby
charliesome has joined #ruby
muelleme has joined #ruby
tubuliferous_ has joined #ruby
yaw has joined #ruby
Phage has joined #ruby
tubuliferous_ has quit [Ping timeout: 258 seconds]
jamto11 has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamto11 has quit [Ping timeout: 258 seconds]
byte512 has joined #ruby
n008f4g_ has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Madplatypus has quit [Quit: Connection closed for inactivity]
banisterfiend has joined #ruby
nowz has quit [Quit: Leaving]
pawnbox has joined #ruby
hotpancakes has joined #ruby
Salih has joined #ruby
Salih has quit [Changing host]
Salih has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
nettoweb has joined #ruby
Macaveli has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
symm has joined #ruby
papercod1 has quit [Ping timeout: 244 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<koldbrutality>
thx apeiros it works in both video done and killed mplayer
nettoweb has quit [Remote host closed the connection]
milardov_ has joined #ruby
hutch34 has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
hahuang61 has quit [Ping timeout: 258 seconds]
lenwood has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
milardov_ has quit [Ping timeout: 246 seconds]
montanonic has joined #ruby
lenwood has quit [Ping timeout: 258 seconds]
pawnbox has quit [Remote host closed the connection]
bradleyprice has joined #ruby
bronson has joined #ruby
bradleyprice has quit [Ping timeout: 258 seconds]
bronson has quit [Ping timeout: 250 seconds]
sdothum has joined #ruby
c355e3b has joined #ruby
JeanCarloMachado has joined #ruby
biberu has joined #ruby
milardovich has joined #ruby
nettoweb has joined #ruby
dinoangelov has joined #ruby
montanonic has quit [Ping timeout: 258 seconds]
milardovich has quit [Ping timeout: 245 seconds]
nikivi has joined #ruby
conta has joined #ruby
alamar is now known as julian
tubuliferous_ has joined #ruby
swills has joined #ruby
conta has quit [Ping timeout: 250 seconds]
conta has joined #ruby
tubuliferous_ has quit [Ping timeout: 248 seconds]
xall has quit [Ping timeout: 250 seconds]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
pwnd_nsfw` has joined #ruby
pandaant has joined #ruby
scootaloo has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
cajone1 has left #ruby [#ruby]
jamto11 has joined #ruby
pandaant has quit [Quit: Lost terminal]
jamto11 has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
mikecmpbll has quit [Client Quit]
conta has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
Jackneill has quit [Remote host closed the connection]
Jackneill has joined #ruby
bradleyprice has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bradleyprice has quit [Ping timeout: 248 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alireza has quit [Quit: WeeChat 1.0.1]
hotpancakes has joined #ruby
lxsameer has quit [Quit: WeeChat 1.6]
tildes has joined #ruby
johnmilton has joined #ruby
Guest98855 has quit [Ping timeout: 268 seconds]
rippa has joined #ruby
UserJosh has joined #ruby
jshjsh has quit [Ping timeout: 268 seconds]
johnmilton has quit [Ping timeout: 260 seconds]
antoniobeyah has quit [Quit: antoniobeyah]
Ax has joined #ruby
nankyokusei has joined #ruby
tildes has quit [Ping timeout: 248 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has quit [Ping timeout: 248 seconds]
nankyokusei has quit [Ping timeout: 250 seconds]
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 248 seconds]
the_drow has joined #ruby
Salih has quit [Quit: Leaving]
byte512 has quit [Ping timeout: 258 seconds]
<the_drow>
How do I pass super as a proc?
<the_drow>
Is thread_pool.post &super valid?
<matthewd>
It's valid, but it won't do what you want
<matthewd>
thread_pool.post { super }
muelleme has quit [Ping timeout: 256 seconds]
<apeiros>
don't forget that `super` passes all args + block the current method received
jshjsh has joined #ruby
<the_drow>
matthewd, I'd rather avoid creating a new proc for this if possible
<the_drow>
There are no args and/or block to that method
<matthewd>
What did you imagine &super was going to do, if not create a proc? :/
<the_drow>
I assume it caches the proc for further use
<the_drow>
Instead of creating a new proc every time
Salih has joined #ruby
<apeiros>
super is a method call. it would be incorrect to cache it.
UserJosh has quit [Ping timeout: 258 seconds]
<matthewd>
Given there are no arguments, you could do something more complicated to avoid the block... but it really doesn't seem worth bothering
Salih has left #ruby [#ruby]
<matthewd>
Read: don't do that unless you're sure you need to. And if you're sure you need to, you'll know how.
symm has quit [Ping timeout: 245 seconds]
hotpancakes has joined #ruby
hahuang61 has joined #ruby
milardovich has joined #ruby
<the_drow>
matthewd, I'm not much of a Rubist
<the_drow>
So even if I need to I wouldn't know how
nadir has joined #ruby
hutch34 has joined #ruby
xall has joined #ruby
<matthewd>
My intention was to imply that if you don't know how, then you're unlikely to know how to determine it's actually needed, either
hahuang61 has quit [Ping timeout: 258 seconds]
eightbitraptor has joined #ruby
<the_drow>
so let's say I want to know for further usage
<matthewd>
I'm happy to tell you how, of course.. but my point is that I recommend doing the straight-forward thing, and not going out of your way to solve a problem that doesn't exist
<matthewd>
Oh, actually.. the thing I was thinking of wouldn't work anyway
milardovich has quit [Ping timeout: 264 seconds]
nicoulaj has joined #ruby
<matthewd>
If you're expecting the method to be called repeatedly *on the same instance*, then you could memoize the block in an instance variable
<the_drow>
How do I do that?
<matthewd>
If different instances are involved, then you can't avoid it, because there's still a [hidden] argument: self
hutch34 has quit [Ping timeout: 264 seconds]
<matthewd>
@var ||= lambda { super }; thread_pool.post(&@var)
<the_drow>
Oh cool
pilne has joined #ruby
<matthewd>
But that's ultimately just trading one thing for another, plus making the implementation more fragile for future changes -- really not a good idea
ponga has joined #ruby
JeanCarloMachado has quit [Ping timeout: 245 seconds]
lenwood has joined #ruby
maloik has quit [Remote host closed the connection]
bronson has joined #ruby
maloik has joined #ruby
hotpancakes has quit [Remote host closed the connection]
h1fuelcell has quit [Remote host closed the connection]
johnzorn has quit [Ping timeout: 245 seconds]
tubuliferous_ has quit [Ping timeout: 252 seconds]
GodFather has quit [Remote host closed the connection]
DenSchub has quit [Ping timeout: 268 seconds]
Fernando-Basso has quit [Quit: WeeChat 1.6]
cdg has joined #ruby
elevan_ has joined #ruby
GodFather has joined #ruby
Dimik has joined #ruby
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
elevan has quit [Ping timeout: 252 seconds]
muelleme has joined #ruby
nettoweb has joined #ruby
muelleme has quit [Ping timeout: 250 seconds]
nikivi has quit [Read error: Connection reset by peer]
nikivi_ has joined #ruby
blackbombay has quit [Ping timeout: 256 seconds]
lenwood has quit [Ping timeout: 258 seconds]
despai has joined #ruby
<matthewd>
xall: If that's all it is, I think I'd probably just make it a class method on Card -- that class already knows how to parse its part of the hand string, so giving it the split+map for a set seems reasonable enough
<matthewd>
xall: But yes, that also seems like a reasonable choice
h1fuelcell has joined #ruby
<xall>
matthewd: yeah i was thinking maybe it's simple enough for that eh
johnzorn has joined #ruby
<matthewd>
Passing the string to PokerHand#initialize feels surprising, given that, though
<matthewd>
Given a separate parser, I'd expect PokerHand to take an array of cards
eightbitraptor has quit [Ping timeout: 258 seconds]
h1fuelcell has quit [Remote host closed the connection]
<matthewd>
also just generally, I think I'd expect that, really... if something is dealing cards to hands, constructing such a string seems like unwanted effort
<matthewd>
(though that's obviously heading into guessing what you might do with such a class)
<matthewd>
PokerHand would be another reasonable place to put the parser, though: PokerHand.parse(string), which calls new with the result of the split+map, perhaps?
DenSchub has joined #ruby
blackbombay has joined #ruby
eb0t has quit [Read error: Connection reset by peer]
xrlk has quit [Ping timeout: 265 seconds]
tim1874_ has quit [Quit: leaving]
<xall>
matthewd: yeah, the constraints of this problem are given a string of cards like that. but i agree, it seems goofy to init pokerhand like that
lenwood has joined #ruby
eb0t has joined #ruby
saneax-_-|AFK is now known as saneax
andrzeju_ has joined #ruby
blackbom1 has joined #ruby
Ax has quit [Quit: Ax]
blackbombay has quit [Ping timeout: 248 seconds]
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
brianpWins_ has joined #ruby
brianpWins has quit [Read error: Connection reset by peer]
brianpWins_ is now known as brianpWins
swills has quit [Ping timeout: 256 seconds]
bocaneri has quit [Ping timeout: 246 seconds]
dinoangelov has quit [Quit: (null)]
blackbom1 has quit [Ping timeout: 252 seconds]
bocaneri has joined #ruby
bradleyprice has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
DLSteve has joined #ruby
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
def_jam has joined #ruby
rumiacchi has quit [Quit: Leaving]
bradleyprice has quit [Ping timeout: 258 seconds]
JeanCarloMachado has joined #ruby
eb0t has quit [Ping timeout: 260 seconds]
Joufflu has joined #ruby
tildes has joined #ruby
Joufflu_ has quit [Ping timeout: 265 seconds]
shinnya has joined #ruby
h1fuelcell has joined #ruby
h1fuelcell has quit [Client Quit]
despai has joined #ruby
h1fuelcell has joined #ruby
Koirishima has joined #ruby
nankyokusei has joined #ruby
despai has quit [Client Quit]
hotpancakes has joined #ruby
Madplatypus has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
saneax is now known as saneax-_-|AFK
SpiffTR has joined #ruby
ammar_ has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
h1fuelce_ has joined #ruby
Robtop__ has joined #ruby
j3r0 has quit [Ping timeout: 260 seconds]
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
h1fuelcell has quit [Ping timeout: 265 seconds]
brendan- has joined #ruby
j3r0 has joined #ruby
chouhoulis has joined #ruby
nettoweb has joined #ruby
eightbitraptor has joined #ruby
jamto11 has joined #ruby
cdg has quit [Remote host closed the connection]
SpiffTR has quit [Quit: Leaving.]
lenwood has quit [Quit: Konversation terminated!]
cdg has joined #ruby
lenwood has joined #ruby
brianpWins has quit [Quit: brianpWins]
hahuang61 has joined #ruby
mikecmpbll has joined #ruby
cibs has quit [Ping timeout: 268 seconds]
|RicharD| has joined #ruby
codfection has joined #ruby
cibs has joined #ruby
cdg has quit [Ping timeout: 258 seconds]
hutch34 has joined #ruby
muelleme has joined #ruby
quazimodo has quit [Ping timeout: 240 seconds]
hahuang61 has quit [Ping timeout: 258 seconds]
tildes has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Remote host closed the connection]
Pachonk has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hutch34 has quit [Ping timeout: 256 seconds]
julian is now known as alamar
lenwood has quit [Ping timeout: 250 seconds]
hotpanca_ has joined #ruby
<Pachonk>
Good morning everybody.
tubuliferous_ has joined #ruby
bronson has joined #ruby
Koirishima has quit [Ping timeout: 248 seconds]
cajone has joined #ruby
brendan- has joined #ruby
tubuliferous_ has quit [Ping timeout: 250 seconds]
bronson has quit [Ping timeout: 260 seconds]
LoneHerm_ has joined #ruby
Koirishima has joined #ruby
Koirishima has joined #ruby
Koirishima has quit [Changing host]
marchelzo has joined #ruby
<xall>
i have a hash of counts. i want to check if at least two values are greater than n. what's the ruby way to do this?
<marchelzo>
i saw on reddit that ruby is going to decline over the next 10 years. is it true?
govg has joined #ruby
<xall>
if we could predict the future we'd all be rich mate
<marchelzo>
but what do you guys think. is it likely
<marchelzo>
is ruby past its prime
<apeiros>
marchelzo: ruby is just as dead as C, java and python. is that sufficient for your curiosity?
<marchelzo>
no
<marchelzo>
of course ruby is not dead. but is it going to decline over the next 10 years or so
<xall>
web asm is gonna rule the world
<apeiros>
I suggest you go to greece, delphi. I hear they've got a formidable oracle.
<xall>
javascript in your toaster
<xall>
or something like that
<marchelzo>
ruby is a tight little language
<apeiros>
xall: re your question: depends a bit on whether you want simple or scalable code
<marchelzo>
i dont want to see it die
<marchelzo>
why not both
<marchelzo>
simple should be scalable. thats the mark of a cute little language
muelleme has quit [Ping timeout: 260 seconds]
<apeiros>
marchelzo: you got the marks of a troll
<marchelzo>
nope
<apeiros>
xall: if your dataset isn't large, I'd probably just go with hash.count { |k,v| v > min } >= 2
yardenbar has quit [Ping timeout: 248 seconds]
<xall>
apeiros: that should suffice. thanks
GodFather has quit [Quit: Ex-Chat]
<xall>
my dataset isn't larger than 5 so we're just out of mission critical territory
<marchelzo>
apeiros: that's simple and scalable
GodFather has joined #ruby
<marchelzo>
very cute
jaguarmagenta has quit [Remote host closed the connection]
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
<marchelzo>
hash.values.sort!.reverse!.take(2).min > n
Devalo has joined #ruby
<marchelzo>
that's what i was going to suggest but it's ugly
<apeiros>
don't use sort! when chaining. sort! can return nil.
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<apeiros>
oh, seems sort! actually doesn't.
<marchelzo>
that would be mighty inconvenient
<apeiros>
couple of mutating methods return nil if nothing changes.
Guest58506 has joined #ruby
<apeiros>
well, if you chain, just use the non-bang methods.
<marchelzo>
that's a bit whacky isn't it?
<marchelzo>
why copy temporaries?
* apeiros
not up for language design philosophy
Hyuk has joined #ruby
<marchelzo>
ok
<marchelzo>
just seems a little kooky to me
<marchelzo>
how do you chain methods where one of them is passed a block?
eightbitraptor has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marchelzo>
like hash.values.sort_by { |x| -x }
<marchelzo>
but i want another method after
LoneHerm_ has quit [Remote host closed the connection]
<marchelzo>
oh wow it just works
Guest58506 has quit [Remote host closed the connection]
<marchelzo>
i thought it would be a syntax error. it looks a bit funky
<marchelzo>
when you define a method, the definition yields a Symbol of the method's name?
nettoweb has joined #ruby
dinoangelov has joined #ruby
GodFather has quit [Ping timeout: 264 seconds]
<xall>
apeiros: where does min come from there?
<marchelzo>
xall: it's n in your question
<xall>
ah i'm dumb. n is 2 so i confused myself
Devalo has quit [Ping timeout: 246 seconds]
<apeiros>
min is your minimal value. i.e. you'll have to set it (either literal or variable)
aryaching has joined #ruby
<marchelzo>
do you guys get paid to write ruby
eightbitraptor has quit [Ping timeout: 258 seconds]
cdg has joined #ruby
pawnbox has quit [Remote host closed the connection]
<marchelzo>
i think apeiros /ignored me? :o
jphase_ has quit []
koooge has quit [Quit: Leaving...]
balo has left #ruby [#ruby]
balo has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 258 seconds]
PaschalsWager has joined #ruby
Pachonk has joined #ruby
jaguarmagenta has joined #ruby
jphase has joined #ruby
cdg has joined #ruby
pawnbox has joined #ruby
lxsameer has joined #ruby
Gravious_ has joined #ruby
aryaching has quit [Ping timeout: 250 seconds]
SteenJobs has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
aryaching has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
hotpancakes has joined #ruby
Gravious has quit [Ping timeout: 256 seconds]
jaguarmagenta has joined #ruby
* apeiros
just has a life besides irc
dviola has joined #ruby
aryaching has quit [Client Quit]
aryaching has joined #ruby
<marchelzo>
/me is jealous
cajone has left #ruby [#ruby]
JeanCarloMachado has quit [Ping timeout: 258 seconds]
mhib has joined #ruby
shinnya has quit [Ping timeout: 245 seconds]
tubuliferous_ has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
bradleyprice has joined #ruby
hotpancakes has quit [Ping timeout: 258 seconds]
Devalo has joined #ruby
JeanCarloMachado has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
tubuliferous_ has quit [Ping timeout: 256 seconds]
ResidentBiscuit has joined #ruby
Lord_of_Life has quit [Excess Flood]
bradleyprice has quit [Ping timeout: 258 seconds]
armyriad has joined #ruby
Lord_of_Life has joined #ruby
mhib has quit [Quit: Leaving]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
ResidentBiscuit has quit [Ping timeout: 250 seconds]
<pilne>
i love ruby, but i fear that it isn't what is used internally where i work, and i'm looking to move that direction up the ladder
byte512 has joined #ruby
<pilne>
i feel the most modern language we use is some javascript for really.... spartan enduser facing webpages (i say this as said enduser)
Devalo has quit [Ping timeout: 246 seconds]
Devalo has joined #ruby
<Rich_Morin>
Although JS is improving, it has a long way to go to catch up with Ruby, Elixir, Elm, etc.
<pilne>
i feel that the "guts" (the part i'm interesetd in) is rooted in something far... more bleh
<pilne>
only because the "sales pitch" for plebians like me, made optomizing a traveling salesman problem, something truly "amazing" and "groundbreaking"
cdg has quit [Read error: Connection reset by peer]
the_drow has quit [Quit: This computer has gone to sleep]
<Gravious_>
there seem to be plenty of rails jobs around?
Gravious_ is now known as Gravious
cdg has joined #ruby
<pilne>
this is true :) i just feel that at just about 35, that market isn't going to look at me seriously lol.
<Gravious>
hrm
the_drow has joined #ruby
<Rich_Morin>
Well, from my vantage point (67), I'd hate to see you spend the next several decades doing stuff you don't love.
nankyokusei has joined #ruby
Koirishima has quit [Read error: Connection reset by peer]
ddffg has joined #ruby
<pilne>
wise words that I do try and remedy :)
Koirishima has joined #ruby
<pilne>
i feel like they might be using java... it makes sense being a corporate giant without much desire for change
bradleyprice has joined #ruby
<pilne>
so maybe i can use jruby to kick some ass into a better position
<pilne>
i respect java, i just can't think like java
Devalo has quit [Remote host closed the connection]
<pilne>
python, dart, those tickle me some, but ruby and clojure are the languages i adore (and smalltalk, lisp/scheme, haskell, but those... a bit too far out there for me mentally sometimes).
Devalo has joined #ruby
<Rich_Morin>
FWIW, I love Ruby and I use it for most of my programming. However, if I wanted to build really nifty and scalable web sites, I'd look hard at Phoenix and Elixir. FWIW, Elixir has syntactic macros, like a Lisp...
the_drow has quit [Client Quit]
* Nilium
just uses ruby for CLI tools, string processing stuff, etc.
<pilne>
i have been looking at elixir, what i'd be building is something that processes larger amounts of data,in parallel to do optomizations with some "odd" conditionals
<Nilium>
I mainly use Go for systems work.
nankyokusei has quit [Ping timeout: 264 seconds]
<pilne>
part of my brain says "screw it, if it is good, they'll want it" but the other part says "they are so stupid about other things..."
Devalo has quit [Ping timeout: 246 seconds]
<Rich_Morin>
I can understand Go's rationale, from Google's perspective, but it's a bit too prescriptive for my taste. (eg, defining a variable and not using it is a _fatal error_ ?!?!?)
jamto11 has quit [Remote host closed the connection]
<Nilium>
Eh, just different approaches to concurrency.
jshjsh has quit [Ping timeout: 258 seconds]
<Nilium>
Also not sure why you'd want an unused variable in your code
lenwood has joined #ruby
<Gravious>
this generally happens to me when i must satisfy prototype of some callback
Joufflu has quit [Quit: Leaving]
<Rich_Morin>
Sometimes (eg, during development), I'll define a variable that I might want to use later (eg, for tracing). I wouldn't mind a warning, but a fatal error seems a bit over the top...
<Nilium>
I disagree mostly because I don't define variables unless I'm going to use them.
<Rich_Morin>
whatever
<Nilium>
Defining something ahead of time and then forgetting you did it isn't good, after all.
<Nilium>
I'm sure there are cases where it could be a good idea, but it feels like it'd be weird edge cases
<Rich_Morin>
I never said that I forgot it, just that I wasn't using it at the moment. I clean this sort of thing up as I go along, but I don't want the compiler getting in my way.
hahuang61 has joined #ruby
pawnbox has quit [Remote host closed the connection]
djellemah_ has joined #ruby
<Nilium>
Not saying you did. My point is human errors are tedious, better that the compiler just forbid easy cases.
<Nilium>
That said, that may be the difference in mentality for Go folks vs. Elixir/other language folks.
<CalimeroTeknik>
I get behaviour very unlike what a certain video showed when typing the same thing http://sprunge.us/DbTh
lenwood has quit [Quit: Konversation terminated!]
<CalimeroTeknik>
did the behaviour of method_missing change since 1.8 or something?
lenwood has joined #ruby
<Rich_Morin>
My preference would be to have warnings (that I could disable) in dev mode, with things getting strict at checkin time.
<Nilium>
Yeah, that's basically the difference in Go
<Nilium>
We don't want warnings that people can ignore.
hutch34 has joined #ruby
djellemah has quit [Ping timeout: 256 seconds]
jamto11 has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
<Nilium>
It's too easy to just make exceptions for "well this warning's normal"
<marchelzo>
but sometimes the warning /is/ normal
<Nilium>
Not in Go it ain't.
<pilne>
nothing against go, it was made to replace c at google, it has design features oriented at allowing lots of people to work on lots of code
<Nilium>
elomatreb: The runtime would never be able to sanely enforce that.
<marchelzo>
elomatreb: even if it did, would that really be a problem?
<Rich_Morin>
I recall Matz talking about why he offers other options in Ruby - Unicode doesn't preserve some Japanese subtleties…
<marchelzo>
Nilium: sure it would
<Nilium>
marchelzo: It'd have to scan every string and everything converted to a string to ensure compliance. It's not a practical thing to do.
haxrbyte has joined #ruby
<marchelzo>
Nilium: you'd just have a separate type for arrays of bytes, and the only way to get a proper 'string' would be to call a function that attempted to convert a slice of bytes to a utf-8 string
<Rich_Morin>
Hmmmm. Recalls that two of Go's developers (Rob and Ken) also created UTF-8…
<marchelzo>
reading from a file for example would yield bytes, not a string.
antoniobeyah has joined #ruby
<Nilium>
There are byte slices already, but it'd be weird to enforce UTF-8 only for strings in my book.
milardovich has quit [Remote host closed the connection]
lenwood has quit [Ping timeout: 265 seconds]
<marchelzo>
rust does it
milardovich has joined #ruby
<Nilium>
Strings are effectively just immutable byte sequences in Go that are assumed to be UTF-8 for ranging.
<marchelzo>
in rust the low level read functions work with &[u8], and Strings and &strs are always utf-8 encoded
<marchelzo>
it's quite sensible really
<Nilium>
So you can't represent invalid UTF-8 byte sequences in Rust without a non-string?
<marchelzo>
right
<Nilium>
Can you convert invalid byte sequences to a unicode error character?
<Nilium>
Assuming that's in the stdlib
Gravious has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
<marchelzo>
not sure if it's in the standard library
<marchelzo>
but you could do it, sure
<Nilium>
I'm trying to work out how you salvage user input that's only partially valid
pawnbox has joined #ruby
<Nilium>
So, doable, just weird to me.
<havenwood>
String#srub
<Nilium>
Probably because I assume strings are just bytes since C land and all that.
<havenwood>
scrub*
<marchelzo>
ah yeah
<marchelzo>
the stdlib has from_utf8_lossy
<Nilium>
That'd work then. Still need to learn rust, based on what I hear of it.
<marchelzo>
replaces invalid byte sequences with U+FFFD
givemeurhats has joined #ruby
<givemeurhats>
Hello! How can I access instance variable without using @?
SpiffTR has joined #ruby
<givemeurhats>
with something dynamic
<Gravious>
yes, instance_variable_get
<givemeurhats>
Gravious, oh great!
<givemeurhats>
Gravious, Thank you
<Papierkorb>
givemeurhats: Note that you still have to prepend the @
<matthewd>
> I assume strings are just bytes since C land
<matthewd>
Isn't C a pretty canonical example of strings not being able to hold all possible characters/bytes/values?
<Nilium>
matthewd: No?
<Papierkorb>
C has a char arrays
<matthewd>
(a different limitation, obviously.. but a limitation nonetheless)
<Papierkorb>
Not strings
<Nilium>
C doesn't understand encodings, period. It's just bytes.
<givemeurhats>
Papierkorb, yeah found it in api over google now..dunno why I couldn't find it
<matthewd>
.. as long as they're not \0
jamto11 has quit [Remote host closed the connection]
<Nilium>
No, that's valid too.
<Gravious>
givemeurhats, no problem :)
<Nilium>
If you know the length of the string, a nul byte is fine.
bronson has joined #ruby
<matthewd>
Sure.. and if you treat the string as the array-of-bytes that you want, go/rust/whatever will be happy too
<Nilium>
Well, maybe not rust, but it'll be fine with an actual array of bytes, from what I understand.
h1fuelce_ has quit [Remote host closed the connection]
<matthewd>
But C is full of (admittedly now hopefully-historical) functions that treat string == null-terminated char*
byte512 has quit [Ping timeout: 264 seconds]
<Nilium>
Point was that C had no real limitation there, but man it's easy to take your foot off.
h1fuelcell has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
h1fuelcell has quit [Remote host closed the connection]
<marchelzo>
in C, every string has exacrly one 0 byte, and it's at the end.
<marchelzo>
exactly*
<Nilium>
Not true.
h1fuelcell has joined #ruby
<Nilium>
You _could_ have a C string without a zero byte.
<Nilium>
The problem is more that was a string is in C is not what a string is in other things, usually.
bronson has quit [Ping timeout: 264 seconds]
<marchelzo>
it is true
<Nilium>
So Go assumes it's bytes that are probably utf-8, Rust is bytes that are utf-8, Ruby is bytes with an encoding, etc. For C it's just a sequence of bytes, contents irrelevant.
<marchelzo>
you can't have a string in C with no 0 byte
<Nilium>
Sure you can.
pawnbox has quit [Remote host closed the connection]
<marchelzo>
ISO/IEC 9899 defines a string to be "a sequence of bytes terminated by and including the first null character".
<Nilium>
Allocate any length of bytes, fill it with not-zeroes, and it's still a string.
<marchelzo>
a sequence of bytes with no 0 byte is not a string
<Nilium>
It's just not a string any of the libc functions can use.
<marchelzo>
it's not a string in C at all
<Nilium>
A string is a sequence of bytes in my book. That's all it is.
lenwood has joined #ruby
<marchelzo>
ok, i just wanted you to know that 'string' has a precise definition in C
tdy has quit [Ping timeout: 252 seconds]
<Nilium>
In C alone, sure.
<Nilium>
We've mostly been talking about strings across multiple languages.
girobiro has joined #ruby
<matthewd>
Then I'm confused. We've agreed that all languages are happy with any sequence of bytes in their respective array-of-bytes type.
<Nilium>
Pretty much.
<Nilium>
Status quo maintained.
<matthewd>
You implied that rust's string is remarkable by not allowing some byte-sequences, and I claimed that C's string does likewise
<matthewd>
But I'll admit I was basing that on the C standard, not whatever book you're using
XV8 has joined #ruby
<Nilium>
I'm basing it on how things are actually structured in memory.
<matthewd>
As marchelzo already quoted, section 7.1.1 (1): "A string is a contiguous sequence of characters terminated by and including the first null
<matthewd>
character"
<Nilium>
I think that's missing the point and I feel like I've been clear about what I mean when I say "string" the entire time.
h1fuelcell has quit [Remote host closed the connection]
h1fuelcell has joined #ruby
<Nilium>
If you want to use the C definition or the rust definition or something for the entire conversation, OK.
<Nilium>
But then we have to start going "rust is a C string but minus the sentinel NUL" (unless it has that too - I don't know)
<matthewd>
You seem to be using a definition of "string" that looks like "in C, a sequence of bytes; in rust, the built-in type".. which is fine right up until you draw a comparison between them
<Nilium>
Anyway, we're arguing semantics at this point
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
xall has quit [Ping timeout: 268 seconds]
fullofcaffeine has joined #ruby
jaguarmagenta has joined #ruby
milardovich has quit [Remote host closed the connection]
djbkd_ has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
cajone has joined #ruby
nikivi_ has quit [Quit: irc]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
jamto11 has joined #ruby
Lord_of_Life has quit [Excess Flood]
Devalo has joined #ruby
Lord_of_Life has joined #ruby
h1fuelcell has joined #ruby
Pachonk has quit [Ping timeout: 258 seconds]
manjaro-kde5- has joined #ruby
h1fuelcell has quit [Remote host closed the connection]