banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weird_error has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
weird_error has quit [Client Quit]
banisterfiend has joined #ruby
i9zO5AP is now known as Ai9zO5AP
fphilipe has quit [Ping timeout: 246 seconds]
Swyper has quit [Remote host closed the connection]
kyrylo has joined #ruby
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
xco has quit [Quit: xco]
dviola has quit [Quit: WeeChat 2.6]
GodFather has quit [Ping timeout: 240 seconds]
codefriar has joined #ruby
etupat has quit [Remote host closed the connection]
greengriminal has quit [Quit: This computer has gone to sleep]
etupat has joined #ruby
fphilipe has joined #ruby
bambanx has quit [Quit: Leaving]
jrafanie has joined #ruby
tpanarch1st_ has joined #ruby
beanie__ has quit [Ping timeout: 240 seconds]
involans has joined #ruby
arandomandy has quit [Quit: leaving]
tdy1 has joined #ruby
greengriminal has joined #ruby
drincruz_ has joined #ruby
involans has quit [Read error: Connection reset by peer]
involans has joined #ruby
codefriar has quit [Ping timeout: 240 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
codefriar has joined #ruby
fphilipe has quit [Ping timeout: 276 seconds]
involans has quit [Ping timeout: 240 seconds]
Swyper has joined #ruby
involans has joined #ruby
TiglatePileser has joined #ruby
<Swyper>
so to put if word.index(fragment) == 0 into words
<Swyper>
it search "word" to see if fragement is apart of it, starting from indice 0 ?
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leftylink>
the sentence is ambiguous, with one possible interpretation matching the code, and one possible interpretation not matching the code. perhaps it would be better to phrase it without thinking about indices.
<leftylink>
also, error-correction was applied when interpreting the sentence (apart, indice)
cyclonis has quit [Read error: Connection reset by peer]
TiglatePileser has left #ruby [#ruby]
chalkmonster has quit [Quit: WeeChat 2.6]
Ai9zO5AP has quit [Quit: WeeChat 2.5]
greengriminal has quit [Quit: This computer has gone to sleep]
Swyper has quit [Remote host closed the connection]
cyclonis has joined #ruby
tsrtiv^ has quit []
codefriar has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
shortdudey123 has quit [Ping timeout: 245 seconds]
Swyper has quit [Remote host closed the connection]
jenrzzz has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
shortdudey123 has joined #ruby
freedom has joined #ruby
banisterfiend has joined #ruby
freedom is now known as gnufr33d0m
dasher00 has quit [Ping timeout: 265 seconds]
shortdudey123 has quit [Ping timeout: 245 seconds]
shortdudey123 has joined #ruby
etupat has quit [Remote host closed the connection]
shortdudey123 has quit [Excess Flood]
etupat has joined #ruby
shortdudey123 has joined #ruby
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
Swyper has joined #ruby
_whitelogger has joined #ruby
elphe has joined #ruby
involans has quit [Ping timeout: 240 seconds]
Esa_ has quit []
elphe has quit [Ping timeout: 240 seconds]
Swyper has quit [Remote host closed the connection]
ogres has quit [Quit: Connection closed for inactivity]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe has joined #ruby
conta1 has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mrexox7 has joined #ruby
Intelo has joined #ruby
nowhereman has joined #ruby
nowhere_man has quit [Ping timeout: 276 seconds]
rbanffy has joined #ruby
rbanffy has quit [Client Quit]
rbanffy has joined #ruby
DTZUZO has quit [Ping timeout: 265 seconds]
kyrylo has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
vondruch has quit [Quit: vondruch]
BH23 has joined #ruby
_joes_ has joined #ruby
matheusmoreira has joined #ruby
conta1 has quit [Ping timeout: 265 seconds]
_joes_ has quit [Ping timeout: 240 seconds]
BH23 has quit [Ping timeout: 265 seconds]
x86sk has quit [Quit: Updating details, brb]
x86sk has joined #ruby
tvl has joined #ruby
tvl is now known as tobiasvl
schne1der has joined #ruby
vondruch has joined #ruby
CrazyEddy has joined #ruby
WhatsGoingOn has quit [Remote host closed the connection]
blackmesa1 has quit [Ping timeout: 246 seconds]
cgfbee has quit [Remote host closed the connection]
NL3limin4t0r_afk is now known as NL3limin4t0r
cgfbee has joined #ruby
Intelo has quit [Read error: Connection reset by peer]
fphilipe has quit [Read error: Connection reset by peer]
Intelo has joined #ruby
fphilipe has joined #ruby
mikecmpbll has joined #ruby
Intelo_ has joined #ruby
mrexox7 has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
Intelo has quit [Ping timeout: 276 seconds]
Intelo_ has quit [Ping timeout: 265 seconds]
Intelo_ has joined #ruby
fig-le-deunch has joined #ruby
aef has joined #ruby
_joes_ has joined #ruby
TomyWork has joined #ruby
etupat has joined #ruby
fphilipe has quit [Read error: Connection reset by peer]
fphilipe_ has joined #ruby
etupat has quit [Ping timeout: 265 seconds]
elphe has quit [Ping timeout: 240 seconds]
thexa4 has joined #ruby
Intelo_ has quit [Ping timeout: 268 seconds]
fphilipe_ has quit [Ping timeout: 240 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Inline has joined #ruby
BH23 has joined #ruby
za1b1tsu has joined #ruby
blackmesa1 has joined #ruby
fphilipe_ has joined #ruby
tdy1 has joined #ruby
fig-le-deunch has quit [Quit: Konversation terminated!]
dbugger has joined #ruby
ss942 has joined #ruby
<ss942>
Hello what editors/IDE do you recomend for linux user, to code both RoR and Ruby?
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phaul>
that depends so much on your personal preferences, but these are all fine: rubymine, vim, emacs, textmate, sublime text etc
<phaul>
they are all comletely different too
<phaul>
rubymine is a full blown comercial ide, but after some evaluation period you have to pay for it
<ss942>
phaul: I'm thinking about one with GUI. But in other hand I just left job, and in this very moment I want to build portfolio, demos, and learn as much as possible.
<ss942>
Maybe it's time to learn vim after ten years of :quit
<ss942>
phaul: thanks
<phaul>
maybe try them all for a few days
andikr has joined #ruby
Ai9zO5AP has joined #ruby
_joes_ has quit [Quit: _joes_]
BH23 has quit [Remote host closed the connection]
BH23 has joined #ruby
_joes_ has joined #ruby
dasher00 has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
tdy1 has quit [Ping timeout: 252 seconds]
elphe has joined #ruby
ellcs has joined #ruby
bruce_lee has joined #ruby
Intelo_ has joined #ruby
Intelo_ has quit [Ping timeout: 240 seconds]
fphilipe_ has quit [Read error: Connection reset by peer]
fphilipe_ has joined #ruby
_joes_ has quit [Quit: _joes_]
x86sk has quit [Quit: Connection closed for inactivity]
wget has quit [Quit: kill -3 wget]
_mossplix has joined #ruby
wget has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
_mossplix has quit [Remote host closed the connection]
rippa has joined #ruby
postmodern has quit [Quit: Leaving]
_mossplix has joined #ruby
_mossplix has quit [Ping timeout: 245 seconds]
cyclonis has quit [Quit: -a- IRC for Android 2.1.55]
fphilipe_ has quit [Read error: Connection reset by peer]
Intelo_ has joined #ruby
Esa_ has joined #ruby
_mossplix has joined #ruby
cyclonis has joined #ruby
fphilipe_ has joined #ruby
bitwinery has quit [Quit: Leaving]
zapata has quit [Quit: WeeChat 2.5]
<jhass>
phaul: al2o3-cr yeah the sandbox has the minimum of environment variables set (https://carc.in/#/r/7o1n) and ruby is still defaulting its file encoding to ASCII instead of UTF-8 with a blank locale -.-. Simplest solution would be magic comment https://carc.in/#/r/7o1k but I can look if setting the locale is too hard with the next update
cyclonis_ has joined #ruby
cyclonis_ has quit [Max SendQ exceeded]
<phaul>
hi jhass, it's not too hard, in fact the template now has al2o3-cr's solution Encoding.default_external = 'utf-8' but I think removing boilerplate like these from these demonstration code snippets is better because it might confuse ppl why it's there. We use this to give code snippets to begginers, and don't want to always explain to ignore those bits
<jhass>
the sandbox I use is no longer maintained, so I need to redo the entire thing at some point anyway, been putting that off for a while... but yeah so hesistant to touch too much while it's running :P
cyclonis has quit [Ping timeout: 245 seconds]
thexa4 has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<jhass>
it doesn't have an option for setting additional env vars, so would have to wrap everything into /usr/bin/env inside the sandbox I guess :/
blackmesa1 has quit [Ping timeout: 246 seconds]
<phaul>
I see. well, there is no rush, it works for most cases anyways as it is now
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
gregf_ has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
kyrylo has joined #ruby
nowhereman has quit [Ping timeout: 276 seconds]
fig-le-deunch has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
blackmesa1 has joined #ruby
stan has quit [Remote host closed the connection]
DTZUZO has joined #ruby
Inline__ has joined #ruby
cyclonis has joined #ruby
Inline has quit [Ping timeout: 264 seconds]
GodFather has joined #ruby
gregf_ has quit [Remote host closed the connection]
fig-le-deunch has quit [Quit: Konversation terminated!]
<al2o3-cr>
jhass, phaul didn't even think of the magic comment last night. that's the way to go for now :)
<phaul>
I had the magic on the gist I did, but I just followed you advice with the template :)
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
<phaul>
changed all templates to have # Encoding: utf-8 hopefully I haven't messed it up
<al2o3-cr>
ah, so default_external is still binary
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
codefriar has quit [Ping timeout: 268 seconds]
<jhass>
xco: I'd say split on "\n\n" then split into lines, first is name, second is address, for the remaining lines split on ": ", map [0] to your yaml key and use [1] as the value
jcalla has joined #ruby
chalkmonster has joined #ruby
_Tristan_ has joined #ruby
bruce_lee has quit [Ping timeout: 268 seconds]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
greengriminal has quit [Quit: This computer has gone to sleep]
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 246 seconds]
vondruch_ is now known as vondruch
andikr has quit [Ping timeout: 240 seconds]
john2496 has joined #ruby
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
drincruz_ has joined #ruby
<Cork>
is it possible to "expand" a hash onto method keywords?
<phaul>
what is a method keyword? can you give an example?
<Cork>
def test(first_name:, last_name:); end
etupat has quit [Ping timeout: 240 seconds]
donofrio has joined #ruby
<Cork>
named arguments is another name for it
<phaul>
aha keyword arguments
<Cork>
ya
<Cork>
and if i have {first_name: "something", last_name: "else"}
<Cork>
can i map the keys without having to be explicit?
<rubydoc>
stderr: -e:4:in `x': unknown keyword: bar (ArgumentError)... check link for more (https://carc.in/#/r/7o3b)
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
<Cork>
gah...
<Cork>
i forgot to name one of the arguments -_-'
<Cork>
thx for the help
<phaul>
np
andikr has joined #ruby
<xco>
jhass: thanks :). I was thinking of using IO.readlines for this. Is there a better way then IO.readlines?
_mossplix has quit [Remote host closed the connection]
cyclonis has joined #ruby
GodFather has joined #ruby
_mossplix has joined #ruby
etupat has joined #ruby
<jhass>
xco: how big is the source file? if it's small (<= 10M) it might be more convenient to read the file entirely into memory so you can split on "\n\n"
MrCrackPot has quit [Remote host closed the connection]
MrCrackPot has joined #ruby
<xco>
jhass: just 20,000 lines
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
schne1der has joined #ruby
etupat has quit [Remote host closed the connection]
<NL3limin4t0r>
xco: Something like this might do the job, it doesn't load the entire text file at once, but does need to hold the entire object to be converted to yaml.
<xco>
NL3limin4t0r: :D was writing my own version slowly. i’m going to steal a few ideas from y ours. but first let me test it on the real data see what comes out of it! :D
etupat has joined #ruby
codefriar has joined #ruby
<xco>
NL3limin4t0r: thanks for the effort btw… :) checking it out
<NL3limin4t0r>
xco: np, hope the code is understandable
<xco>
NL3limin4t0r: i understand everything is far is the language is concerned. but your thought process is very different and that’s what i’m trying to undersatnd
cd has joined #ruby
<xco>
NL3limin4t0r: lab.rb:18:in `delete_at': no implicit conversion from nil to integer (TypeError)
<xco>
lab.rb is the file i’m storing your code in
<NL3limin4t0r>
Oops, that should be `if`, not `unless`.
<xco>
right. fixed that :)
etupat has quit [Remote host closed the connection]
tpanarch1st_ has joined #ruby
etupat has joined #ruby
<NL3limin4t0r>
What was your thought process if I may ask?
etupat has quit [Ping timeout: 240 seconds]
<xco>
brb
etupat has joined #ruby
brool has joined #ruby
<xco>
NL3limin4t0r: first of all I don’t know why you set the “prefixes” variable, then did the transformation on them, that bit is not needed i think
chalkmonster has quit [Quit: WeeChat 2.6]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
joaumg has quit [Quit: WeeChat 1.6]
<NL3limin4t0r>
xco: Yeah, you can skipt that assignment if you want. I mostly set it to keep the code readable/understandable. You could simply do `regexes = {...}.transform_values{...}`.
chalkmonster has joined #ruby
<xco>
NL3limin4t0r: it’s misassigning keys and values. example. it’s assigning website values to fax values :D
<xco>
al2o3-cr: please give me some time to check that later and give some comments :P it looks suspiciously simple :D :D
<al2o3-cr>
sure, np
<xco>
NL3limin4t0r: i think i may be wrong with the misassignment issue. this is perfect so far. i thought i was sure i saw a misassigment!
drincruz_ has quit [Ping timeout: 268 seconds]
blackmesa1 has quit [Ping timeout: 250 seconds]
<NL3limin4t0r>
The attempt of al2o3-cr is indeed pretty simple, but it assumes the order of %i(name address tel fax email website), which might be the case. It also has yet to remove the prefix from the tel. email etc lines.
GodFather has quit [Ping timeout: 245 seconds]
<xco>
NL3limin4t0r: I agree. On a quick look it looks nice… I’ll try to do some speed comparisons on these two actually
<NL3limin4t0r>
But #zip is the simpler solution if the data is always structured at the same positions.
hightower2 has joined #ruby
<xco>
data is always structured like that
fphilipe_ has quit [Read error: Connection reset by peer]
BH23 has quit [Ping timeout: 268 seconds]
<NL3limin4t0r>
xco: Lets say that you have a similar record to that of James Bonde, with the one difference that the phone number is missing. Is "Tel.:" still present with an empty value? Or is it absent and is the other data shifted up?
<NL3limin4t0r>
If it is still present #zip will work, if the other values shift #zip will not work.
<xco>
yeah you’re right
<xco>
i’ll have to test that too
banisterfiend has joined #ruby
banisterfiend has quit [Changing host]
banisterfiend has joined #ruby
blackmesa1 has joined #ruby
<NL3limin4t0r>
Similarly, my code does assume the first two lines to be name, followed by address. If the address line can be ommited you've got a similar problem.
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
etupat has quit [Remote host closed the connection]
Intelo__ has quit [Remote host closed the connection]
etupat has joined #ruby
drincruz has joined #ruby
etupat has quit [Ping timeout: 240 seconds]
john2496 has quit [Remote host closed the connection]
john2496 has joined #ruby
etupat has joined #ruby
_mossplix has quit [Remote host closed the connection]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_mossplix has quit [Ping timeout: 276 seconds]
ellcs has quit [Ping timeout: 240 seconds]
ellcs has joined #ruby
blackmesa1 has quit [Ping timeout: 246 seconds]
bhaak has quit [Ping timeout: 246 seconds]
MrCrackPotBuilde has joined #ruby
bhaak has joined #ruby
mikecmpbll has joined #ruby
MrCrackPot has quit [Ping timeout: 265 seconds]
<mjacob>
what can i use as a replacement for deriving from Struct.new that allows me to specify another superclass and doesn't fill missing arguments to the constructor with nil?
Technodrome has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chalkmonster has quit [Ping timeout: 268 seconds]
chalkmonster has joined #ruby
<havenwood>
mjacob: Do you want mandatory arguments or a different default?
<mjacob>
havenwood: in all my current cases where i want to replace Struct.new, i only want mandatory arguments
<mjacob>
havenwood: but if a use case for a different default comes up in the future, it would be nice to continue to use the same way of defining "data classes"
tdy1 has joined #ruby
<havenwood>
mjacob: Point = Struct.new(:x, :y, keyword_init: true) { def initialize(x:, y:); super end }
<havenwood>
mjacob: Point.new #!> ArgumentError: missing keywords: x, y
<havenwood>
mjacob: Alternatively, you can just use a Class straight up.
<havenwood>
mjacob: Is that what you meant?
<mjacob>
havenwood: i think that repeating the name of the attribute in the initializer makes half of the point of using Struct obsolete.
<mjacob>
havenwood: if i do that, it's right that i could just define the class myself.
<mjacob>
havenwood: but i know that ruby is good at metaprogramming, so i assumed that there is something better that can be used instead.
<havenwood>
mjacob: You can use arguments instead of keyword arguments with either a Struct or a Class. I just showed keywords because I generally prefer entangling by name rather than position.
<havenwood>
I find the verbosity pays off for readability.
gnufr33d0m has quit [Quit: gnufr33d0m]
cyclonis has quit [Read error: Connection reset by peer]
cyclonis_ has joined #ruby
cyclonis_ has quit [Max SendQ exceeded]
tdy1 has quit [Ping timeout: 240 seconds]
HyperTables has quit [Ping timeout: 260 seconds]
jrafanie has joined #ruby
cyclonis has joined #ruby
wildtrees has joined #ruby
BH23 has joined #ruby
jidar has quit [Read error: Connection reset by peer]
edwardly has quit [Read error: Connection reset by peer]
jidar has joined #ruby
edwardly has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
gray_-_wolf has quit [Quit: WeeChat 2.5]
ramfjord has joined #ruby
greengriminal has joined #ruby
gray_-_wolf has joined #ruby
tsujp_ has joined #ruby
tsujp has quit [Ping timeout: 240 seconds]
conta2 has quit [Quit: conta2]
blackmesa1 has joined #ruby
andikr has quit [Remote host closed the connection]
Guest56543 has quit [Remote host closed the connection]
tdy1 has joined #ruby
tdy1 has quit [Read error: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac]
etupat has quit [Remote host closed the connection]
tdy1 has joined #ruby
etupat has joined #ruby
tdy1 has quit [Read error: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac]
ramfjord has quit [Ping timeout: 240 seconds]
etupat has quit [Ping timeout: 245 seconds]
SeepingN has joined #ruby
tdy1 has joined #ruby
kabads has quit [Read error: Connection reset by peer]
etupat has joined #ruby
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
etupat has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
BH23 has quit [Ping timeout: 240 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch1 has quit [Ping timeout: 252 seconds]
BH23 has joined #ruby
john2496 has quit [Read error: Connection reset by peer]
john2496 has joined #ruby
Ven`` has joined #ruby
hutch1 has joined #ruby
cliluw has joined #ruby
troulouliou_div2 has joined #ruby
ss942 has quit [Quit: Leaving.]
<bougyman>
anyone have a parquet library that works?
<bougyman>
i'm having build problems with red-arrow
poontangmessiah has quit [Ping timeout: 245 seconds]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki has quit [Ping timeout: 245 seconds]
thexa4 has quit [Ping timeout: 245 seconds]
tdy1 has quit [Ping timeout: 276 seconds]
greengriminal has joined #ruby
Freshnuts has joined #ruby
banisterfiend has joined #ruby
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
etupat has quit [Ping timeout: 245 seconds]
cow[moo] has joined #ruby
impermanence has quit [Remote host closed the connection]
drincruz has quit [Ping timeout: 265 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
Flyingdog has quit [Quit: Leaving]
_mossplix has joined #ruby
dbugger has quit [Quit: Leaving]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
etupat has joined #ruby
x86sk has joined #ruby
i9zO5AP has joined #ruby
Ai9zO5AP has quit [Ping timeout: 265 seconds]
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
mynameisdebian has joined #ruby
<mynameisdebian>
Does anyone here have experience using Google APIs? I'm trying to use any method to download a file as CSV that was created in Google Sheets.
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
tdy1 has joined #ruby
<havenwood>
mynameisdebian: running into trouble?
kyrylo has joined #ruby
<mynameisdebian>
havenwood: Yes, I'm using this code after running the Quickstart script provided by Google: https://pastebin.com/b1gmgZw3
<mynameisdebian>
Ruby[bot] is telling me to use Gist, so I gotta go find my Github credentials. No wait, old password is too simple, gotta do a password reset. Check e-mail... Lot of work just to paste something