ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.24.2 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
<Vexatos> so uh, this is just a container for classes?
<RX14> Vexatos, it's a component system
<RX14> from ECS
<RX14> basically
<RX14> and yeah due to being compiled, it has to be that complex
<RX14> well the `crystal_typ_id` stuff is BS restrictions to using class as a generic
<Vexatos> that code errors according to carc.in .-.
<RX14> when `Class` is really just an integer
<RX14> Vexatos, the latter one does because thats intended
<Vexatos> is the "class" specific to the type?
<RX14> when I use a `record` which is a struct
<Vexatos> If so, couldn't you just use the type name?
<RX14> the second to last one
<RX14> works fine
<Vexatos> or, the type object
<Vexatos> if crystal has one
<RX14> Vexatos, the class is just getClass
<RX14> in java
<Vexatos> oh
<RX14> .class == .getClass()
<RX14> almost exactly
<RX14> minus reflection
<FromGitter> <girng> what's a good way to create a global namespace for an `Items` namedtuple (or hash, doesn't matter). It will be loaded from a JSON file ((https://i.gyazo.com/59484a3488e6ba7af52c8b2ce003e350.png)) and i want to use it a a global namespace (access Items) anywhere in code.
<FromGitter> <Sija> I’m not sure though if I grok `raise … unless sizeof(typeof(component)) == sizeof(Void*)` correctly
<oprypin> OMG the encoding
<FromGitter> <Sija> @gring plz, don’t use gitter edit/delete message features since some ppl here are using IRC bridge which doesn’t handle that at all - resulting in spamming the channel...
<FromGitter> <girng> sorry
<FromGitter> <girng> i couldn't link it correctly was testing
<FromGitter> <Sija> i’m fine, tell that to @oprypin & others ;)
<FromGitter> <girng> @opyrpin: i'm sorry
<FromGitter> <girng> ok so basically. here is my data format from mysql (https://i.gyazo.com/59484a3488e6ba7af52c8b2ce003e350.png). i want to create a global namespace called "Items" that is either a Hash or NamedTuple that stores all the items and i can access them by key, anywhere in my code. for example: Items[:5], or Items["5"].name, etc.
<RX14> @Sija that's just a super duper check that we're not going to cause segfaults
<RX14> it'll *always* be true
<RX14> but it's a second layer of defence against compiler bugs
<RX14> or more likely: my bugs
<RX14> in implemening that class
<FromGitter> <Sija> @girng https://carc.in/#/r/3vhv
<FromGitter> <girng> @Sija you can pass `. (key)` and argument? looks like sorcery
<FromGitter> <girng> that's coool!!
<FromGitter> <Sija> yup, Crystal *is* cool ;)
<FromGitter> <girng> so u can pass a string or int and it still works? no need to definte "name : String | Int32"?
<FromGitter> <Sija> nope, dynamic inference solves it for you (if it can)
<FromGitter> <girng> ic
<FromGitter> <girng> crystal is so much easier to work with compared to nodejs
<FromGitter> <girng> especially syntax wise, code looks so much more easier to read and comprehend
<FromGitter> <j8r> Btw JavaScript has improved this ladr years, but has a wrong tendance for spaghetti code :-/
<FromGitter> <j8r> B
<FromGitter> <girng> i don't like callback waterfalls with a ton of promises. my old gmaeserver had code TONS OF THIS. however, now, it seems like await was implemented, and solves that issue. however it's too late
<FromGitter> <girng> i'm already 100% committed to crysal i'm not moving back
That_Guy_Anon1 has joined #crystal-lang
That_Guy_Anon has quit [Ping timeout: 265 seconds]
<FromGitter> <girng> i have a programming question
<FromGitter> <girng> programming concept question (might not be related to crystal), is it ok to ask?
<FromGitter> <bew> Don't ask to ask, just ask :P
<FromGitter> <girng> ok just making sure someone online =]
<FromGitter> <bew> You can just ask, and "one day" someone may answer to the actual question
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
<FromGitter> <girng> so basically: i'm trying to manage how to do a skill tree programmatically. for example: https://i.gyazo.com/e1d9e0dd644ef4f70673e24174075533.png ⏎ in the Godot game engine, it's easy to make it in the UI, but to do server-side functionality is hard for me, i'm not sure what's the best way of doing it. ⏎ ⏎ i'm assuming, I need to create an array of hashes, and in each hash have a key called "dependants"
<FromGitter> ... which is an array, that stores the skill_ids of the nodes next to it (so when a user trys to activate a node, i need to check that dependent list to make sure that player has those skill_ids? [https://gitter.im/crystal-lang/crystal?at=5ad2bf98109bb04332c32d23]
<FromGitter> <girng> Another issue I found is on the orange skill node: https://i.gyazo.com/b1d2bee103b6507286976eaed654c5c9.png ⏎ It has one on top and one below it that are connected. HOWEVER, it only needs one of those nodes to be a dependent (not both), for it to be activated. It's an edge case, and am not sure how to check for those
<FromGitter> <watzon> Sorry, I've been gone for a bit ⏎ @aisrael in regards to this ⏎ ⏎ > @watzon Am trying to use your extensions. Added `github: watzon/extensions` to my dependencies but if I just try to go `hash.map_keys {...}` I get `undefined method 'map_keys' for Hash`. ⏎ > I had to go `require "extensions/core/hash"` for it to work. ... [https://gitter.im/crystal-lang/crystal?at=5ad2c288270d7d3708cad5a5]
pabs has joined #crystal-lang
<FromGitter> <bararchy> @girng maybe Groogy can help, he's a game dev
<FromGitter> <girng> ok cool. yeah, it's basically a web tree. similar to final fantasy's just not sure how to programmatically do it
duane has quit [Ping timeout: 240 seconds]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
That_Guy_Anon1 has quit [Quit: Leaving]
That_Guy_Anon has joined #crystal-lang
sz0 has joined #crystal-lang
<FromGitter> <bararchy> Why don't you do the skills in a diabolo/WoW style ? As in descending format
<FromGitter> <bararchy> Or do you specifically want something more elaborate
<FromGitter> <girng> @bararchy let me apologize. it's a passive tree, not skill tree. i misspoke
<FromGitter> <girng> im going to use path of exile's skill gem system, but for passive tree i want a web tree
<FromGitter> <bararchy> Why not have them both at the same tree, just indicate which are active/passive , it sounds kinda complicated for the player to go between two trees
<FromGitter> <bararchy> Though, I didn't look at path of exiles gem skill system , so maybe I'm off target
<FromGitter> <bararchy> I'll take a look
<FromGitter> <girng> well, skill gem system is just items you can put into gear to give you the power of that skill. passive tree is the web
<FromGitter> <girng> i meant to say passive_id, not skill_id. i totally confused you im sorry
<FromGitter> <girng> @bararchy here is an interactive example: https://poeplanner.com/
<FromGitter> <girng> obviously mine is not going to be that big. however, u get the idea. basically linked nodes
<FromGitter> <bararchy> @girng all good, I just looked at the system on wikipedia and it seems that I was wrong in assuming two trees :) I'm really excited to try out your game
<FromGitter> <bararchy> Maybe you can use something like what we did for our neural network, basically a "link" class that takes a "node" class and link it to another "node" class
<FromGitter> <girng> that sounds it
<FromGitter> <girng> that sounds like it*
<FromGitter> <girng> so it's like a link class, that has a node property that stores the linked nodes?
<FromGitter> <bararchy> we did a Synapse class, that take .new(Neuron, Neuron) and has inside a `from: Neuron` and `to: Neuron` logic
<FromGitter> <bararchy> Yeha, thogu each class is unique , so you don't really need an id
<FromGitter> <bararchy> But you can use it for external data storage etc..
<FromGitter> <bararchy> We just used uuid
<FromGitter> <bararchy> @girng does direction matters in your usecase?
<FromGitter> <girng> yes, but it depends on the adjacent nodes whether they are active or not
<FromGitter> <girng> for example, if you see the orange dot in my screenshot above. if you are coming from the top, you don't need the node below it to be active
<FromGitter> <girng> but, you can also come from the bottom too. that's where i get stuck iuno howt program that
<FromGitter> <girng> or should i say "how to check for edge cases like that"
<FromGitter> <bararchy> @girng when I do big projects I would avoid edge cases until the overall scaffolds are in place, and then I'll do circles around the code until all parts are usable , then start working on edge cases, I saw a lot of people say "oh I wasted 10 hours on this ..." And after a few days drop the problematic part because they found out a better way to do x
<FromGitter> <girng> good idea. i'll work on other stuff come back to it l8er
alex`` has joined #crystal-lang
<FromGitter> <girng> `Digest::SHA1.hexdigest` is a life savor!!
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <LWFlouisa> Ah so that does work, that answers my question!
<FromGitter> <LWFlouisa> While compatibility isn't the goal, its pleasantly surprising how much is.
<FromGitter> <girng> LOL
<FromGitter> <LWFlouisa> Wouldn't need an edge case, to be executed on the scaffold?
<FromGitter> <LWFlouisa> How does this place support github "flavored" markdown? Never used markdown.
<FromGitter> <bararchy> 3 X "`" ⏎ code ⏎ 3 X "`"
<FromGitter> <bararchy> damn
<FromGitter> <bararchy> this: `
<FromGitter> <bararchy> 3 x ` before and after text
<FromGitter> <LWFlouisa> Ah ok cool.
<FromGitter> <bararchy> ```Then code is Formatted.yey!```
<FromGitter> <LWFlouisa> 3x "So like this?" 3x
<FromGitter> <LWFlouisa> Apparently not.
<FromGitter> <LWFlouisa> """ Apparently not """
<FromGitter> <bararchy> this: `
<FromGitter> <bararchy> a tick
<FromGitter> <bararchy> like github
<FromGitter> <LWFlouisa> 3x `Like github` 3x
<FromGitter> <bararchy> you dont need the 3x
<FromGitter> <LWFlouisa> `Ah like this?`
<FromGitter> <bararchy> it was to indicate that 3 times the `
<FromGitter> <bararchy> yeha :)
<FromGitter> <LWFlouisa> Spam spam spam, the tick marks.
<FromGitter> <bararchy> Also, on the right side of the text area there is a icon with capital M and arrow down, just click it to show all relevant markdown stuff
<FromGitter> <LWFlouisa> ~~ I see ~~
<FromGitter> <LWFlouisa> Eh I'll figure it out at some point. But thanks.
<FromGitter> <bararchy> ~~strike~~
<FromGitter> <bararchy> I think you can do it for space ?
<FromGitter> <bararchy> can't*
<FromGitter> <LWFlouisa> ~~strikethrough~~
<FromGitter> <LWFlouisa> Ah like that.
<FromGitter> <LWFlouisa> Spam made from ~~scratch~~.
<FromGitter> <LWFlouisa> '''
<FromGitter> <LWFlouisa> ''' puts "Hello World '''
<FromGitter> <LWFlouisa> ``` puts "Hello World" ```
<FromGitter> <LWFlouisa> There we go.
<FromGitter> <bararchy> ```puts "Hello World!" ⏎ a = 1 ⏎ a += 1 ⏎ puts a``` [https://gitter.im/crystal-lang/crystal?at=5ad312801130fe3d36dbcdb6]
<FromGitter> <LWFlouisa> ```puts "Hello World"```
<FromGitter> <LWFlouisa> Looked up the docs on hash tables, but it seems like unless I write it as an array, and then do .to_s it just wont work.
That_Guy_Anon has quit [Remote host closed the connection]
<FromGitter> <bararchy> @LWFlouisa what do you mean? what are you trying to do that "doesn't work"?
<FromGitter> <LWFlouisa> Well in ruby, I'm able to use hashes to do lookup tables for morse code.
<FromGitter> <LWFlouisa> For the most part, I can do most ruby things in crystal. I feel like I know the language already.
<FromGitter> <LWFlouisa> Right now using crystal to build html attachments for IPFS pages.
<FromGitter> <bararchy> @LWFlouisa Can you more specificlly explain what exatcly code related you did that didn't work? as in, what hash did you tried to create? what error did the compiler spit? etc..
<FromGitter> <r00ster91> How do I convert a String to a Symbol? So if I have `"a"` that I convert it to `:a`
<FromGitter> <bararchy> @r00ster91 You can't :) Symbols are decided in compile time, so they need to be known in advnaced
<FromGitter> <LWFlouisa> I was doing an alphabetic hash. Going to rewrite it and I'll post the error.
<FromGitter> <r00ster91> alright thanks
<FromGitter> <LWFlouisa> Error in dotcode2.cr:33: undefined method 'split' for Nil (compile-time type is (String | Nil))
<FromGitter> <LWFlouisa> That's the error I generally get. Hold on.
<FromGitter> <bararchy> @LWFlouisa https://play.crystal-lang.org/#/r/3vjh
<FromGitter> <LWFlouisa> I see now. Thanks.
<FromGitter> <bararchy> 2 issues you had, ⏎ 1) `gets` can return nil, to I did `.to_s` to make sure it's a string ⏎ 2) `[key]` might be missing, so I added `[key]?` so it return the key or nil if the key doesn't exists
<FromGitter> <bararchy> I don't know if either is what you really want but it fixes your issue
<FromGitter> <LWFlouisa> Thanks I appreciate it.
<FromGitter> <LWFlouisa> One weirdness I noticed, each string seems to come out with [] in front of each string. Might just be a difference between ruby and crystal.
<FromGitter> <bararchy> what do you mean? can you show output?
<FromGitter> <LWFlouisa> Oui
<FromGitter> <LWFlouisa> [" .._... "][" ._..... "][" ..._.. "][" ..._.. "][" ..._..... "]
<FromGitter> <LWFlouisa> ```[" .._... "][" ._..... "][" ..._.. "][" ..._.. "][" ..._..... "]```
<FromGitter> <bararchy> oh
<FromGitter> <bararchy> no that's an error XD
<FromGitter> <bararchy> you might want to `.flatten` and then `.join`
<FromGitter> <LWFlouisa> Where do I put .join or .flatten?
<FromGitter> <bararchy> @LWFlouisa https://play.crystal-lang.org/#/r/3vjk
<FromGitter> <bararchy> this might be a better approch I think
<FromGitter> <bararchy> changed the letter to Char instead of strings, and now we can do `.each_char` on the `gets` input
<FromGitter> <bararchy> less looping and less mapping
<FromGitter> <LWFlouisa> I'll have to learn what those symbols mean later.
<FromGitter> <bararchy> which symbols?
<FromGitter> <bararchy> anyway this seems to work nicly https://play.crystal-lang.org/#/r/3vjm
<FromGitter> <LWFlouisa> 1) thumbs up
olbat has quit [Ping timeout: 264 seconds]
<FromGitter> <LWFlouisa> Oui perfecto mundo.
<FromGitter> <LWFlouisa> I mean, yes, yes it does.
olbat has joined #crystal-lang
olbat has quit [Changing host]
olbat has joined #crystal-lang
<FromGitter> <bararchy> :(
<FromGitter> <bararchy> :)
<FromGitter> <bararchy> @LWFlouisa how did you hear about Crystal?
<FromGitter> <LWFlouisa> A friend on DTube chat recommended it.
<FromGitter> <LWFlouisa> I've been learning ruby for the last three or so years, and thought of trying something different but similar.
<FromGitter> <r00ster91> Crystal is perfect in this case
<FromGitter> <bararchy> yeha, I also went from Ruby to Crystal, it takes some time to wrap your head around all this static languge thingy
<FromGitter> <bararchy> but then you are hooked and can't go back :)
<FromGitter> <bararchy> Also for me, Crystal has made me a better Ruby dev by thinking about types and nil checks
<FromGitter> <LWFlouisa> Yea I'm close to that point.
<FromGitter> <LWFlouisa> Well that and Rubygame has been driving me nuts.
<FromGitter> <LWFlouisa> I eventually had to do my own game engine for Terminal Shooter for 7DRL.
<FromGitter> <LWFlouisa> I couldn't put my mind around things like :: at first.
Groogy2 has joined #crystal-lang
<FromGitter> <LWFlouisa> Oh, a Turn Based Strategic Terminal Shooter with random difficulty.
Groogy has quit [Disconnected by services]
Groogy2 is now known as Groogy
Groogy_ has joined #crystal-lang
<FromGitter> <bararchy> that sounds interesting :)
<Groogy> Terminal shooter? 🤔
<Groogy> how do those works?
<FromGitter> <LWFlouisa> It's like a roguelike, but for space shooters.
<FromGitter> <LWFlouisa> I still want to do a JRPG, but I just don't have the skills.
<Groogy> yeah but in terminal? So you wuuld create like a 3d renderer that translates into characters?
<oprypin> Groogy, i think it's a "pick from the list of actions" type of game even if it is called a shooter. dont know why you assume 3d, could just be nomal 2d as well
<FromGitter> <LWFlouisa> Oh no, it's made more like the original rogue. It uses text for characteers. (No pun intended.)
<Groogy> ah okay
<FromGitter> <LWFlouisa> Basically you have a grid a P symbol walks on, and you fight an E. You have an opportunity to repair your ship each turn. You can do regular attacks, and combos. It was a long time ago, so probably shoddily coded.
<Groogy> ah okay then I get a sense
<Groogy> since you said shooter I expected less turn based content I guess?
<FromGitter> <LWFlouisa> Yea I can understand why, its what I first thought of as well. I was only introduced to terminal shooters very recently.
<FromGitter> <LWFlouisa> Like in dungeon crawl stone soup, you play as an elf or human. In mind you play as a star ship.
<FromGitter> <LWFlouisa> One reason I asked about hashes, I've actually used hashes, along with arrays, to make a PRNG.
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
<FromGitter> <LWFlouisa> prng finished ish.
<FromGitter> <LWFlouisa> GN
<Groogy> gn!
rohitpaulk has quit [Ping timeout: 276 seconds]
rohitpaulk has joined #crystal-lang
<Groogy> also @LWFlouisa you should do a noise based prng, can traverse back and forward easily in it which means you can do "predictions" in mechanics and interface
rohitpaulk has quit [Ping timeout: 268 seconds]
That_Guy_Anon has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 265 seconds]
rohitpaulk has joined #crystal-lang
faustinoaq has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 264 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
<crystal-gh> [crystal] RX14 closed pull request #5948: Improve NotImplementedError message (master...feature/not-implemented-error-message) https://git.io/vpelm
<FromGitter> <bararchy> lol RX14 and the NotImplementedError saga
<RX14> lol
<RX14> I just realised I had no clue why I made the commit like
<RX14> 3 months ago
<RX14> yeah
<RX14> jan 25th
<FromGitter> <bararchy> we watched 30min of you working on that just to forget why you wanted it in the first place hahahahah
<RX14> nah I made the commit on jan 25th
<RX14> I was just shuffling it around in git
<RX14> between branches
<FromGitter> <bararchy> anyway, when do we get the next stream?
<RX14> hmm not sure
<Yxhuvud> rx14: I could see notiplementederror accepting a reason as to why it isn't implemented.
<RX14> yeah
<RX14> well
<RX14> it's a mess :/
<FromGitter> <bararchy> RX14 what are you tackling after File and Dir in regard to Windows support?
<RX14> @bararchy porting the compiler I guess
<FromGitter> <bararchy> you mean working on the super error you saw and said you don't envy the one who will need to fix it? (code gen error)
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has quit [Changing host]
p0p0pr37 has quit [Read error: Connection reset by peer]
p0p0pr37_ is now known as p0p0pr37
p0p0pr37 has quit [Read error: Connection reset by peer]
p0p0pr37 has joined #crystal-lang
p0p0pr37 has joined #crystal-lang
p0p0pr37 has quit [Changing host]
<RX14> @bararchy uhh maybe
<FromGitter> <bararchy> lol hahah good luck XD
hightower2 has joined #crystal-lang
hightower3 has quit [Ping timeout: 260 seconds]
<crystal-gh> [crystal] j8r opened pull request #5950: Add `String#enclosed_with?` (master...string_enclosed_with) https://git.io/vpepl
<hmans> I'm having trouble getting HTTP::StaticFileHandler to server larger files (I haven't done any scientific tests so far, but it seems like it's starting to have trouble sending files larger than ~150 KB.)
<hmans> I noticed Kemal has its own StaticFileHandler implementation that uses Kemal's send_file code
<hmans> https://github.com/crystal-lang/crystal/commit/96bcc34afbcf23d50823aaecb0c12b6eed0f8fac#diff-4c571b51c80c875e7b88ebaeae9881cf appears to be the only major change to StaticFileHandler since 0.24.2, so I guess there's not a lot of value in trying HEAD
pbodev1 has joined #crystal-lang
<RX14> hmans, it shouldn't have any trouble with larger files
<RX14> if you get a scientific test working i'd love to hear
<hmans> RX14: none of my browsers (latest Chrome, latest Safari on macOS) are able to retrieve larger files
<hmans> I'm happy to open an issue when I'm back home.
<RX14> what about curl
<hmans> curl worked, interestingly.
<hmans> Hm.
<hmans> Whatever this is, it goes away when I use Kemal's built-in StaticFileHandler/send_file
<hmans> It's just HTTP::StaticFileHandler from the standard library that's doing it.
<hmans> I will do some further digging and will be happy to open an issue.
<FromGitter> <bararchy> @sdogruyol why does Kemal has its own Static File Handler ?
<hmans> Kemal's send_file is definitely more involved than what HTTP::StaticFileHandler is doing, that may be the reason... (for example, it appears to support byte ranges requested from the client, allowing resumed downloads)
<RX14> I really want to try make `IO.copy` use sendfile on linux :)
<RX14> sounds be fun
<RX14> >should be
<RX14> also writev bound as write(*slices)
<RX14> and readv? not too sure about readv's usecase
<FromGitter> <Sjoerrdd> Somebody any idea when Crystal 1.0 will be released?
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/vpveT
<crystal-gh> crystal/master 68c8051 Chris Hobbs: Stub out ::sleep for win32 (#5947)...
<RX14> @Sjoerrdd no idea
<Yxhuvud> when enough parts are in place.
<Vexatos> yesterday
<RX14> streaming again :) https://www.twitch.tv/rx14/
<FromGitter> <bararchy> Dude, no headsup ! RX14
<FromGitter> <bararchy> Will you be saving it at least ?
<RX14> yes
<FromGitter> <bararchy> 👍
<travis-ci> crystal-lang/crystal#68c8051 (master - Stub out ::sleep for win32 (#5947)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/366817984
<DeBot> https://github.com/crystal-lang/crystal/pull/5947 (Implement blocking ::sleep for win32)
<FromGitter> <straight-shoota> nice 👍
mps has joined #crystal-lang
<FromGitter> <sdogruyol> lol, the stream just started autoplay and I was like WTH is going on 😄
<faustinoaq> :)
<FromGitter> <sdogruyol> more people more fun 👍
<FromGitter> <fridgerator> party 🎉
<livcd> i am hypnotized
<FromGitter> <girng> good morning
<FromGitter> <kingsleyh> Gosh - live streaming on twitch - how cool!
<FromGitter> <girng> @sdogruyol same, i was scrolling up to new unread posts and something started to play in the background i was like WTF LOL
sz0 has joined #crystal-lang
<FromGitter> <girng> i love listening to interstellar soundtrack while coding in crystal
<FromGitter> <girng> is groovey here??
<FromGitter> <girng> ```code paste, see link``` ⏎ ⏎ something like this safe to use? [https://gitter.im/crystal-lang/crystal?at=5ad3a6ae15c9b03114fd0fdc]
<FromGitter> <girng> it helps me w/ duplicate code because i on't have copy and paste that namedtuple everywhere
<FromGitter> <girng> so i decided to just use a module lol
<FromGitter> <girng> it also doesn't create a new memory address each time , which is nice. going to to start using modules more now
qard has joined #crystal-lang
<FromGitter> <sam0x17> @RX14 what is your awesome window manager?
<RX14> i3
<RX14> the docs are fantastic
<FromGitter> <sdogruyol> Was a great stream, had a lot of fun, thanks @RX14 👍
<RX14> cool
<RX14> didn't know you were following along
<FromGitter> <sdogruyol> just followed for a while, I'll watch the rest later
<RX14> cool
<FromGitter> <sam0x17> I just watched parts of the old video on twitch
<RX14> you should join chat next time
<FromGitter> <sam0x17> yeah I wasn't there when it was live
<FromGitter> <sdogruyol> someone already picked up my handle on Twitch...
<RX14> huh
<RX14> i wouldnt have expected that
<FromGitter> <sdogruyol> yeah..I'm not sure if it's myself from a veryyy long time ago
<RX14> you could always just reset pw
<FromGitter> <sdogruyol> not the same email though
<FromGitter> <sdogruyol> probably, one of my previous unused gamer emails..oh well
<RX14> i've had the same email since forever
<RX14> it's nice
<FromGitter> <sam0x17> I've had the same email since 6th grade and I'm 26
<RX14> i've used chris@rx14.co.uk since I got rx14.co.uk
<FromGitter> <sam0x17> I just redirect everything to my original gmail account
<RX14> nov 2012
<RX14> so I was 13
<FromGitter> <sdogruyol> https://www.twitch.tv/sdogruyol nope it's not me
<FromGitter> <sdogruyol> this guy is following some PUBG stuff
<RX14> ah
qard has quit [Quit: qard]
<FromGitter> <sdogruyol> thought my handle was so unique...damn
<FromGitter> <sam0x17> statistically speaking random twitch user should be a PUBG person XD
qard has joined #crystal-lang
<RX14> my handle is unique almost everywhere
<FromGitter> <sdogruyol> I don't get the fuss about PUBG
<RX14> only twitter and reddit have it taken
<FromGitter> <sdogruyol> (never played)
qard has quit [Read error: Connection reset by peer]
<FromGitter> <r00ster91> I played pubg one time and I just had 14 FPS. It runs really bad
qard has joined #crystal-lang
<FromGitter> <sdogruyol> https://www.twitch.tv/sedogruyol there we go
<FromGitter> <sdogruyol> I wonder if I can actually live-stream with 1mbps upload
<RX14> probably a bit but not well
<RX14> I was going at 3mbps
<FromGitter> <bararchy> @sdogruyol you can down the quality
qard has quit [Client Quit]
<RX14> so you'd probably want >4.5mbps to stream at 1080p 30fps
<RX14> but yeah you can lower the quality
<FromGitter> <sdogruyol> hopefully, I'll give it a try..one day
<RX14> you kinda need to be able to ramble on about stuff lol
<FromGitter> <sdogruyol> yeah. I'm not sure what to talk about haha
<RX14> I'm insane enough to talk to myself even without streaming so I'm not too bad at it
<RX14> unless I start typing
<FromGitter> <bararchy> you do it pretty good RX14 :) always talking
<RX14> then the words go
<Vexatos> Can confirm, RX14 is insane
<FromGitter> <bararchy> keeps it interesting
<FromGitter> <sdogruyol> talking to a screen without an actually voice feedback feels weird...did some remote presentations and it felt awkward at first
<FromGitter> <sdogruyol> but I guess you get used to it
<FromGitter> <sdogruyol> Vexatos, aren't you his friend?
<crystal-gh> [crystal] straight-shoota opened pull request #5951: (WIP) Add tempfile and datapath helpers to specs (master...jm/feature/specs-tempdir) https://git.io/vpvYq
<Vexatos> Good question
<RX14> @sdogruyol friends enough to mutually mock each other
<Vexatos> Good answer
<FromGitter> <j8r> they are *bad friend*
<RX14> thats the default state of british friendship
<Vexatos> And I am not even British!
<RX14> you're not really friends in the UK if you can't insult each other
<FromGitter> <sdogruyol> brits are hard to understand...sometimes
<Vexatos> I've only ever seen him once in my life though.
<RX14> it's easy
<RX14> we insult everything
<FromGitter> <sdogruyol> Vexatos, that should be enough
<Vexatos> Brits are easy to understand: If they insult you, you are on good terms
<Vexatos> if they are polite, you are on bad terms
<RX14> lightheartedly though
<RX14> Vexatos, exactly
<FromGitter> <sdogruyol> then there's football I guess
<FromGitter> <bew> Lool
<Vexatos> I've been to the UK often enough to know that
<RX14> idk why its so hard to understand
<FromGitter> <sdogruyol> vexatos where you're actually from?
<RX14> it's just sarcasm all the time
<Vexatos> The land of bread and sausage
<Vexatos> Germany
<FromGitter> <sdogruyol> 1) döner
<FromGitter> <straight-shoota> now I'm hungry
<RX14> i've just dad dinner so i'm not at least
<RX14> had*
<Vexatos> You had a tub of ice cream
<FromGitter> <j8r> That's why Vexatos sound like a laxative medication?
<FromGitter> <sam0x17> LOL
<Vexatos> That's rude.
<FromGitter> <sdogruyol> what lol
<FromGitter> <j8r> haha :-D
<Vexatos> Also what.
<Vexatos> Never heard that one before
<FromGitter> <sdogruyol> vexatos sounds like a Warlock name to me
<FromGitter> <sdogruyol> or a daemon pet
<FromGitter> <j8r> I've taken a medic the sound like this before
<FromGitter> <straight-shoota> not sure if that qualifies as friendship establishing insult
<Vexatos> That's not how it works
<Vexatos> Talking about laxatives is not a good way to start a friendship. If you want to know more about bad ways to start friendships, call 00441234567
<FromGitter> <straight-shoota> is that's RX14's number? :D
<Vexatos> I hope it isn't
<RX14> if it was itd start with 44
<Vexatos> it does
<Vexatos> I at least made sure of that, Sir.
<FromGitter> <j8r> RX14 you can call my non-premium personal 09
<RX14> 0044??
<Vexatos> 0044 is the UK phone country code
<RX14> +44 more like
<Vexatos> the phone just translates that to 0044
<Vexatos> dialling into a different area in your own country always starts with a 0, dialling into a different country always starts with a 00
<Vexatos> 001 is US, 007 is Russia, 004* is Europe
<RX14> not long enough though Vexatos
<Vexatos> I thought so
<Vexatos> German phone numbers have at least 12 digits
<RX14> 5555555555 is how long
<RX14> 00447777777777
<Vexatos> Germany has numbers like 004455556666
<FromGitter> <sdogruyol> phone numbers are hard
<Vexatos> but those are only really old numbers
<Vexatos> I still know people with four-digit phone numbers
<RX14> i remember my number
<Vexatos> they aren't at all hard, really
<Vexatos> first four digits is the town or village you live in, or cellphone company, the rest is your actual number
<Vexatos> RX14, I remember the numbers of all my family members and yours probably too
<FromGitter> <j8r> Vexatos, yours being with 0900, right?
<Vexatos> no >_>
<FromGitter> <j8r> 0190?
<Vexatos> no?
<Vexatos> those are surprisingly arbitrary
<Vexatos> that is the number prefix
<FromGitter> <j8r> yes
<Vexatos> which is usually, as I said, the village or town you live in or the cellphone company
<Vexatos> you can get a 0900 or 0800 number if you pay for it
<FromGitter> <j8r> you have one?
<Vexatos> of course not
<Vexatos> those are super expensive
<FromGitter> <j8r> This way, you can tell sombedoy: call me at 0900123456
<Vexatos> you cannot do that
<FromGitter> <j8r> too bad :-( (or not)
<Vexatos> all phone numbers in the world are on a Huffman tree
<FromGitter> <j8r> it's an example, random
<FromGitter> <dbachinin> Hi all! Why parameters wich i put to crystal binary or script, from bash variable, dont handle normaly? And if i put parameters as native, type or paste to line, all is OK?
<FromGitter> <dbachinin> Sorry my English
<FromGitter> <sdogruyol> @dbachinin you're getting a String from command line that's why
<oprypin> dbachinin, https://crystal-lang.org/api/0.24.2/BigInt.html#new%28str%3AString%2Cbase%3D10%29-class-method
<oprypin> I just looked into how we could (automatically) de-prioritize old API docs from google search, and it appears the only way is by editing the old pages to have a link to the new page, or by having a canonical ref which completely destroys old links
<oprypin> since old api docs are generated as static pages and forgotten about, this does not seem viable
<oprypin> but it will be a problem in the long run
<FromGitter> <sdogruyol> oh, we should better start keeping them
<FromGitter> <dbachinin> Hmmm... I allready change Int64 to BigInt. To nothing has changed. ⏎ I do not understand what exactly are in my parameters that i send to crystal doesnt like.
<FromGitter> <sdogruyol> @dbachinin sharing some code would be more helpful
<oprypin> dbachiin, you seem to be creating BigInt from the string "1e85e85...". that's invalid
<oprypin> >> require "big_int"; BigInt.new("1e85e85")
<DeBot> oprypin: while requiring "big_int": can't find file 'big_int' relative to '.' - https://carc.in/#/r/3vqh
<oprypin> >> require "big"; BigInt.new("1e85e85")
<DeBot> oprypin: from ??? - https://carc.in/#/r/3vqi
<FromGitter> <dbachinin> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ad3b6007c3a01610de605ed]
<FromGitter> <dbachinin> parameter - 1e85-e85e-93af-5e85-e85e-85e8-007c-1eca
<FromGitter> <girng> just have if statement in docs api that checks if older than master, and redirect user
<oprypin> ...
<oprypin> dbachinin, actually the string is "\"1e85e85"
<oprypin> that's the problem. an extra quote
<oprypin> also FYI "$(echo "$a")" == "$a"
<RX14> oprypin, you can just edit robots.txt
<oprypin> RX14, the problem with all this is that it kills SEO
<RX14> like
<RX14> ok
<FromGitter> <dbachinin> yes. i can make this. But nothing has changed
<oprypin> yep, nothing has changed, your string still contains a " character
<FromGitter> <girng> for example: https://i.gyazo.com/f19aa75eb424d325189453c60181f086.png this links to the old api 0.21.1. however, the current docs are 24.2. when you visit an older doc page, it should redirect the user to the new doc page. ⏎ ⏎ i had this problem before and actually @straight-shoota helped me with it. because i was viewing outdated documentation in regards to the sort_by! methods i believe, but i fi were
<FromGitter> ... viewing the new docs page, i would have seen it.
<oprypin> it should not redirect, then there is no point in having the versions. it should not appear in the search engine first
<FromGitter> <girng> @oprypin there is no point at looking at outdated docs..
<oprypin> at the moment actually that's true
<oprypin> somehow Python eliminated this problem
<FromGitter> <faustinoaq> We should redirect all those old versions to https://crystal-lang.org/api/master
<oprypin> not master
<oprypin> ok they destroy old links view-source:https://docs.python.org/3.5/library/stdtypes.html <link rel="canonical" href="https://docs.python.org/3/library/stdtypes.html" />
<FromGitter> <faustinoaq> oprypin, Well, we should use https://crystal-lang.org/api/latest at least
<oprypin> drop the latest, it's cleaner
<FromGitter> <dbachinin> @oprypin!! Thank you! I didnt pay attention
<oprypin> for the current situation, i'd edit every file in storage and add this line. e.g. https://crystal-lang.org/api/0.24.2/BigInt.html canonical https://crystal-lang.org/api/BigInt.html
<FromGitter> <girng> btw i been using the macro u guys helped me with my gamesesrver, been working great =]
<FromGitter> <sdogruyol> @girng have you deployed yet?
<FromGitter> <girng> nah not finished, need a bit more time but almost done
<FromGitter> <sdogruyol> awesome, feel free to ping if you need some deployment help
<FromGitter> <sdogruyol> I've some experience deploying Crystal apps
<FromGitter> <girng> awesome 👍
<FromGitter> <girng> yeah i know you use it in production so very nice..
<FromGitter> <sdogruyol> yup, I try my best
<FromGitter> <girng> mapping is much easier now with macro. feels like i'm cheating :D
<FromGitter> <sdogruyol> macros are here to help you
<FromGitter> <sdogruyol> you should be OK unless you overused :D
<FromGitter> <girng> ima stick to using them just for mapping lol
<FromGitter> <girng> anthing beyond that, i'll prob have a brain aneurysm
<FromGitter> <girng> :D :D
<FromGitter> <sdogruyol> lol
<FromGitter> <sdogruyol> I'd be happy to read a blog post about your game server girng
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <girng> hahahaha
<oprypin> posted #5952
<DeBot> https://github.com/crystal-lang/crystal/issues/5952 (Outdated API doc links in Google search (bad SEO))
<FromGitter> <girng> i upvote.. thx
alex`` has quit [Ping timeout: 260 seconds]
qard has joined #crystal-lang
qard has quit [Quit: qard]
<FromGitter> <girng> im going to be working on my game server manager here. reading cpu/memory stats from crystal, and sending them over the pipe
<FromGitter> <girng> with godot's ui tools / progress bar nodes to display. gonna be epic
<FromGitter> <girng> to_json is really agod damn life savior
pbodev1 has quit [Quit: ChatZilla 0.9.93 [Firefox 56.0/20170903140023]]
qard has joined #crystal-lang
<FromGitter> <simaoneves> @RX14 You should stream more times for sure! :)
<RX14> thanks
<RX14> i guess I will
txdv has quit [Ping timeout: 260 seconds]
txdv has joined #crystal-lang
<FromGitter> <LWFlouisa> You do games girng?
<FromGitter> <LWFlouisa> I was going to ask if Crystal has any 2D game engines yet.
<FromGitter> <girng> yah but i just use crystal for server-side stuff
<FromGitter> <girng> i use godot engine for 2d canvas drawing/etc
<FromGitter> <girng> however, godot engine pairs beautifully well with crystal's tcp server and can communicate to each other very, VERY easily
<FromGitter> <girng> they go together like peanut butter and jelly imo
<FromGitter> <LWFlouisa> Sounds yummy.
<FromGitter> <girng> :D
<FromGitter> <LWFlouisa> I'm still torn about the kind of game I'm wanting to do.
<FromGitter> <LWFlouisa> I'm into stealth games, but also turn based strategy, and point and click.
<FromGitter> <girng> i see
<FromGitter> <LWFlouisa> Normally I'd make desktop computer a menu choice, but in this approach, considering making it its own player function. So it's almost an interactable room in itself.
<FromGitter> <kingsleyh> Stealth games freak me out lol - but point and click I can handle
<FromGitter> <LWFlouisa> Yea I know what you mean.
mps has left #crystal-lang [#crystal-lang]
<FromGitter> <girng> im doing diablo 2 style game. but im implementing intrusion system
<FromGitter> <LWFlouisa> I'm considering a custom navigation framework, it's still up in the air whether it would work though.
<FromGitter> <girng> when you create a game, you can choose whether or not to enable intrusion. if you do, you get % more exp, loot, etc. however, this means people can queue at the intrusion manager and join your game and kill you.
<FromGitter> <girng> or you can fight them off and get tokens and then trade those tokens in for rewards at the NPC
<FromGitter> <kingsleyh> Sounds fun
<FromGitter> <kingsleyh> I made a tank game using
<FromGitter> <kingsleyh> FM
<FromGitter> <kingsleyh> Fsml
<FromGitter> <bew> sfml*
<FromGitter> <kingsleyh> Crystal has bindings too
<FromGitter> <LWFlouisa> Wanting to do cipher based based navigation later.
<FromGitter> <kingsleyh> Sorry on my phone
<FromGitter> <girng> @kingsleyh thx. hope it works. i will need a lot of players xD
<FromGitter> <girng> is there a way to track what the main developers of crystal are doing outside of github. do they have a twitter, work on othjerprojects, facebook, etc?
<FromGitter> <LWFlouisa> Crystal does I think.
<FromGitter> <LWFlouisa> https://twitter.com/CrystalLanguage
<FromGitter> <LWFlouisa> Other than that, not sure.
<FromGitter> <girng> https://manas.tech/staff/
<FromGitter> <girng> found em
<FromGitter> <LWFlouisa> I found it difficulty to do certain cryptographic protocols without help in Crystal.
<FromGitter> <girng> dang. waj has a 3 letter twitter handler. that's rare lol
<FromGitter> <girng> aww his last tweets from 2017. should post more
<FromGitter> <LWFlouisa> Going to enable just web browsing in this game.
<FromGitter> <girng> does crystal have hoodies? https://i.gyazo.com/01c1dac2a8486bb2d165152df2bd184e.png i want to buy a hoodie or a long sleeve shirt
<FromGitter> <LWFlouisa> For the cat?
<FromGitter> <girng> lol
<FromGitter> <girng> nope, for me!
<FromGitter> <girng> that is a cute cat though...
qard has quit [Quit: qard]
<FromGitter> <LWFlouisa> Yep.
<FromGitter> <LWFlouisa> Since I'm doing a terminal game, I'm thinking of finding a way to browse w3m and torsocks without having to leave the terminal. There one can view my IPFS site to look at tutorials.
qard has joined #crystal-lang
<FromGitter> <LWFlouisa> I'm so torn, I mean I love me some JRPGs. And yet at the same time, I think the name JRPG really needs to be abandoned.
qard has quit [Quit: qard]