<hightower3>
Is the answer to question "which class to use to store IP address" still "Socket::IPAddress"?
Ven` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<bew> Hmm yes probably
qard has joined #crystal-lang
hightower3 has quit [Ping timeout: 246 seconds]
qard has quit [Client Quit]
hightower3 has joined #crystal-lang
cremes has quit [Quit: cremes]
hightower3 has quit [Ping timeout: 240 seconds]
early has quit [Quit: Leaving]
LastWhisper____ has joined #crystal-lang
early has joined #crystal-lang
sz0 has joined #crystal-lang
cremes has joined #crystal-lang
<FromGitter>
<Dillybob1992> Hello o/
<FromGitter>
<Dillybob1992> had a dream about how to connect to the main master crystal server, with little game instance servers on different $5.00 VPSs. Not sure how to do this correctly, I could just listen on a different port, and accept incoming connections and "authenticate" the game instance server if it sends a right password. Or, should I use iptables and set inbound/outbound stuff to only receive from data from those game
<FromGitter>
... instance servers? If that makes sense
cremes has quit [Client Quit]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cptaffe>
Is there a way to get a JSON::Any into a type with JSON.mapping besides Foo.from_json(any.to_json)?
LastWhisper____ has joined #crystal-lang
LastWhisper____ has quit [Client Quit]
<cptaffe>
In Rust there's serde_json.from_value::<Foo>(value). Value is like JSON::Any
cremes has joined #crystal-lang
cremes has quit [Client Quit]
A124 has quit [Read error: No route to host]
A124 has joined #crystal-lang
cremes has joined #crystal-lang
sz0 has quit [Quit: Connection closed for inactivity]
duane has quit [Ping timeout: 246 seconds]
cremes has quit [Quit: cremes]
duane has joined #crystal-lang
duane has quit [Ping timeout: 264 seconds]
<FromGitter>
<bararchy> Is there a way to create PDF using crystal ?
<FromGitter>
<drujensen> this was listed on awesome crystal
<FromGitter>
<BenoitKH> Hi, can I please be unbanned from the crystal reddit. I didn't know the post history was going to be influenced by a moderator's decision
<FromGitter>
<xfbs> @mjago is `&.points` the equivalent of `&:points` in ruby?
<FromGitter>
<xfbs> @BenoitKH what was your username again?
<FromGitter>
<BenoitKH> It was a dumb router joke, I just joking around. My post history doesn't reflect how I treat other crystal redditors at all..
<FromGitter>
<BenoitKH> I am sorry
<FromGitter>
<xfbs> Ahh yeah, someone posted that here recently. Maybe search the chat history to find out which mod posted it and private message them?
tankfeeder has left #crystal-lang [#crystal-lang]
<FromGitter>
<yxhuvud> @xfbs: Yes, except it is chainable and takes arguments: [1,2,3].map &.**2.*(2) -> [2, 8, 18]
hightower3 has joined #crystal-lang
<Papierkorb>
That reddit ban was a overreaction in any case.
snsei_ has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
snsei_ has quit [Ping timeout: 276 seconds]
sz0 has joined #crystal-lang
moei has joined #crystal-lang
snsei has joined #crystal-lang
hightower3 has quit [Ping timeout: 246 seconds]
dragonkh has quit [Ping timeout: 265 seconds]
snsei has quit [Ping timeout: 276 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
<FromGitter>
<jwaldrip> Send feels SO wrong to me.
<FromGitter>
<faustinoaq> me too, but why not? 😅
dragonkh has joined #crystal-lang
<dragonkh>
hi - has anyone noticed that in specs - expect_raises(Exception, "some message") - if the message doesn't match the spec runner fails but says: Index out of bounds instead of saying that the message did not match the expected message. When the message is correct - the spec passes correctly
<dragonkh>
this makes it very hard to know why the spec has failed - because it does not explain that the expected message does not match the actual message - it just says Index out of bounds
<oprypin>
HolaCotoco, who did you get that message from? perhaps from a certain another reddit user?
<RX14>
its almost as if someone's trying to troll people...
<oprypin>
the "block subreddit" part doesnt add up to the "sent from another user" theory, but could be just entirely fake
<FromGitter>
<xfbs> @faustinoaq omg I just now saw that, it's kinda amazing!
<FromGitter>
<faustinoaq> 👍
<oprypin>
bluematt, I only now saw your previous example, and it does not qualify as something you're actually trying to do. primarily because you could just do the call directly
<oprypin>
i'm thinking more in terms of a high-level description (you started something about DSL) rather than a code example
greengriminal has quit [Quit: This computer has gone to sleep]
<FromGitter>
<PorkyFan> Hi o/
<livcd>
we should port a popular testing framework used in Rails and make 37 signals adopt it :)
<FromGitter>
<PorkyFan> Hi, I have a sort of a small problem not sure how to address it correctly
<FromGitter>
<xfbs> What's that?
<FromGitter>
<PorkyFan> My reddit account, it's been hacked I think but it won't let me post on the crystal sub anymore. I can't see any of the new link buttons
<oprypin>
i was gonna write "inb4" bbut i didnt
<oprypin>
anyhow. this is the fallout of banning 1 troll account
<FromGitter>
<PorkyFan> @oprypin What do you mean exactly?
<oprypin>
do you think creating 3 fresh github accounts and claiming that 3 different reddit accounts are banned somehow makes you plausible?
<FromGitter>
<bararchy> XD
<FromGitter>
<bararchy> Why do people troll, it's really wierd, seems like a huge waste of time
<FromGitter>
<bararchy> :shipit:
<livcd>
bararchy: i am going to your country next month :)
<FromGitter>
<xfbs> I was in @bararchy's country this month :)
<FromGitter>
<xfbs> Beat you to it! Hehe
<livcd>
ahh are you now penniless ?
<FromGitter>
<xfbs> Jesus. My friend and I flew there for $20 with nothing researched, booked or planned thinking it would be a cheap-ish country to do some backpacking.. oh boy was I wrong
<livcd>
are you insane ? :D
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<livcd>
it's the most expensive country i have visited
<FromGitter>
<xfbs> Amazing place tho, I'm sad we didn't make it to the dead sea tho, only Eilat, Tel Aviv and Jerusalem
LastWhisper____ has joined #crystal-lang
<FromGitter>
<xfbs> Yes it truly is. A bottle of wine for 30 sheckels?
<livcd>
i have been to TLV, Jerusalem and Haifa :)
<FromGitter>
<xfbs> There is one amazing place in Jerusalem where you can stay for $10 a night and get free dinner tho, that was kind of a life saver!
<FromGitter>
<xfbs> Where exactly is Haifa
<FromGitter>
<xfbs> *?
<livcd>
north of TLV
<livcd>
I have stayed at Abraham's
<FromGitter>
<PorkyFan> Not trolling
<livcd>
Israel is one of the weirdest countries I have visited. Feels like middle east but is not middle east.
<FromGitter>
<xfbs> Ahh a lot of people mentioned that the north is beautiful, I met a girl in TLV who went all the way up north to where you can hear there bombings in syria at night.
cremes has quit [Quit: cremes]
<FromGitter>
<xfbs> But yeah it's weird, you get a really safe, wester vibe in Israel
<livcd>
not sure what do you mean
<livcd>
I have not been to the US but it does not feel like Europe.
<livcd>
nothing like europe :)
<FromGitter>
<xfbs> Idk, I don't think it's super different from here in Europe
<FromGitter>
<ShriekBob> As a brit that moved to the USA, life in the USA feels mostly the same
<FromGitter>
<xfbs> Except for the massive amounts of hot chicks with big guns from the military ofc haha
<FromGitter>
<PorkyFan> "don't talk about politics" -- RX14
<FromGitter>
<ShriekBob> At the end of the day, you wake up, shower, eat, work, relax, and sleep. You live in a first world country, you have access to most of the same things.
<FromGitter>
<PorkyFan> better not bring up guns and the military!
<FromGitter>
<ShriekBob> A few things catch me out though. I have to remember that everyone here is weirdly religious. People own guns, and people watch Fox News...for reasons...
<FromGitter>
<xfbs> Yeah, plus I mean the presidents get slightly crazier in some countries compared to others.
<FromGitter>
<ShriekBob> Sure, US politics, to a European is an option between the extreme right, or the right of centre, while people call that right of centre group communists
<FromGitter>
<ShriekBob> to an outsider it's odd
<FromGitter>
<ShriekBob> but day to day is effectively the same
<RX14>
to clarify my position - politics is fine as long as it's not disrespectful
<FromGitter>
<PorkyFan> no
<FromGitter>
<PorkyFan> that's a lie
<FromGitter>
<xfbs> Well, I think you can get used to a lot. Hell I lived in SE asia for a few years and the routine is similar. It's a lot louder, smellier, dirtier in some places but depending on what you do, you'll probably end up living in a place with other english-speaking foreigners and you'll end up working in such a place as well
<FromGitter>
<PorkyFan> xfbs said something perfectly fine yesterday AFAIK, and you said "no politics"
<RX14>
I said <RX14> you know the answer so don't bring up politics
<RX14>
different context
<FromGitter>
<xfbs> I said what yesterday?
<RX14>
@PorkyFan it wasn't xfbs
<FromGitter>
<PorkyFan> he just doesn't want to talk about politics when it's something he disagrees with probably
<FromGitter>
<imonmyown> why are you guys discussing politics in a crystal channel. why politics of all things?
<RX14>
because off-topic is fine when there's nothing else going on
cremes has joined #crystal-lang
<FromGitter>
<ShriekBob> I wasn't discussing politics, I was commenting on what life was like in the US for a British ex-pat
<RX14>
at the end of the day I don't want to enforce any concrete rules on this channel
<RX14>
just use common sense please
<FromGitter>
<ShriekBob> Politics was a part of that, because it's a big part of the difference between those countries
<FromGitter>
<ShriekBob> ...and it's a point of eyebrow raising for me
<RX14>
indeed, and it was an intesesting discussion
<FromGitter>
<imonmyown> well, to make my position clear, I don't mind it
<RX14>
so nobody minds it - fine let's drop the moderation talk and carry on
<FromGitter>
<ShriekBob> So far I've lived in UK, Germany, and the USA, and politics, religion, and food have been the only noticeable day to day differences
cremes has quit [Client Quit]
<FromGitter>
<ShriekBob> and homelessness I guess
<FromGitter>
<xfbs> I think the general rule of thumb should be, if nobody minds we can talk politics — if someone minds, we have to stop. That okay for everyone?
<FromGitter>
<ShriekBob> I see a lot more homelessness in the USA, than the UK, and a lot less in Germany than the UK
<FromGitter>
<ShriekBob> sure
<FromGitter>
<xfbs> How do you think german food compares with the other places? I've never been in the US, but I hear it's cheaper there but people don't cook themselves so often?
<FromGitter>
<ShriekBob> I travel a *lot* with work
<FromGitter>
<ShriekBob> and my take on food is that you can think of it like error bars right.
<FromGitter>
<ShriekBob> the UK has big error bars, the bottom is really low, the high is really high
<FromGitter>
<ShriekBob> Germany that bottom is higher, and I think the top is lower
<FromGitter>
<ShriekBob> In the USA it's much the same, the lowest bar of quality is *much* higher than the UK
<FromGitter>
<ShriekBob> the highest bar is about hte same
<FromGitter>
<xfbs> You mean in terms of quality or price? I hear that London has the most amazing Indian food of Europe
<FromGitter>
<ShriekBob> I'm excluding fast food here, which is effectively the same everywhere
<FromGitter>
<ShriekBob> If you exclude fast food, the quality of food in the USA, on average, surpasses the quality of food I've eaten anywhere in the world in terms of flavor and value
<FromGitter>
<ShriekBob> You can go to Dennys and get a cheap burger that will blow any burger I had in Germany or the UK out of the water, and that's right down the bottom, it's only up from there
<FromGitter>
<ShriekBob> There are exceptions of course, you want the best curry, go to Birmingham in the UK. Want the best Sushi, go to Souel in SK, want your brain to fry from the foods heat, go to Ethiopia. Best bread? Germany, etc etc.
<FromGitter>
<ShriekBob> but in terms of just across the board value and flavor, walk into most any place in America and you'll get amazing food
<FromGitter>
<imonmyown> @ShriekBob I tend to disagree, my last trip to Arizona in terms of food was pretty lame
<FromGitter>
<ShriekBob> THat's a shame
<FromGitter>
<imonmyown> yeah
<FromGitter>
<imonmyown> was pretty long ago though
duane has joined #crystal-lang
<FromGitter>
<ShriekBob> The only bad food I've had in the US to date has been Indian
<FromGitter>
<ShriekBob> ...and honestly I think it's just because Chaat and Thali Indian isn't to my tastes
<FromGitter>
<Fryguy> you need to have Indian in parts of NJ :)
<FromGitter>
<Fryguy> The US is *really* big...there are pockets of good and bad all over the place
<FromGitter>
<xfbs> I honestly kinda think restaurants in germany suck. We're too accustomed to cooking ourselves. So it's not surprising that food elsewhere is much better
<FromGitter>
<Fryguy> though bigger cities tend to have concentrations of good
<FromGitter>
<xfbs> Ofc ofc :) we did the whole coast, Lisbon, Porto, all the way down south
greengriminal has joined #crystal-lang
greengriminal has quit [Read error: Connection reset by peer]
greengriminal has joined #crystal-lang
greengriminal has quit [Read error: Connection reset by peer]
greengriminal has joined #crystal-lang
greengriminal has quit [Read error: Connection reset by peer]
greengriminal has joined #crystal-lang
greengriminal has quit [Read error: Connection reset by peer]
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
greengriminal has joined #crystal-lang
greengriminal has quit [Read error: Connection reset by peer]
greengriminal has joined #crystal-lang
greengriminal has quit [Read error: Connection reset by peer]
greengriminal has joined #crystal-lang
<FromGitter>
<watzon> It's upsetting me that amoeba isn't spelled right lol
<FromGitter>
<watzon> That's a pretty cool project though
alex`` has joined #crystal-lang
yoru has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
<livcd>
watzon: maybe it's spelled right in that guy's language :)
<FromGitter>
<gabrielrios> yeah, its right in Portuguese 😏
<FromGitter>
<watzon> Haha, well that works I guess. I've never had to use amoeba in Portuguese. I didn't realize it was spelled differently
<livcd>
cant believe my mac is 5 years old
<livcd>
2013 and it still feels new and performant
<FromGitter>
<xfbs> I still have a mac mini from 2009 or so flying around.. been thinking about resurrecting it, I mean it's a good machine for development
<FromGitter>
<xfbs> Plus it does have much more space than my Air with it's tiny SSD
<livcd>
sadly i would rather buy an external ssd than a mac with bigger disk :S
<FromGitter>
<xfbs> I'm with you on that one but how inconvenient is it to carry an external SSD? But I did invest in a little SD card that sits flush in the Air and gives me 128GB (which means it doubles my total capacity *sobs*)
<livcd>
yeah but i found out my mac mostly sits on my desk anyway :D
<FromGitter>
<xfbs> You don't take it with you to work? or something
<livcd>
nope i have a thinkpad at work :)
<FromGitter>
<xfbs> Ahh okay gotcha
baweaver_away is now known as baweaver
<livcd>
Windows is much better these days and I got used to it. I even switched to powershell on osx
<livcd>
so i can imagine myself buying a desktop when this mac dies
<FromGitter>
<xfbs> Wait a minute, powershell on OS X is a thing?
duane has quit [Ping timeout: 240 seconds]
<FromGitter>
<xfbs> Omg that's the first time I hear it's not windows-only and that people actually use it
<livcd>
it's very nice :)
duane has joined #crystal-lang
<FromGitter>
<xfbs> How? I mean, I know a little bit about it, it kind of expands on the text streams of consoles but instead streams objects or something. How does it compare to bash/zsh/..?
greengriminal has joined #crystal-lang
<livcd>
Sorry need to step away for today
<livcd>
ttyl
yoru has quit [Quit: Lost terminal]
qard has joined #crystal-lang
<FromGitter>
<imonmyown> I was considering selling my 2013 21.5" imac with 1Tb Fusion drive, 16Gb of Ram... and getting a macbook air for the money i get
<FromGitter>
<ShriekBob> I recently sold mine and went back to Windows 10, Apple still don't take the games industry seriously sadly
cremes has joined #crystal-lang
<FromGitter>
<imonmyown> I do not consider windows (yet), writing from a linux notebook (iMac got downgraded to Maverix and it has like no software in the store I need)
<FromGitter>
<imonmyown> had a glitch with fusion drive with the last update, so had to take it to service
<RX14>
@codenoid it's generated from the crystal source code
<RX14>
My laptop has 180gb of storage and that's enough for linux
<RX14>
I even have a 50gb windows VM on there
<RX14>
so it's more like 110gb and I have 25gb free
<FromGitter>
<imonmyown> yeah linux ftw
<FromGitter>
<imonmyown> I have a very smooth and pleasant experience with my manjaro
<RX14>
I got a "cheap" thinkpad with only an i5-7200U and 16gb ram and I honestly don't notice any difference from my desktop
<RX14>
it's amazing that such a small and light laptop can get such performance
<RX14>
It's running 3 monitors right now no problem
<RX14>
all 3 are >=1080p
hightower3 has joined #crystal-lang
<FromGitter>
<ShriekBob> I tried Linux, but it seems like it's kinda a crap shoot whether a given laptop works with it or not, which is a shame, otherwise I'd just dual boot and run linux most of the time
<RX14>
I honestly haven't had hardware issues with linux
<RX14>
except for a few buggy USB peripheral drivers it's all been working out of the box
<RX14>
and as I said, thinkpads usually work 100%
<RX14>
because they're cool
<FromGitter>
<codenoid> i had hardware issue (fan processor) when using mac 2011 and snsv computer, but never got that with thinkpad
<RX14>
no that's correct @codenoid
<RX14>
it writes a file (to demonstrate the file is writable, because you *just* wrote it)
<RX14>
then explains that writable is true
<RX14>
which is as expected
<FromGitter>
<codenoid> wat, i think "let we check is path is writable, if true, Write file"
<RX14>
that's how it's used
<RX14>
but this isn't meant to show you a code snippet to paste into your code
<RX14>
this is an explanitory snippet to show you how it works
<RX14>
we don't need to do anything with the result of writable because the only purpouse of the result is to show the reader
<FromGitter>
<codenoid> okay,
<FromGitter>
<codenoid> there is "# => true"
<FromGitter>
<codenoid> yeah, i mean "if `file.writable?` below it, then `file.writable?` does not display its usefulness" (but there are "# => true") 👍
<FromGitter>
<watzon> Easiest way to check if an Int is between two other Ints? Ruby has a `Integer.between?` method
<FromGitter>
<watzon> I guess `Range.includes?`
<RX14>
or just
<RX14>
if lower <= x <= upper @watzon
<RX14>
it's super easy to read
<RX14>
and it's super clear what's inclusive or not
<FromGitter>
<xfbs> @RX14 how does `if lower <= x <= upper` work tho?