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
<crystal-gh> [crystal] ysbaddaden closed pull request #3572: Android targets [WIP] (master...support-android) https://git.io/v1v3J
DTZUZO has joined #crystal-lang
<travis-ci> crystal-lang/crystal#dc2b8f0 (master - Remove block argument from `loop` (#6026)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/372552399
<DeBot> https://github.com/crystal-lang/crystal/pull/6026 (Remove block argument from `loop`)
trillpoli[m] has left #crystal-lang ["User left"]
faustinoaq has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
That_Guy_Anon1 has joined #crystal-lang
That_Guy_Anon has quit [Ping timeout: 265 seconds]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
<oprypin> no. nobody does that.
Nathanaelle has quit [Ping timeout: 248 seconds]
Raimondi has quit [Quit: WeeChat 1.9.1: Β‘Chau!]
Nathanaelle has joined #crystal-lang
<FromGitter> <valamorgon> can I use apache thrift with crystal? maybe with c bindings? because the problem I try to solve requires me to use multiple languages but I chose crystal as main language
That_Guy_Anon1 has quit [Quit: Leaving]
<FromGitter> <girng> @oprypin you see my example code above?
<FromGitter> <bararchy> damn Telegram is down 😒
<FromGitter> <bararchy> @valamorgon what is apache thrift and what benifit does it gives you? seems like yet another SDL\Lang?
ua_ has joined #crystal-lang
ua has quit [Ping timeout: 260 seconds]
<crystal-gh> [crystal] asterite closed pull request #5466: Fix to lookup NamedTuple from self (master...fix/crystal/5464-instantiate-namedtuple-by-self-restriction) https://git.io/vbdnp
DTZUZO has quit [Ping timeout: 264 seconds]
<crystal-gh> [crystal] asterite closed pull request #5242: Change Time class to extract additional constants for numbers which are used in multiple calculations (master...time_constants) https://git.io/vFCkj
That_Guy_Anon has joined #crystal-lang
<FromGitter> <sherjilozair> What's the correct way to style code blocks enclosed with braces?
<FromGitter> <sherjilozair> Does this look okay?
<FromGitter> <sherjilozair> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ae590621130fe3d362b6c82]
<FromGitter> <sherjilozair> It didn't copy correctly. This is with correct whitespace: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ae590f32b9dfdbc3adeeee1]
DTZUZO has joined #crystal-lang
<FromGitter> <sherjilozair> How can I do binary bitwise logical operations?
<FromGitter> <sherjilozair> Never mind. ops on integers work. I just need the "!= 0" at the end, coz Crystal treats 0 as true.
<FromGitter> <sherjilozair> No it doesn't work. `0 && 1 == 1` :(
<FromGitter> <sherjilozair> Works with `&`. :D
Groogy has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vpBv9
<crystal-gh> crystal/master 382529f Ary Borenszweig: Merge pull request #6029 from asterite/bug/5729-spec-be_a-regression...
<crystal-gh> crystal/master 7df0271 Ary Borenszweig: Let spec be_a be a macro again
<crystal-gh> [crystal] ysbaddaden closed pull request #5848: Security Fix: don't buffer reads from /dev/urandom (master...security-fix-dont-buffer-dev-urandom) https://git.io/vxcXT
<travis-ci> crystal-lang/crystal#382529f (master - Merge pull request #6029 from asterite/bug/5729-spec-be_a-regression): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/372644892
<DeBot> https://github.com/crystal-lang/crystal/pull/6029 (Let spec be_a be a macro again)
<FromGitter> <hmans> Is there an understanding of what is the canonical way to hang out in this room? (IRC vs. Gitter)
hmans has left #crystal-lang [#crystal-lang]
<oprypin> hmans, just don't edit previous messages in gitter. and ideally use a pastebin (other than pastebin.com) for big pieces of code
<FromGitter> <girng> @hmans in other words, what oprypin is trying to say is "use gitter to conform to my standards" because i use IRC
<FromGitter> <j8r> @valamorgon you can also use msgpack, there is a shard
<FromGitter> <j8r> @sherjilozair use `do`/`end` if you have multi-line blocks, and braces for one line
<oprypin> j8r, I disagree
<FromGitter> <j8r> that's what I've seen in the stdlib :-/
<oprypin> yes but i still disagree
<FromGitter> <sherjilozair> I didn't even know do/end and braces are interchangeable. I think the docs are written for a Ruby dev, and because of that skips over things a Rubyist would already know.
<oprypin> that happens, yes
<FromGitter> <girng> use what you find most comfortable
<FromGitter> <sherjilozair> Yeah I am going to use do/end now. @oprypin So you don't get to see any of the formatting gitter does for code blocks?
<oprypin> sherjilozair, the bridge bot just shows a link to the message on gitter
sherjilozair has joined #crystal-lang
<FromGitter> <sam0x17> well guys just switched from ubuntu to antergos -- extremely happy
<oprypin> one step at a time..
<FromGitter> <drum445> Ubuntu 18.04 is solid
<FromGitter> <drum445> Well Lubuntu
<FromGitter> <girng> i tried linux but went back to windows becaue windows has WSL. and gaming is much better
<FromGitter> <sherjilozair> Ignore this: Testing: ```def f(x) x end```
<FromGitter> <sam0x17> 1) 04 was really terrible with my thinkpad, hence the switch
<FromGitter> <drum445> Fair enough, I wouldn't go near Gnome 3 so Lubuntu 18 with Qt will do nicely
<FromGitter> <drum445> Windows makes me ill
<FromGitter> <sam0x17> trackpoint has been unusable on the last few releases, but with 18.04 even my hacky workarounds no longer worked, but I'm already super used to gnome 3 from 17.10 so antergos with gnome 3 for me for now
<FromGitter> <sherjilozair> macos has games and has unix. best of both worlds.
<FromGitter> <drum445> @sam0x17 fair enough.
<FromGitter> <drum445> I'm not a fan of apple
<RX14> except macos's build environment is broken
<FromGitter> <sam0x17> I'm shocked by how easy it is to install things without having to find shady PPAs on arch-based distros
<oprypin> sherjilozair, i'd say worse of both worlds but whatever
<FromGitter> <sherjilozair> @RX14 What do you refer to? It's regarded as the system which allows you to build for all three platforms.
<FromGitter> <sam0x17> I always assumed the debian universe was where all the packages were at, but I think that's a pretty dated thing now
<oprypin> sherjilozair, lol only because it's explicitly forbidden to build for it from other systems
sherjilozair has quit [Client Quit]
<RX14> If you'd seen the amount of hacks crystal does just to get stuff to work on osx
<RX14> You'd know that was bs
<FromGitter> <sherjilozair> lol okay. I know I don't stand a chance against arch linux people.
<RX14> Its not as bad as windowz
<RX14> That's for sure
<FromGitter> <sam0x17> how is that going btw
<RX14> But neither does it have the full suite of software windows has
<FromGitter> <drum445> Linux > MacOS > Windows
<RX14> The true ideal is windows vm with gpu pass through on Linux
<FromGitter> <girng> Windows > Linux > MacOS
<RX14> And ignore osx
<FromGitter> <sherjilozair> Yeah. That's why I said it's best of both worlds. But yeah, it's not as good as Windows for games, and not as good as linux for programming.
<FromGitter> <drum445> WIndows can't be top, surely
<FromGitter> <girng> yes it can
<FromGitter> <girng> especially with WSL
<FromGitter> <drum445> Are you using w10?
<FromGitter> <girng> yah, hbu?
<FromGitter> <drum445> Cortana is a bad joke
<oprypin> if you average out everything, i'd agree with @girng the most so far :D
<FromGitter> <sam0x17> osx is basically just blizzard games and a few random ones on steam (99% of which are also on linux)
<FromGitter> <sam0x17> and said blizzard games work on linux ... ish.. with playonlinux
<FromGitter> <girng> Windows 10 gives best of both worlds for development. Gaming and ability to use WSLfor server-side languages :D
<RX14> Nah Linux is the best because you can virtualise windows in it
<FromGitter> <drum445> Every server is linux, so why wouldn't you code on the same platform locally
<FromGitter> <sherjilozair> What do you linuxers use for hardware? MacOS? I've had trouble finding good non-apple hardware.
<FromGitter> <girng> @drum445 im just giving you shit, i respect your views, just posting mine too =]
<RX14> Think pads
<RX14> Of course
<FromGitter> <drum445> yeah man, each to their own
<FromGitter> <sam0x17> thinkpads
<FromGitter> <sam0x17> @RX14 what model you use?
<FromGitter> <drum445> Although if you care about privacy W10 goes out the window ;) (excuse the pun)
<FromGitter> <sam0x17> I've been on the X270 but sort of wish I got that anniversary edition that came out recently
<RX14> I'm using a thinkpad 13
<FromGitter> <drum445> I'm thinking about getting a new machine, you guys recommend the think pads?
<FromGitter> <sam0x17> yeah I'm on my 5th been using them since the IBM days
<FromGitter> <sam0x17> I can also rant about how the trackpoint is superior to touch pads but lol
<RX14> the thinkpad 13's pretty cheap but the specs you can get for the price are great
<RX14> i don't think you can really get 16gb of ram for cheaper - wityhout talking your laptop apart
<FromGitter> <sam0x17> yeah I was not aware of that model but it looks great
<RX14> and the keyboard's great
<RX14> linux compat is 100%
<RX14> and the touchpad's pretty good
<RX14> and I can run 2 external >1080p monitors off it
<RX14> and it gets 8 hours of battery
<FromGitter> <sam0x17> it really does too
<FromGitter> <sam0x17> mine lasts forever
<RX14> and it wasn't really expensive at all
<FromGitter> <drum445> Dell XPS with 16gb RAM might be my next machine
<RX14> it's even better that you can save the battery yourself
<RX14> by limiting the battery thresh to 80%
<FromGitter> <drum445> Or is 16 overkill?
<RX14> 16 isn't overkill
<oprypin> i think it is
<FromGitter> <j8r> Looking forward: https://github.com/redox-os/redox
<RX14> oprypin, pls, you need 8gb ram just to compile the spec suite of crystal
<FromGitter> <sam0x17> 16 GB is must have to be future proof with all these crazy ram hungry electron apps etc imo lol
<FromGitter> <drum445> ha true
<RX14> if anyone needs 16gb ram it's crystal devs
<oprypin> the secret is to not use those apps
<RX14> plus I regularly use 16gb ram if i'm running a windows vm
<RX14> I even run out of ram sometimes
<FromGitter> <sam0x17> of course, but just this morning I tried loading up unetbootin, didn't even fricking work with 18.04 ubuntu
<FromGitter> <sam0x17> had to get etcher
<FromGitter> <sam0x17> yeah if you're doing virtualization forget it def need 16 at least
<FromGitter> <j8r> Don't forget to enable Zwap https://wiki.archlinux.org/index.php/Zswap
<RX14> plus crystal stickers look good on the clean thinkpad screen back :)
<FromGitter> <drum445> If I built a machine reckon the linux comparability would be crap?
<FromGitter> <drum445> Can we buy crystal stickers lol?
<RX14> no
<RX14> @drum445 linux is compatible with pretty much everything common at this point
<FromGitter> <j8r> You will be able to gain more RAM on Linux by compressing the RAM/swap
<FromGitter> <drum445> PCSpecialist will put one together for you but worried about compatability
<FromGitter> <girng> can';t buy crystal stickers. can't buy crystal hoodies
<RX14> any gpu, any cpu, any ram, any motherboard will just work
<FromGitter> <girng> i mean why live..
<FromGitter> <drum445> Shame, wouldn't mind flexing with some Crystal stickers
<FromGitter> <drum445> Ah nice one, I'll just get off there then, cheers @RX14
<FromGitter> <j8r> πŸ‘ πŸ‘ please goodies to buy
<RX14> @drum445 even most laptops just work these days
<RX14> the exceptions being around touchscreens mostly
<RX14> and switchable graphics
<RX14> if it uses that
<FromGitter> <girng> i just bought a new mechanical used off amazon
<FromGitter> <sam0x17> and surface books also don't work well, which is a shame
<FromGitter> <girng> keyboard*
<RX14> oh yeah and that new sleep mechanism
<RX14> s0c3 or whatever
<FromGitter> <drum445> @RX14 yeah it's a custom laptop, I guess the only thing I worry about is the wifi and sound drivers
<FromGitter> <girng> i have never used mechanical keyboards in my entire life, but my space key is broke and this membraine keyboard's actuation force for keypressing is very hard. makes programming very difficult and uncomfortable.
<RX14> @drum445 they're pretty much guaranteed to work
<FromGitter> <sam0x17> haha I have a messed up space key atm as well, have to make sure to press the left side
<RX14> if it's an intel card it's 100%
<FromGitter> <drum445> Yeah it;s all intel
<RX14> thinkpads use intel wnics :)
<FromGitter> <girng> @sam0x17 same, half of it won't trigger the keypress lmao
<FromGitter> <sam0x17> lol
<RX14> @girng you can get pretty good cheap mechs from amazon
<FromGitter> <girng> i took it off, but i lost the little white two-piece thing so i ttried to use naother part from my scroll lock key
<FromGitter> <girng> so now this keyboard has missing key caps all over and i still can't fix it ROFL
<FromGitter> <sam0x17> my white two-piece thing is fine but the membrane under it is messed somehow
<FromGitter> <drum445> Logitech K270 mate
<FromGitter> <drum445> cheap but great
<FromGitter> <sam0x17> I remounted it perfectly
<RX14> like my 65% mechanical with mx blue knockoffs was Β£30
<RX14> and it works great
<FromGitter> <girng> @RX14 you program with mechanical?
<RX14> yeah
<FromGitter> <sam0x17> its a fun experience
<FromGitter> <girng> how was it from membraine, is it vastly different?
<RX14> yeah
<FromGitter> <girng> easier to actuate?
<FromGitter> <sam0x17> I have a lenovo dock so when I'm at my desk I'm using a mechanical with cherry mx
<FromGitter> <drum445> a lot different
<FromGitter> <girng> ok im excited then it said it'll be here on monday
<RX14> depends on the switch if it's easier
<FromGitter> <drum445> blues are most tactile
<RX14> my mx blues are actually a lot more force than a membrane
<FromGitter> <girng> i got mx brown cuz i heard they are in the middle between blue and red
<FromGitter> <drum445> solid choice
<RX14> i just got blues
<FromGitter> <drum445> I had blacks and blues in the past
<RX14> because I don't touchtype
<RX14> I bottom out all the time and type weirdly
<FromGitter> <drum445> haha
<RX14> so blues are where i'm at
<FromGitter> <girng> i really love the sound the blues make though..was going to get those but i heard they are 60g actuation, and browns are 40-45g
<FromGitter> <girng> iuno how much my membrain is, i googled and they said membrains range from 80-100g actuation. so i think even if i got blue or brown it would be easier
<FromGitter> <drum445> Chiclet keys are probably easiest
<FromGitter> <girng> chiclet keys?
<RX14> before this keyboard I had a monterey k108 with these switches https://deskthority.net/wiki/SMK_Alps_mount
<FromGitter> <drum445> I'm a big fan, but can't find a decent board that isn't mac :(
<FromGitter> <drum445> @girng It's the key style you find on mac keyboards
<FromGitter> <girng> what's actuation force on chiclets?
<RX14> @drum445 well the only decent chiclet keyboards are on thinkpads
Raimondi has joined #crystal-lang
<FromGitter> <drum445> @RX14 yup, does seem that way
<RX14> so order a replacement thinkpad keyboard and hook it up as an exteral
<FromGitter> <sam0x17> thinkpads I have owned: Thinkpad T40 (2004), Thinkpad X61 (2007), Thinkpad X230 (2011), Thinkpad T440S (2015), Thinkpad X270 (2017)
<FromGitter> <sam0x17> also used my husband's T560 for a while, way too big
<FromGitter> <sam0x17> @RX14 I use that at my desktop sometimes lolol
<FromGitter> <sam0x17> they used to have a wired one also
<RX14> thinkpad keyboards are still worse than proper mechanicals
<FromGitter> <sam0x17> which was so useful for doing computer repairs for randoms
<oprypin> i think that particular thinkpad keyboard is terrible
<FromGitter> <drum445> haha I never knew they made those
<FromGitter> <sam0x17> the key quality on the portable is slightly less
<FromGitter> <girng> @rx14 those keycaps have grooves..i like that
<FromGitter> <girng> wtf that red thing in middle lol
<RX14> the red thing is a trackpoint
<FromGitter> <drum445> Trackpoint
<RX14> and what do you mean grooves?
<FromGitter> <sam0x17> we use it as our keyboard for our nvidia shields throughout the house
<FromGitter> <girng> for artists?
<FromGitter> <sam0x17> for everything
<FromGitter> <girng> the keycapes on the sides, it goes up a bit
<FromGitter> <sam0x17> I would replace every touchpad in the world with one if I could
<RX14> i don't use my trackpoint
<FromGitter> <girng> looks like it easier on fingers
<RX14> because i'ma pleb
<FromGitter> <drum445> lol
<FromGitter> <sam0x17> its all about getting the sensitivity right
<FromGitter> <sam0x17> default settings tend to be crazy low
<FromGitter> <sam0x17> so people give up
<FromGitter> <sam0x17> and think its stupid
<FromGitter> <drum445> I use super low sensitivity in general tbh
<FromGitter> <girng> how can that trackpoint thing work if it's so small
<RX14> also mine has acceleration on by default
<RX14> for some reason
<FromGitter> <girng> is there a video of it action?
<RX14> it'd be boring
<RX14> you place your finger on it and push it
<FromGitter> <drum445> pmsl
<RX14> it doesn't move
<FromGitter> <sam0x17> you push your finger in the direction you want
<RX14> it's just force, no movement
<FromGitter> <girng> but you have a mouse...
<FromGitter> <sam0x17> and you don't "rub" it some people think its a touch thing no its more like a joystick
<RX14> @girng people prefer it ebcause you don't have to take your hands off your kweyboard to move the mouse
<FromGitter> <girng> ohhhh
<FromGitter> <sam0x17> best part is you can move the mouse without moving your fingers away from root typing position, which no other input device can do
<FromGitter> <girng> i get it yeah
<FromGitter> <girng> that makes sense
<RX14> getting rid of my numpad to get the mouse closer to the keyboard was a revelation
<FromGitter> <drum445> i7 8550u ⏎ 16GB RAM ⏎ 240GB SSD ⏎ Intel 620 Graphics ⏎ For £800 is pretty good in a laptop yeah? [https://gitter.im/crystal-lang/crystal?at=5ae5b8d762316e0505105960]
<FromGitter> <drum445> I'm still trying to find the perfect keyboard, I never use the keypad so 10key less would be perfect
<RX14> yeah seems OK @drum445
<RX14> what laptop
<FromGitter> <drum445> and ramp up the specs
<FromGitter> <girng> @rx14 actually, that's really cool becausewhen i program, sometimes it does get annoying to move my right hand to my mouse each time i need to go to a new line, or whatever
<FromGitter> <girng> i could c the use case
<RX14> well
<RX14> vim solves that
<RX14> also wtf use arrow keys at least to move lines
<FromGitter> <drum445> Vim is too hardcore for me
<FromGitter> <sam0x17> corsair cherry mx gaming keyboards last for fricking ever and are great
<FromGitter> <drum445> I'll stick to sublime
<FromGitter> <girng> i mean like different line in code
<RX14> yes
<FromGitter> <girng> like if it's all the way up
<RX14> gg
<FromGitter> <girng> if i have a track point im assuming i cna just hold ctrl and move up and it'll scroll
<FromGitter> <girng> that be cool
<FromGitter> <sam0x17> arrow keys require a move too
<RX14> @girng you press that middle button with the blue dots
<FromGitter> <sam0x17> smaller one but noticable
<FromGitter> <drum445> What music do you guys listen to while coding?
<FromGitter> <sam0x17> trance
<RX14> and then you can scroll
<RX14> I like the thinkpad touchpads too though
<RX14> they're pretty good
<RX14> and having the hardware buttons for the trackpoint makes the touchpad better too
<FromGitter> <drum445> agreed
<FromGitter> <sam0x17> trackpoints also phenomenal for scrolling since you can infinite scroll without throwing your hand multiple times in a direction
<FromGitter> <girng> @RX14 what i mean when i say grooves on "keycaps" https://i.gyazo.com/bc3114b3e24c11c4f764ecabc2ac0e48.png
<FromGitter> <drum445> you see the size of the trackpad on the new mbp?
return0e has quit []
<FromGitter> <drum445> bit insane
<FromGitter> <girng> my keycaps on my keyboard are just flat
<FromGitter> <girng> look at those, they go up on the sides
<RX14> thats just a normal chiclet?
<FromGitter> <girng> i kinda want to cancel my orrder n get a chiclet too late w/e
<RX14> @drum445 yeah mac trackpads are still better but thinkpads are perfectly servicable
<RX14> @girng I doubt it
<RX14> i mean i hope not
<RX14> the extra key travel on a mechanical is much better
<FromGitter> <drum445> What keyboard have you ordered @girng ?
<FromGitter> <girng> lol was just gonna post
<oprypin> girng, flat key caps are better if you're used to them
<FromGitter> <girng> 1 sec
<FromGitter> <drum445> @RX14 is right, travel on mechanical is very nice
<RX14> oprypin, what do you mean flat?
<oprypin> not ridged or whatever
<RX14> most keys on real keytboards have depressions in the centre
<RX14> and that's pretty nice
<FromGitter> <sam0x17> the microsoft ergo keyboard is quite good also, but I hate bluetooth keyboards cuz good luck configuring your bios
<FromGitter> <sam0x17> first bios to add bluetooth keyboard support will get a gold star from me
<FromGitter> <drum445> ha yup
<RX14> depends on the adapter
<FromGitter> <drum445> @girng looks solid
<FromGitter> <sam0x17> true
<oprypin> btw i also just got a mechanical keyboard with red switches. honestly i'm disappointed so far, really hard to get used to it after a slim keyboard, and i'm not sure if it'll ever be advantageous
<RX14> some bluetooth keyboard adapters just look to the host like a normal USB hid
<FromGitter> <girng> @drum445 i tried to google the company but itlead me to chinese sites lol no idea but the reviews seem legit
That_Guy_Anon has quit [Read error: Connection reset by peer]
<RX14> @girng it'll probably be fine
That_Guy_Anon has joined #crystal-lang
<RX14> you won't get any support or really a warranty
<FromGitter> <girng> @oprypin omg that's what i have now. i've been using a kensington slim keyboard since 2011
<RX14> but whatever
Ven`` has joined #crystal-lang
<FromGitter> <girng> i love the lowprofile ones
<FromGitter> <sam0x17> do you have prime @girng ?
<FromGitter> <girng> my mom does
<FromGitter> <girng> πŸ˜„
<FromGitter> <sam0x17> oh, well great to order electronics with a prime account since you can send stuff back super easily
<FromGitter> <sam0x17> my husband sends back about 1/3 of all purchases I would say
<FromGitter> <sam0x17> lol
<RX14> oprypin, what do you find hard about it?
<oprypin> RX14, cant feel the actuation, and also if i press it on the edge of the key it's sometimes hard to press it in
<RX14> well
<oprypin> and obviously hitting two keys at once etc
<RX14> 1) because you got reds
<oprypin> yeah lol
<RX14> 2) because you got a bad keyboard?
<oprypin> i dont think so
<FromGitter> <girng> @sam0x17 lol. i bought used bed safety protector (to put on the side of your mattress, to help you prevent from falling off). i originally bought it for my grandma. when the package came, it was missing the strap piece. so i just contacted amazon chat, and they just refunded me the $ and told me to buy a new. i didn't even have to return it, it was like $29.99 or something
<RX14> i mean there's not much difference in actuation force between the middle and sides for me
<FromGitter> <girng> i later gave it to good will
<RX14> actually 2) is probably because reds
<RX14> oprypin, maybe you should send it back for browns or blues
<FromGitter> <girng> actually, funny cause the amazon chat said they would hope that i give it to "Good will" or a charitable organization
<FromGitter> <girng> i was like "sure"
<FromGitter> <sam0x17> haha love when they do that
<RX14> or some tactile but nonclicky switch
<FromGitter> <drum445> Yeah amazon are so big they see it as a worthwhile investment to lose $30 so they don't lose a customer
<FromGitter> <drum445> pretty solid strategy tbh
<FromGitter> <girng> i was watching a video by the CEO bezos. he said he bases his company on"customer obsession"
<FromGitter> <sam0x17> they even changed the UX for returning things, used to be super buried
<FromGitter> <girng> which is whyi think he is successfull
<RX14> clearly not employee obsession though
<FromGitter> <drum445> ha
<FromGitter> <sam0x17> clearly not
<FromGitter> <girng> why they been treating employees bad lately? havn't heard nething
<FromGitter> <sam0x17> since forever
<RX14> lol yeah
<FromGitter> <girng> well guess he's a dick then lol
<FromGitter> <sam0x17> everyone from the engineers to the warehouse people
<RX14> people at the warehouses are treated terribly
<FromGitter> <girng> i was actually going to apply to a warehouse job
<RX14> like their toilet breaks are timed by a machine and it's never enough time
<FromGitter> <girng> the hell
<FromGitter> <sam0x17> so they pee in bottles
<RX14> yes
<FromGitter> <girng> ewww
<FromGitter> <drum445> Can that be true
<FromGitter> <drum445> Pretty sure that's against worker's rights
<FromGitter> <girng> how about women employees?
<FromGitter> <sam0x17> that was the huge headline like last week
<FromGitter> <girng> how do they piss
<RX14> @drum445 of course it is
<FromGitter> <sam0x17> or they don't hire them
<FromGitter> <drum445> Funny how people still think the government has more power than corporations
<FromGitter> <sam0x17> amazon will just pay fines instead of following regulations
<FromGitter> <sam0x17> uber is a more extreme example of that as a company
<FromGitter> <sam0x17> but amazon for many years didn't put hazard stickers on battery shipments and things like that
<FromGitter> <sam0x17> and just paid fines
<FromGitter> <sam0x17> because it was cheaper to pay when they got caught then to change up their entire process
<FromGitter> <sam0x17> *than
<FromGitter> <sherjilozair> I have a bit of a weird question. Say, I wanted to understand the crystal core codebase. Would going back and looking at the codebase at its first commits make sense? That is, understanding it when it was simpler/smaller, and then adding more commits. Does this process make sense? Or should I start off by understanding parts of the current codebase?
<FromGitter> <sam0x17> that actually sounds like a really good idea -- things are going to be different obviously, but you'll understand some high level things that are more subtle when the code base gets huge
rohitpaulk has joined #crystal-lang
<RX14> well
<oprypin> sherjilozair, to me on paper that sounds like a good idea but it's a huge investment of time because then you also basically need to look at every following commit
<RX14> the original codebase was in ruby
<RX14> i honestly don't suggest that
<oprypin> nah
<FromGitter> <sam0x17> ah, never mind then
<FromGitter> <sherjilozair> @RX14 Well, not that far ago. Say, the first 0.01 release or something like that.
<RX14> perhaps
<oprypin> then there's no point
<RX14> but whats the goal?
<RX14> what kind of understanding do you want?
<RX14> I never read the whole stdlib sourcecode
<oprypin> thought process, organic growth - i view those as important
<RX14> I just learned it while trying to solve real problems
<oprypin> it's not about stdlib
<FromGitter> <sherjilozair> @RX14 Mostly to contribute to crystal core. And also to learn more about practicals of compilers. (I've taken courses in school, but that's about it)
<FromGitter> <sam0x17> you should pick up an issue on github and see if you can fix it
<FromGitter> <sam0x17> that's the best way to learn
<FromGitter> <sam0x17> dive in to a problem
<RX14> there's no reason to learn the stdlib or compiler by rote or something, just kinda fix stuff
<FromGitter> <silasb> Hey guys. I'm getting ready to do some testing and find the documentation around testing a bit lacking. Is there any good OSS projects that I can look at for good testing examples?
<FromGitter> <sherjilozair> @RX14 I didn't really I wanna rote memorize it. I just want to get the high level picture.
<Yxhuvud> @sherjilozair: my sggestion would be to find an issue that seems small and fix it, and then gradually work yourself upwards. Though I'd suggest starting in stdlib - it is more approachable and there are more people that knows how the details there.
rohitpaulk has quit [Ping timeout: 248 seconds]
<FromGitter> <sherjilozair> I see. Thanks for all the great advice.
<RX14> @silasb the crystal init should generate a spec scaffold for you
<FromGitter> <sherjilozair> I wish the issues were labelled with something like new-for-beginners, to help people get their hands dirty. Any suggestions for Issues I could look at?
<RX14> and then look at the docs here: https://crystal-lang.org/api/master/Spec.html
<FromGitter> <sherjilozair> @RX14 I see that label, but it seems mostly unused. Those 4 issues are probably even stale.
<RX14> yeah
<RX14> true
<RX14> we just forget :(
<FromGitter> <sherjilozair> @RX14 Do you maybe know of a newer issue that you'd mark it good for beginners?
<RX14> uhh
<FromGitter> <sam0x17> thing is if it's good for beginners someone will fix it really fast prob
<RX14> i mean those are probably still valid
<RX14> @sam0x17 i wish
<FromGitter> <silasb> @RX14, I'm looking for more deeper examples.
<FromGitter> <sam0x17> haha or not
<RX14> @silasb what do you mean deeper
<FromGitter> <silasb> I'm going to check out some of the web frameworks out there and see how they do testing.
<FromGitter> <girng> @silasb is that an alpaca in ur avatar?
<FromGitter> <silasb> @rx14 deeper is wrong. I mean more inspiration. I come from a ruby background so I'm trying to see how crystal programmers structure their tests.
<FromGitter> <silasb> @girng yes.
<RX14> @silasb structure in what way?
<RX14> like apart from the spec handler it's pretty much however you want
<FromGitter> <girng> why are there such good programmers from argentina, that are involved in the open source world?
<FromGitter> <silasb> @RX14 i'm looking for more guidance. I'd prefer to structure my tests in a sane method that follows what other OSS projects are doing.
<RX14> "structure" is so vague though
<FromGitter> <silasb> @RX14 but for how small my project is I might just benefit with some very concentrated tests.
<FromGitter> <silasb> yeah. I'm not doing the best job describing what I'm looking for.
* FromGitter * silasb kick in coffee
<FromGitter> <silasb> @RX14 thanks I'll look at that for inspiration
<FromGitter> <girng> for example, juan Wajnerman and Ary are from Argentina. and others from manastech. however, if you look at the lead developer for the Godot engine (Juan). he isalso from Argentina (and has turned down multiple offers from AAA game companies, so he can stick with Godot).
<RX14> there's good open source devs everywhere
<FromGitter> <girng> im curious about argentina's school system
<FromGitter> <girng> i wonder how it differs from US, and others
<FromGitter> <girng> interesting read: https://en.wikipedia.org/wiki/Education_in_Argentina ima read it
<oprypin> girng, i think you're giving too much thought to a coincidence
<FromGitter> <girng> "One important aspect is that Public universities at Tertiary Education level and at University level are tuition-free and open to anyone."
<FromGitter> <sherjilozair> @girng FWIW, I also felt the same way, but I am also involved in both Crystal and Godot. So, yeah, it might be a cognitive bias.
<FromGitter> <girng> Wow!
<FromGitter> <girng> that's awesome
<FromGitter> <drum445> Ruby syntax, best syntax?
alex`` has quit [Ping timeout: 264 seconds]
<oprypin> no
<FromGitter> <drum445> @oprypin what do you prefer?
<FromGitter> <girng> he prefer's assembly
<FromGitter> <girng> :D
alex`` has joined #crystal-lang
<FromGitter> <drum445> Crikey
<oprypin> significant indents foremost
<FromGitter> <drum445> like Python?
<FromGitter> <girng> @RX14 u are from the UK?
<oprypin> yes
<RX14> yes
<FromGitter> <girng> interesting
<FromGitter> <drum445> Can't say I'm a huge fan of important whitespace
<crystal-gh> [crystal] RX14 closed pull request #5487: Suggest possible solutions to failing requires (master...feature/require-clippy) https://git.io/vbAsi
<FromGitter> <girng> @oprypin
<FromGitter> <drum445> A fellow Brit, excellent
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/vpBk6
<crystal-gh> crystal/master 981c343 Johannes MΓΌller: Add IO::Stapled (#6017)...
<oprypin> girng, it's basically disqualified from any ranking because it's not a general-purpose programming language. if even a programming language at all
<RX14> well
<RX14> its clearly a programming language
<oprypin> RX14, i've been seeing a lot of "* fixup! Add IO::Stapled" in merged commits lately. do you think it's worth cleaning that up?
<RX14> no
<oprypin> i mean not retroactively obviously, but you can delete those when merging
<FromGitter> <drum445> Is the plan for Crystal to allow cross-compiling, similar to Go?
<RX14> maybe i should but i don't
<RX14> @drum445 it alreadysupports cross-compiling
<RX14> but not in the way go does it
<RX14> go's very special
<FromGitter> <girng> @oprypin are u pulling my leg?
<FromGitter> <drum445> So we could potentially compile to windows from Linux in the future?
<FromGitter> <drum445> I imagine after Windows support is ironed out
<oprypin> dependign on the definition, you can already do that
<FromGitter> <drum445> what's the command sir?
<FromGitter> <drum445> Says I need a LLVM Target Triple
<RX14> you can compile
<RX14> but you can't link
<RX14> go's special because it doesn't link to any C libs by default
<FromGitter> <drum445> so what would be the command to compile a .exe from linux?
<FromGitter> <girng> go
<RX14> because they have google resources available to literally reinvent the wheel
<RX14> @drum445 you can't
<FromGitter> <drum445> will we be able to in the future?
<RX14> probably not
<RX14> as I said, go rewrote 30 years of work from scratch
<RX14> using their force of will as google
<RX14> just to make this possible
<RX14> crystal can't do that
<RX14> crystal needs to reuse external components like llvm, libc, libpcre, etc to build on top of
<RX14> go can only cross-compile to a finished executable because they throw EVERYTHING out and rewrite it in go
<FromGitter> <girng> how is GoLang compared toCrystal for tcp servers?
rohitpaulk has joined #crystal-lang
<RX14> you can hack together a cross-compile environment probably using some scripts
<RX14> and then link in that
<RX14> but thats a more involved process than i'd be willing to go through in irc
<RX14> or even suggest someone did
<oprypin> Wine is pretty good though lol
<oprypin> the only actual valid use case
<RX14> nah
<RX14> wine's cool
<RX14> i run worms armegeddon in it
<RX14> and it runs great
<FromGitter> <drum445> ha
rohitpaulk has quit [Ping timeout: 265 seconds]
<FromGitter> <girng> @drum445 whatever is mainstream. im really loving Ariana Grande - No Tears Left To Cry
<FromGitter> <girng> however, for long programming sessions,i usually just put on this (https://www.youtube.com/watch?v=6g4dkBF5anU) Cisco's elevator musicisfreaking epic!
<FromGitter> <bararchy> @asterite in on the war path haha, my Crystal inbox is 100 mails
<FromGitter> <girng> in fact, that song has somuch nostalgia attached to it, I remember listening to that while code php back in 09 :D
<FromGitter> <bararchy> RX14 go has their on linker?
hmans has joined #crystal-lang
<FromGitter> <girng> i tried golang, but got arthritis from their syntax
<FromGitter> <girng> my left pinky is broken from using shift all the time, pretty pathetic actually
<FromGitter> <girng> and it doesn't increase readability at all IMHO, it decreases it
<RX14> @bararchy yeah lol
<RX14> go is entirely self contained
<RX14> you could compile any go application that doesn't use cgo with just the go executable and an empty filesystem
<FromGitter> <girng> in fact, i'm actually rpoetty happy that Crystal forces non-capitalization for method names, made it much easier to read all my game functions. and, also, made it much more expressive to what i writing.for example: instead of HandleGameJoin or something, i'd write handle_game_join, which is easier to read.
<RX14> go is it's own little blast from the past rob pike plan9 world sitting on your linux system
<FromGitter> <bararchy> RX14 lol, Google can do pretty much anything
<RX14> all it takes is rob pike and a lot of money
<FromGitter> <drum445> I've been using go for just over a year
<FromGitter> <picatz> RX14, I laughed way too hard at that. ❀️
<FromGitter> <drum445> Switched over a few performance dependent things over to it at work
<FromGitter> <drum445> Much prefer writing Crystal though. Actually I prefer writing Crystal over anything atm
<FromGitter> <girng> @drum445 same here
<FromGitter> <girng> i can't go back to javascript, php or anything now. i always just think well, i'd rather just do it in crystal
<FromGitter> <drum445> yup, oh christ when I have to look at a php microservice on our stack I want to cry
<FromGitter> <sherjilozair> So @oprypin, you've given up on Nim. I see that you're not maintaining your Nim libraries any more. If I may ask, why?
<travis-ci> crystal-lang/crystal#db0dc67 (master - Suggest possible solutions to failing requires (#5487)): The build was broken. https://travis-ci.org/crystal-lang/crystal/builds/372677709
<DeBot> https://github.com/crystal-lang/crystal/pull/5487 (Suggest possible solutions to failing requires)
<travis-ci> crystal-lang/crystal#981c343 (master - Add IO::Stapled (#6017)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/372678179
<FromGitter> <sherjilozair> I meant the first as a question.
<FromGitter> <girng> @drum445 i use php for a forum. fluxbb.org. but that's it. i was originally writing my game server in a PHP WebSocket based client back in 2015 but stopped
<FromGitter> <girng> then,i went to nodejs. but stopped in 2017,nowiconvert to crystal
<FromGitter> <faustinoaq> I still have some clients with projects made with PHP and Visual Basic πŸ˜…
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <drum445> We've got some VB hanging around still lol
<FromGitter> <girng> oh hey @faustinoaq long time no see how u been
<FromGitter> <faustinoaq> I guess I should crystalize them someday πŸ˜‰
<FromGitter> <girng> havn't seen u in a while what u been doing
<FromGitter> <faustinoaq> Collegue πŸ˜…
<FromGitter> <faustinoaq> *College
<FromGitter> <girng> i graduate from college, a community one πŸ˜‚
<FromGitter> <girng> Highsschool 2.0 :D
<FromGitter> <girng> i want university, but damn expensive!!!
<FromGitter> <girng> that's why i found that argentina's educational system is much better
<FromGitter> <sherjilozair> Is there any concept of a default value for types in crystal? I want to instantiate an array like so: `Array(T).new(10, T.default)`.
Ven`` has joined #crystal-lang
<FromGitter> <faustinoaq> @girng Can u apply for some scholarship?
<FromGitter> <faustinoaq> I applied for two scholarships here in Panama and my college is almost free
<FromGitter> <girng> @faustinoaq im just going to be blunt with you
<FromGitter> <girng> im too retarded to be applying to scholarships, and i don't feel like its appropiate for me to waste/take up time and use a slot of someone who is smarter to have
<FromGitter> <girng> not fair for others =]
<FromGitter> <faustinoaq> Hehe, well, I'm not the smarter in my class, I guess here in Panama the government gives scholarships to everybody πŸ˜…
hightower3 has joined #crystal-lang
<FromGitter> <faustinoaq> So, I think to apply for some scholarship in the future to study in some foreign country
<FromGitter> <girng> free college there?
<FromGitter> <faustinoaq> Well, not free but very cheap πŸ˜…
<FromGitter> <girng> how many more years u have before graduation?
<FromGitter> <faustinoaq> 2 years I guess
hightower2 has quit [Ping timeout: 240 seconds]
<oprypin> sherjilozair, there is no concept of default value. you can just hope that in some cases T.new will be some kind of sensible default. See also: `Float64.zero` (or any numeric type .zero)
<oprypin> sherjilozair, i gave up on Nim because it's complexity and bugs far outweigh the innovation
<oprypin> its* /hides in shame
<FromGitter> <sherjilozair> @op
<FromGitter> <sherjilozair> @oprypin Like the fact that it still doesn't have proper destructors?
<oprypin> well i've been pretty mad about that, yeah, but they probably have a good enough reason for it
<oprypin> crystal doesnt have proper destructors either
<FromGitter> <girng> is that bcz it uses boehm'c gc toclean up memory automatically?
<oprypin> gc in general
<FromGitter> <sherjilozair> What's your biggest gripe with Nim?
<oprypin> hard to say. one thing that comes to mind is when you use `UInt*` or `*Int64` you basically keep run into arbitrary missing methods for it. ran into it when i tried to make my code generic towards numeric types
<oprypin> that could've been fixed for all i know
<FromGitter> <girng> their types have their own methods?
<FromGitter> <girng> how does that work
<FromGitter> <sherjilozair> Crystal doesn't have the same problems? Does it have more innovation or lower complexity in comparison?
<oprypin> both
<FromGitter> <sherjilozair> Also, do you see more "potential" in Crystal? That is, are you comparing the imaginary Crystal 1.0 with the imaginary Nim 1.0 or are you comparing them as of today?
<oprypin> sherjilozair, heh well first of all i'm comparing nim as of a few years ago xD
<oprypin> current state, though, supposedly
<oprypin> i mean lately there have been enough scares regarding uncertainty of crystal's future / 1.0 so that kind of comparison could realistically go the other way
<FromGitter> <sherjilozair> @oprypin What scares are you talking about? I've been out of the loop.
<oprypin> for `innovation / bugs` crystal is going to stay on top of nim for the foreseeable future
<oprypin> sherjilozair, it all boils down to the main author of Crystal not being so excited about the language anymore
<hmans> oprypin: is that the case?
<hmans> (relatively new to Crystal)
<FromGitter> <sherjilozair> And what are his reasons for that?
<oprypin> curiosity towards features from functional programming, and difficulty of modifying Crystal's compiler
<hmans> Meh.
<FromGitter> <girng> imo, he has raised the bar too high (because he wants to transcend crystal into something greater), albeit, not realizing how much it does and how awesome it is for us regular people.
<oprypin> maybe
<FromGitter> <sherjilozair> So the second reason is regarding the current implementation of Crystal's idea, and the first seems to be regarding the idea itself.
<FromGitter> <girng> that's my take on it nayway from what i've read , but i could be wrong.
<FromGitter> <girng> i just hope nothing happens cuz this is a great community and great language
<FromGitter> <sherjilozair> Yeah, at first glance, this seems crazy to me. Crystal has one of the best tradeoffs between ease-of-use and performance. It's already the best language under certain criteria. So this attitude doesn't make sense to me.
<oprypin> right
<FromGitter> <sherjilozair> Was anything learnt about the idea that suggests that Crystal is a bad idea?
<oprypin> incremental compilation and dynamic linking are not possible
<FromGitter> <sherjilozair> I see. Incremental compilation is kind of a biggie for large projects, yeah.
<FromGitter> <girng> would an incremental compilation make running `crystal app.cr` stuff faster?
<hmans> Just curious, are these solved problems for something like Go?
<oprypin> girng, it would make compiling faster the 2nd time
<FromGitter> <sherjilozair> I guess dynamic linking is possible, but would require going against other fundamental principles of Crystal?
<FromGitter> <girng> so it's like when i compile godot with scons
<oprypin> hmans, they dont have the innovations that present the difficulty in doing so
<FromGitter> <girng> the first time takes 5 minute, then the second time it takes 10 seconds
<oprypin> sherjilozair, kinda, yeah
<hmans> oprypin: I see
<FromGitter> <sherjilozair> @oprypin Could you elaborate a bit on "features from functional programming"? Does Ari want to add more functional features to Crystal and is finding it hard to (and thus considering doing a new functional language)? It's not related to dynamic linking and incremental compilation, right?
<FromGitter> <girng> @oprypin if i were to upgrade from my i7 2600, to a 8700k or something. would `crystal MasterServer.cr` speed up from 5 seconds to something slower maybe?? (right now it takes about 5 seconds. it used to take 1-2)
<FromGitter> <valamorgon> when I install crystal on arch linux I got following error:
<FromGitter> <valamorgon> crystal: error while loading shared libraries: libLLVM-5.0.so: cannot open shared object file: No such file or directory
<FromGitter> <sherjilozair> @oprypin Lack of incremental compiler may be a big deal if companies are considering it as a replacement for C++/C#/Java and the likes. But it doesn't matter if they're replacing their Python and Ruby with Crystal.
<oprypin> valamorgon, well that's pretty bad. how are you installing it though?
<FromGitter> <valamorgon> @oprypin I installed pacman -S crystal
<FromGitter> <valamorgon> then I installed pacman -S shards
<FromGitter> <valamorgon> /usr/lib/libLLVM-4.0.1.so ⏎ /usr/lib/libLLVM-4.0.so ⏎ /usr/lib/libLLVM.so
<FromGitter> <valamorgon> I got these
<oprypin> girng, i dont know, obviously faster processor does things quickly Β―\_(ツ)_/Β―
<FromGitter> <valamorgon> but I dont have livvm 5
<FromGitter> <valamorgon> on ubuntu it worked without any issue
<FromGitter> <valamorgon> but on arch not works
<FromGitter> <girng> @oprypin i was just wondering if it would be worth an upgrade. was thinking of getting the 8400 :P
<oprypin> valamorgon, crystal depends on llvm-libs which contains usr/lib/libLLVM-6.0.0.so
<oprypin> valamorgon, maybe you just havent updated your system in a long time
<FromGitter> <girng> but i mean, this i7 2600i got off ebay for $80 bucks.. it's god damn nice CPU!
<FromGitter> <valamorgon> it was actually obvious right @oprypin, gonna sudo pacman -Syyu
<hmans> Grah. Now you all got me worried about Crystal's future.
<hmans> I was just getting used to it.
<oprypin> crystal is all about the present :|
kurko_ has joined #crystal-lang
<FromGitter> <drum445> what IDE do you guys use in general?
<FromGitter> <drum445> Sublime keeps crashing on me for some reason
<FromGitter> <valamorgon> now it works fine but I also had to get latest dev version
<FromGitter> <valamorgon> @drum445 I use visual studio code
<oprypin> no IDE
<FromGitter> <sherjilozair> @drum445 I use vscode. Works well.
<FromGitter> <drum445> I prefer simple editors really, what do you use @oprypin ?
<FromGitter> <drum445> VSCode is solid though
<FromGitter> <picatz> Vim 4 life #editorwars πŸ’
<oprypin> use whatever you normally use. Kate for me
<FromGitter> <sherjilozair> vscode is pretty simple. It's not like visual studio.
<FromGitter> <drum445> you use kate for all languages?
<oprypin> except c++
<oprypin> well even c++ most of the time
<FromGitter> <drum445> fair enough, @sherjilozair you ever used atom
<FromGitter> <drum445> ?
<FromGitter> <sherjilozair> @oprypin Isn't the incremental compilation/dynamic linking issue solved by requiring public methods of a class be typed? That's all that's needed right? User can go crazy on private method and local variables, but has to specify public method types if they want incremental compilation.
<FromGitter> <sherjilozair> @drum445 Yes. I used it before vscode. I found vscode faster, and never looked back.
<oprypin> sherjilozair, that is the main problem, but there's more. there was a recent comment but would be hard to find it
<FromGitter> <j8r> open to review https://github.com/crystal-community/hardware/pull/11 :-)
<FromGitter> <j8r> Not that easy to calculate CPU utilization, specially when we have one hundreds of PIDs :-/
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 256 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
<crystal-gh> [crystal] asterite closed pull request #4201: Colorize: remove Colorize::Object#inspect (master...fix/colorize/remove-inspect) https://git.io/vSqDD
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <bararchy> @j8r Damn nice work! i'll take a long look at it ASAP
<FromGitter> <bararchy> How can I insert arrayA to arrayB in specific point? ⏎ ⏎ ```a = [1,2,3,4] ⏎ b = [5,6,7,8] ⏎ ⏎ a.magic(1, b) ⏎ a => [1,5,6,7,8,2,3,4]``` [https://gitter.im/crystal-lang/crystal?at=5ae5e4401388b2df210f038a]
<FromGitter> <bararchy> I guess something like `concat_at`
<FromGitter> <bararchy> ```# Got it :) ⏎ a = [1,2,3,4] ⏎ b = [5,6,7,8] ⏎ a[1, 1] = b ⏎ a``` [https://gitter.im/crystal-lang/crystal?at=5ae5e6a16d7e07082b47fcb4]
<FromGitter> <drum445> ^^
<FromGitter> <girng> niceone
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kurko_ has joined #crystal-lang
<FromGitter> <girng> @oprypin what's your fav language after crystal?
Ven`` has joined #crystal-lang
<FromGitter> <drum445> I know you didn't ask, but Python/Go for me :)
<FromGitter> <girng> is there a python style language that has performance of a statically typed language?
woodruffw has quit [Ping timeout: 264 seconds]
kurko_ has quit [Ping timeout: 240 seconds]
<FromGitter> <girng> like, for example crystal has ruby like syntax but much faster
<FromGitter> <girng> is there a python equivalent?
<FromGitter> <drum445> Not that I have used, maybe Iron Python
<FromGitter> <r00ster91> theres cython
<FromGitter> <girng> i've alwaysliked python but i alwys heard it was slow, not good for game servers
<FromGitter> <girng> cython? i'll check it out thanks!
<FromGitter> <girng> wait wtf
<FromGitter> <girng> cython transpiles your code into native C?
<FromGitter> <girng> how does that work
<FromGitter> <drum445> Yeah it's prob not great for games
<FromGitter> <girng> im watching this (https://www.youtube.com/watch?v=mXuEoqK4bEc) video now
<FromGitter> <drum445> When I'm messing about on a server I often find python useful
<FromGitter> <drum445> Some of our microservices are written in Py also
<FromGitter> <drum445> Yeah I used to watch so much of that dude when I was starting out
<FromGitter> <girng> i really like python the gdscript language is very similar toit
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
woodruffw has joined #crystal-lang
<FromGitter> <girng> and it's the same thing used on client side for a game
<FromGitter> <drum445> It's solid, although like we were talking about before, I don't really like important indentation
<FromGitter> <drum445> so no {} or end
<FromGitter> <girng> but i mean im not complaining about crystal's syntax at all, im just saying i like python syntax too xD
<FromGitter> <girng> ya indentation based right?
<FromGitter> <drum445> r
<FromGitter> <drum445> Supposed to make it more readable, I find it makes it less so
<FromGitter> <girng> rofl really im total opposite :O
<FromGitter> <girng> we all diff i guiess hahaha
<FromGitter> <drum445> indeed sir
<FromGitter> <drum445> I do love Python though, don't get me wrong
<FromGitter> <girng> why here (https://youtu.be/mXuEoqK4bEc?t=424) i timestamped it, he has to import all that stuff
kurko_ has joined #crystal-lang
<FromGitter> <girng> oh the cythonize is cython im guessing herp derp
<FromGitter> <girng> my bad
kurko_ has quit [Ping timeout: 256 seconds]
<FromGitter> <bararchy> Python is like "import magic from here" Error! Don't mix spaces and tabs, Error! You have 1 space here but 2 there, Error! It might look OK to you but indent again because copy paste from web didn't work
<FromGitter> <drum445> yup
<dom96> Why would compiling to C not be great for games? :)
<FromGitter> <drum445> especailly when working in a team
<FromGitter> <drum445> some cretin will use 2 spaces the other will use 4
<FromGitter> <drum445> let the fight begin
<FromGitter> <bararchy> @drum445 the dreaded tabs v.s spaces
<FromGitter> <bararchy> Oh no
<FromGitter> <girng> ok so how in the hell does pointers and memory allocations work in cython!??!
<FromGitter> <bararchy> Then 4 v.s 2
<FromGitter> <j8r> I was to be in the indentation team, but using blocks is more easy to work an **adds features*
<FromGitter> <drum445> @bararchy indeed, wars have been started over less
<FromGitter> <girng> u have to manage memory yourself??
<FromGitter> <girng> does memory get returned to OS?
<dom96> girng: you asked if there is a Python-equivalent to Crystal, that is Nim: https://nim-lang.org
<FromGitter> <bararchy> @girng I guess same as rubinuious ?
<FromGitter> <girng> @dom96 oh i se that. opyrin was talking about it
<FromGitter> <girng> @j8r interesting..
<FromGitter> <girng> wait, what the heck is the diff between Cython and CPython?
<FromGitter> <drum445> @girng time to bail
<FromGitter> <girng> lol
<FromGitter> <bararchy> LOL
<FromGitter> <girng> i just noticed it
<FromGitter> <r00ster91> cpython seems to be an interpreter
<FromGitter> <r00ster91> not a compiler
<FromGitter> <girng> this is too much.. going back to crystal
<FromGitter> <j8r> there is also pypy, Python interpreter written in Python
<FromGitter> <j8r> http://pypy.org/
<FromGitter> <bararchy> @girng there is no really point for you as a rubiest to use python as it doesn't really give you anything beyond what you get by just using Ruby
<FromGitter> <bararchy> Except if your goal is "use python"
<FromGitter> <girng> @bararchy yah, i was jjjust curious about it but now i realize im wasting my time
<FromGitter> <girng> when i have crystal lol
<FromGitter> <girng> iuno i always like to just look at other languages, just to see. but i always come back to nodejs (now, i come back to crystal)
<FromGitter> <fridgerator> Python also has a large amount of scientific and mathematical libraries
<FromGitter> <fridgerator> That ruby doesn't
<FromGitter> <girng> you know what language i really liked
<FromGitter> <fridgerator> i.e. scipy, numpy
<FromGitter> <girng> JuliaLang
<FromGitter> <j8r> The problem I have with Python and Ruby for System Scripting is they are really tied to the system: I can't bring my own latest Python 3.7 to the ancient Debian / CentOS 5 lying arounf
<Vexatos> ~~did someone mention julia???~~
<FromGitter> <girng> yah im on their gitter too. but havn't posted cuz been w/ crystal haahah
<Vexatos> The julia gitter is not that interesting of a place
<Vexatos> considering most gets done on discourse
<FromGitter> <j8r> RTV: What's the best system language in your opinion? (excpet Shell/Awk :-D)
<FromGitter> <j8r> *scripting
<FromGitter> <girng> discourse? u mean discord?
<FromGitter> <girng> oh, forum
<FromGitter> <bararchy> @fridgerator Ruby has sci-ruby and has binding to any scientific lib you need
<Vexatos> I mean you can use python or ruby for science if you enjoy wating two additional weeks for your code to process
<FromGitter> <girng> ROFL
<Vexatos> waiting* even
<FromGitter> <fridgerator> @bararchy πŸ‘
<oprypin> dom96, Nim has superficial similarities to Python in syntax but is otherwise farther from it than Crystal / cc @girng
<FromGitter> <bararchy> Vexatos that's not really true, both languages bind highload to C/C++ libs
<Vexatos> If you care about getting solutions before you die, FORTRAN, MATLAB and Julia are practically all you have right now, and of those, only two are not pieces of garbage that crash half the time you try to use them
<dom96> oprypin: How so?
<Vexatos> @bararchy that doesn't make them easier to use
<Vexatos> and the python/ruby part you write itself still is slow
<FromGitter> <fridgerator> I was just checking out Wren lang yesterday, looks kind of cool
<Vexatos> If your simple ruby function has to run trillions of times you will notice
<oprypin> dom96, mainly because the type system in Crystal can be used as if it's dynamic typing in many cases
<FromGitter> <girng> https://nim-lang.org/docs/net.html wow their tcp server is very minimal like crystal's
<FromGitter> <j8r> that's not an issue Vexatos for scripting: calling computational C/C++ functions
<oprypin> and the standard library feeling etc
<FromGitter> <girng> but crystal's run in their own fiber, this doens't
<FromGitter> <j8r> like Tensorflow does
<Vexatos> python in particular is also absolutely painful to write
<FromGitter> <fridgerator> ^^
<FromGitter> <fridgerator> I hate python
<Vexatos> the language itself is fine, but as soon as you start getting into numpy and the likes
<Vexatos> just... no
<oprypin> so don't get into those, lol
<oprypin> girng, anyhow, yes, Python is my 2nd favorite language. maybe 1st depending on definition
<FromGitter> <girng> @dom96 async is their version of"fibers"?
<dom96> girng: sure, they achieve the same thing
<FromGitter> <girng> definitely not what async await means in nodejs.. rofl!!
<Vexatos> meanwhile, MATLAB is still an unstable and expensive piece of garbage, so your sane options are Julia and FORTRAN, and that really depends on your use case
<oprypin> girng, it actually is the same async await as far as i know
<Vexatos> Two extremes of scientific languages, really
<FromGitter> <girng> o
<Vexatos> crystal could be pretty cool with science libraries, if anyone bothers
<FromGitter> <girng> `var clients {.threadvar.}: seq[AsyncSocket]` wtf kind of syntax is that
<FromGitter> <girng> {.variable.}
<FromGitter> <girng> i don't understand
<FromGitter> <girng> dot notation = property of a class..
<dom96> It's a pragma
<dom96> Only needed there to support parallelism
<FromGitter> <girng> multiple cores?
<dom96> yes
<FromGitter> <girng> not just async 1 core? wtf
<FromGitter> <girng> how that possible
<dom96> async offers concurrency
<FromGitter> <girng> but the clients variable is shared between processes?
<dom96> you can get parallelism via other means in Nim
<oprypin> girng, this is the opposite of sharing actually
<FromGitter> <bararchy> Vexatos you forgat R
<dom96> but if you want to get parallelism your global variables need to be marked with {.threadvar.} to make them thread-local
<Vexatos> R is specifically good for statistical computing
<FromGitter> <girng> so that nim TCP chat server example is not only asynchronous, but runs on all cores on server? O_O
<Vexatos> It does not have the library for general scientific computing
<oprypin> has anyone talked about Crystal here today? :o
<Vexatos> it is pretty good at what it can do though
<dom96> girng: It doesn't. The threadlocal pragma is there to prepare it for that though :)
<Vexatos> oprypin, does crystallography count?
<FromGitter> <bararchy> Anyway, python is right now the defacto scientific language, TensorFlow and Torch have full support only with Python, even C API lacks most functions
<FromGitter> <girng> @oprypin we need more Elixir! :D
<Vexatos> @bararchy Only because julia is fairly new and FORTRAN is old :P
<FromGitter> <girng> @dom96 interesting, thx
<FromGitter> <bararchy> True :) let's hope we can push Crystal to be relevant in the field of science
<Vexatos> and what I mean by scientific computing is less computer science and more natural science, by the way >_<
<Vexatos> Sorry if that wasn't clear
<FromGitter> <girng> i love they have a `runForever` method lol
<FromGitter> <bararchy> Oh, natural science, like biology and stuff ?
<dom96> girng: :D
<FromGitter> <bararchy> I have 0 idea regard that haha
<FromGitter> <sherjilozair> This thread has a tonne of misinformation about Python. Python is awesome for scientific computing. And cpython just refers to the default python interpreter. pypy is not python implemented in python. It's python with JIT compilation, and thus much faster than cpython, but not as stable/mature.
<Vexatos> @bararchy theorectical physics and chemistry
<Vexatos> where calculations actually takes weeks
<FromGitter> <girng> @sherjilozair GDScript is getting JIT compilation soon, tgoing to be epic
<FromGitter> <bararchy> JM.
<Vexatos> @sherjilozair it is absolutely painful to write
<Vexatos> You have no idea how happy I was when I discovered Julia
<FromGitter> <sherjilozair> And python does tonnes of things better than Ruby. It's the #4 language right now, much more popular than ruby. You should do Python if you want to do scientific computing. Julia, R, etc are also good, but Python has more scope, and can do more things than these scientific-compute-only languages.
<FromGitter> <bararchy> Vexatos but its fine, because there are 2 people in CERN that actually understand the output
<Vexatos> @bararchy exactly
<FromGitter> <sherjilozair> A lot of people find writing Python much easier than writing Julia, etc., so that's opinion territory.
<dom96> IIRC Julia has a pretty strange module system
<Vexatos> @sherjilozair julia is still a general-purpose language, python might be easier to write on its own but any science package I have had to deal with was just an absolute pain
<FromGitter> <sherjilozair> I would guess you didn't really spend any significant time writing Python to have concluded that Julia is easier than Python/numpy/scipy/matplitlib/tensorflow/list goes on.
<Vexatos> I spent long enough to start hating it
<FromGitter> <sherjilozair> What were you trying to use it for?
<Vexatos> in this case, crystallography
<FromGitter> <bararchy> Yeha , TensorFlow in python is crazy , tf.compute.load.test.matrix(panda.from.CSV))
<FromGitter> <bararchy> And then you get Error! Only supported on python 2
<FromGitter> <bararchy> XD
<Vexatos> As I said, python the language is perfectly fine, I am talking specifically about scientific packages, they just... ugh
<FromGitter> <girng> @vexatos should have used RUST
<dom96> Scientific computing in Python is ok, getting the dependencies is a bit tough and some packages depend on global state a bit too much, but otherwise it's good.
<Vexatos> It shows that they have to work around a language that wasn't designed for it
<FromGitter> <fridgerator> R is slowly taking over Python, at least in the environmental sciences area
<Vexatos> Saying that python is the #1 language in scientific computing is a statement with no meaning because the only reason it is is that it is
<Vexatos> it is the #1 language because people write packages for it and people write packages for it because it is the #1 language
<Vexatos> it doesn't mean it is the best language
<FromGitter> <bararchy> "Most popular"
<Vexatos> R, Julia, FORTRAN are all -way- better
<FromGitter> <sherjilozair> Oh sure. I agree.
<Vexatos> You don't lose your sanity writing the code
<FromGitter> <sherjilozair> I'd have loved a compiled language like Crystal to be the language for scientific computing.
<Vexatos> and it is a lot more intuitive
<FromGitter> <girng> any TCP server examples in FORTRAN?
<Vexatos> yea, crystal has the syntactic features that would allow it to be really nice for science
<FromGitter> <sherjilozair> But I do disagree that writing python requires losing sanity or that it's unintuitive. I think your experience doesn't really generalize.
<Vexatos> the only compiled language for science right now is FORTRAN and, well, as good as it is, it's a language from the 1950s
<FromGitter> <sherjilozair> Yeah, and that's coz science requires prototyping. This is why Python wins hard.
<Vexatos> @sherjilozair _specifically for science_, when dealing with packages that have to try too hard to work around python's limitations
<FromGitter> <sherjilozair> It's extremely easy to stop mid-way in a conversation with a colleague, and code something up in an ipython terminal and check results.
<Vexatos> python as a general-purpose language is absolutely fine and sane to write
<Vexatos> I know too well why it is so popular
<FromGitter> <sherjilozair> I am referring to its use for science.
<FromGitter> <girng> holy: http://aea.web.psi.ch/Urs_Rohrer/MyWeb/sample2.htm actually not bad lmao
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Vexatos> People started writing science packages for python because it was so popular as a general-purpose language
<Vexatos> because everyone already knew it
<FromGitter> <sherjilozair> @girng R is the modern FORTRAN. If you're interested you should look at it.
<FromGitter> <sherjilozair> Well I guess R and/or Julia.
<FromGitter> <girng> R have garbage collection?
<oprypin> sherjilozair, that's the worst description you could give to a language
<FromGitter> <sherjilozair> lol
<Vexatos> R is specializing in statistics
<Vexatos> statistical computing*
<FromGitter> <sherjilozair> "People who used to do fortran now use R or Julia" is wath I meant.
<Vexatos> that is not wrong
<FromGitter> <j8r> That's like saying "you should try Crystal, a more modern Cobol" πŸ˜†
<Vexatos> Julia is a modern-looking language that happens to be designed with scientific and numerical computing in mind, that's why I like it so much. It feels like a sane modern language while still being good for the things I need it to be good at
<Vexatos> Crystal could go the same way it it happens to get the attention of more scientists
<Vexatos> It definitely has the capability
<Vexatos> I would be quite interested in that, to be honest
<FromGitter> <sherjilozair> Yeah. Me too. I think the core group would have to specifically cater to them though.
<Vexatos> Julia is doing just that and it's working very well right now
<FromGitter> <girng> nvm i was thinking of D, not R
<Vexatos> Crystal wants to be a general-purpose language though
<Vexatos> Julia is, too, but Julia has a big stdlib for number crunching
<Vexatos> Crystal won't have that :P
<FromGitter> <sherjilozair> It doesn't need to have it in the stdlib. Numpy/scipy aren't.
<oprypin> in #python people say "stdlib is where libraries go to die"
<Vexatos> Python is the counter-example though
<Vexatos> scipy is putting science in a language most definitely not made for it
<oprypin> it's good for a language not to be made for it
<FromGitter> <sherjilozair> ^
<Vexatos> but some things just look like the package has to actively fight against the language
<Vexatos> by creating ugly wrappers and boilerplate
<oprypin> yeah well try making the equivalent in java
<Vexatos> Hah
<Vexatos> yea no
<Vexatos> that's be about the same
<FromGitter> <sherjilozair> Yeah, I think Python can also be described as the anti-Java.
<oprypin> they have a surprising amount of similarity
<FromGitter> <sherjilozair> By being a language far from Java, it becomes a good language for science.
<FromGitter> <sherjilozair> As I said, rapid prototyping.
<Vexatos> neither python nor Java are good for science
<Vexatos> The _only_ reason science for python exists at all is that it is "that one language everyone knows anyway"
<oprypin> it's all up to the libraries
<oprypin> what makes them not good, really? insufficient syntax sugar?
<FromGitter> <drum445> I am not a fan of Java lol
<FromGitter> <sherjilozair> insufficient syntax sugar + unintuitive APIs.
<Vexatos> julia and matlab are nice because you write them like you write maths
<FromGitter> <drum445> sums it up nicely
<FromGitter> <sherjilozair> Python allows you to guess what the API would be. You need to use it a few times, and you can pretty much guess how other functions would behave.
<Vexatos> matlab is expensive and crashes randomly in my experience so that's out of the picture
<FromGitter> <sherjilozair> Numpy is probably one of the best designed APIs. And you can easily guess what a function would be called, what arguments it would take, what it would return. No surprises.
<FromGitter> <sherjilozair> Of course this doesn't work always. But it does often.
<Vexatos> Python's libraries have almost no coherent style so every library works differently
<Vexatos> and it's just painful to use something like numpy with python's limited syntax
<FromGitter> <sherjilozair> @Vexatos I feel like we're not even talking about the same language. :D
<Vexatos> @sherjilozair everything nice you say about python, julia has as well
<FromGitter> <girng> python has damaged him, eternally
<Vexatos> yea
<FromGitter> <drum445> You think Python has limited syntax?
<Vexatos> I do.
<FromGitter> <drum445> How so?
<FromGitter> <girng> just like how nodejs damaged me
<Vexatos> Compared to languages like crystal and julia
<Vexatos> @drum445 I'd like to define my own numerical type, and numerical operations for it
<FromGitter> <girng> we will grow stronger because of it
<Vexatos> in python, I'd have to jump through some very narrow hoops to get that done
<FromGitter> <drum445> That is fair, but the use case for that should be very rare. If it is a common occurrence it is being used wrong
That_Guy_Anon has quit [Quit: Leaving]
<FromGitter> <sherjilozair> Yeah Python's not really meant to be used for metaprogramming kinda stuff.
<FromGitter> <drum445> Indeed
<Vexatos> That is a very good way to sum it up
<Vexatos> python's lack of metaprogramming can hurt
<Vexatos> if you write your own methods
<FromGitter> <drum445> Tools for the job mate
<Vexatos> instead of just using others
<FromGitter> <drum445> One language can't serve all use cases
<Vexatos> yea
<Vexatos> I happily use python for things that don't require me to mess with scipy or numpy :I
<FromGitter> <drum445> @girng You are language hopping like crazy lol. Nail common concepts and the syntax of a new language will be the easy bit
<oprypin> hopefully that was a joke tho
<FromGitter> <girng> @drum445 lol im just looking at all of em. im very deep in crystal im not leaving dun worry
<FromGitter> <sherjilozair> I think ogling at languages is fine, as long as you don't keep changing your project from one to another.
<FromGitter> <drum445> ha good lad
<FromGitter> <drum445> @sherjilozair +1
<FromGitter> <drum445> That's how I found Crystal in the first place
<FromGitter> <girng> @sherjilozair yeah. only thing i've done is convert my game server to crystal. im not doing any more conversions, bcz waste of time.i found my home
<FromGitter> <drum445> :)
<FromGitter> <sherjilozair> Crystal is pretty much perfect for your usecase.
<FromGitter> <j8r> I can't find the type of `%w(test)` in macros, `ArrayLiteral`?
<FromGitter> <girng> @sherjilozair yep, intertwines with godot engine beautifully. really is a perfect match
<FromGitter> <girng> more game developers should use it for a server
<oprypin> >> {{%w(test).class}}
<DeBot> oprypin: undefined macro method 'ArrayLiteral#class' - https://carc.in/#/r/3yyq
<FromGitter> <sherjilozair> I think more people should use it even for client. I'm learning it partly to get a good high-level game framework going using SFML.
<oprypin> uhhhh that's not right but you got your answer anyway
<FromGitter> <bararchy> Crystal, the new home for Game-Dev, Science and web-frameworks
<FromGitter> <bararchy> Hahah
<FromGitter> <sherjilozair> :D
<FromGitter> <girng> @sherjilozair yeah, good point
<oprypin> sherjilozair, using sfml is one thing but i dont think basing a game framework on it is a good idea
<FromGitter> <girng> @sherjilozair u should ditch SFMl and use Godot =]
<FromGitter> <girng> speed your productivity 1000%
<FromGitter> <sherjilozair> @oprypin Why do you think so? SFML's too high-level?
<oprypin> the main disadvantages are it uses legacy opengl everywhere, and it's complicated to use a c++ lib in crystal
<FromGitter> <girng> And it works nativelyon linux, ifyou are a linux user :)
<FromGitter> <girng> im sorry need new keyboad my space broken hard topress
<FromGitter> <sherjilozair> @oprypin So you suggest building on top of SDL directly?
<oprypin> maybe, i dunno
<FromGitter> <sherjilozair> @oprypin Not sure how the C++ point applies because we do have CSFML (you know that ofc).
<oprypin> csfml really just makes things harder
<FromGitter> <girng> @sherjilozair What kind of game are you creating?
<FromGitter> <sherjilozair> I don't really know of any other low-level alternatives apart from SDL. I wouldn't know how to open a window if I can't use SFML or SDL.
<FromGitter> <sherjilozair> @girng 2d platformers. Like Celeste.
<FromGitter> <girng> 2d? Dude, use Godot it's perfect for that
<oprypin> sherjilozair, lol just do it
<FromGitter> <girng> 3d not so much
<FromGitter> <sherjilozair> @oprypin just do what? β­•
<oprypin> use sfml or whatever
<oprypin> most of my life i've been thinking, damn if only i had a nice game framework in a nice language, i'd make an awesome game
<FromGitter> <sherjilozair> :D
<oprypin> no, turns out i just cant make a game for the life of me
<FromGitter> <sherjilozair> Well I'm not about to design some big 3d engine. Just a simple ECS-based 2d engine.
<FromGitter> <girng> @oprypin GDScript paired with Godot fixes all that
<FromGitter> <sherjilozair> And I don't want to solve the low-level issues; that's why I picked SFML.
<oprypin> sherjilozair, sure. so just use it and make a game
<FromGitter> <sherjilozair> I'm just envisioning a thin wrapper over SFML which makes it a bit easier.
<FromGitter> <sherjilozair> Yeah, gotcha.
<FromGitter> <sherjilozair> @girng I don't like stateful IDEs. That is, I want all the state of my project to be in files I can see all the time and modify.
<FromGitter> <sherjilozair> That's why Godot is not for me right now. It's also pretty buggy.
<oprypin> girng, i don't even need to come up with an example why i would never use GDScript. you said it yourself - cant use msgpack or whatever else
<FromGitter> <girng> LOL i got no other option bro
<FromGitter> <sherjilozair> @girng Oh, and try using a couple of RigidBody2Ds and your in-engine game would stutter.
<FromGitter> <sherjilozair> That costed me this LudumDare pretty much. Couldn't submit because couldn't develop with that stutter.
<FromGitter> <sherjilozair> I'm using CrSFML now, and quite happy with it. The language does give me some hiccups, but those are just errors on my part mostly.
<oprypin> sherjilozair, oh yeah and if you try to use chipmunk with sfml, you're in a world of hurt, where each of them wants a different Rectangle object, a different coordinate system, etc
<FromGitter> <girng> Yes, game only works smooth with KinematicBody's that are updated in _process. Any physic stuff modified in *physics*process will cause jitter on 60hz or above monitors
<FromGitter> <girng> there are countless issues about it devs don't seem to take it serious
<FromGitter> <girng> so i understand
<FromGitter> <j8r> In JS I was using Phasez.js, was fine
<FromGitter> <sherjilozair> @oprypin Yeah I know about that. I'm not going to use any Physics. Platformers need cartoon physics anyway.
<FromGitter> <j8r> *Phaser
<FromGitter> <sherjilozair> @girng That's what drives me crazy. They are trying so hard to be a 3D engine, when they should jsut focus on the 2D stuff imo, and get that easy thing right.
<FromGitter> <girng> @sherjilozair rofl took words right out of my mouth wtf
<FromGitter> <sherjilozair> They'll pretty much never overtake Unity in 3D.
<FromGitter> <girng> LOL IKR
<oprypin> girng, btw using c# in godot seems like the more tempting option
<FromGitter> <sherjilozair> The 2D engine scene is very bad right now, with the death of XNA. MonoGame was a temporary home, but the XNA folks are now using Unity and trying to make 2D games with Unity, or just shifting to Unity 3D. It's a sad state of affairs.
<FromGitter> <sherjilozair> @oprypin It doesn't have full support yet. Doesn't export to binaries yet.
<FromGitter> <sherjilozair> So you can't participate in game jams with it, etc.
<oprypin> sherjilozair, you could call XNA "stable" :p
<FromGitter> <sherjilozair> XNA is much more stable than what we have now. :|
<oprypin> there's a big scene of completely replacing it with equivalent open source components
<FromGitter> <sherjilozair> Yeah, that's MonoGame, and it's still primarily used in windows, and this using it on non-windows is hard, because devs don't care, community doesn't care.
kurko_ has joined #crystal-lang
<FromGitter> <sherjilozair> And yeah, it has the IDE issue. You need the IDE pretty much to work with it.
<Vexatos> well, FNA exists
<oprypin> thats the one
<FromGitter> <sherjilozair> Not saying support doesn't exist, just that it's not reliable.
<Vexatos> I happen to know that Celeste uses it on its linux and mac versions
<Vexatos> and XNA on windows
<FromGitter> <sherjilozair> Yeah, but Celeste was started 3 years ago or something.
<FromGitter> <sherjilozair> They didn't choose to do it. They had no choice but to use it. The devs are now using Unity for their next game.
<Vexatos> heh
<Vexatos> I am not sure about that
<FromGitter> <sherjilozair> The XNA crowd stayed around MonoGame/FNA fir a bit, and now will probably be consumed by Unity.
<oprypin> whats so bad about it?
<FromGitter> <sherjilozair> Unity is bad at 2D.
<oprypin> whats so bad about FNA?
<FromGitter> <girng> luckily, my game uses kinematicbody for movement and doesn't depend on rigidbody stuff. If it did though, I would be screwed (stutter would happen). Only way that I found to make the game not jitter with KinematicBody physics: Is if you update `move_and_slide` method in `_process`, with a delta. It's funny because the `move_and_slide` method says that you're not supposed to use a delta because it multiples the
<FromGitter> ... value internally, but if you don't, movement won't be the same on different monitor rates. That's another issue, but the lead developer on the github says they trying to get a higher refresh rate monitor to test the stuff. Which still hasn't been fixed yet. Now after reading your issue about Ludum Dare, and you mentioned ... [https://gitter.im/crystal-lang/crystal?at=5ae60d67dad6fb186ffc6ba0]
<FromGitter> <sherjilozair> @oprypin I haven't really used FNA to be able to say what's specifically bad about it. From an outsider's view, it doesn't look like something that will survive. It doesn't have documentation for beginners, etc. Only people who have XNA expertise would use FNA.
<FromGitter> <girng> And I'm not even sure if that's the "correct way" to do it. I just do what works smoothly on all monitor rates. And character movement speed must be the same as well. Because right now if you use `move_and_slide` and don't use a delta (docs say you don't have to). Test your game on 144hz, or 60hz and you'll see your character won't end up at the same spot in the same amount of time (not good). But if you do
<FromGitter> ... multiple by a delta it's the same movement
<FromGitter> <sherjilozair> There was a huge community around XNA partly because of the MSFT backing, because of the promise that this library would improve, and that it's a good idea to invest in XNA skills. FNA doesn't have that. It's a small project, and newcomers won't pick it over Unity or other more promising engines.
<FromGitter> <sherjilozair> @girng huh, that's weird. I'll try and see if that improves things. But yeah, I was very disappointed by this. Made me feel, there would be other such bugs, and possibly bugs which are not even visible or occur rarely. I got so angry at Godot, promised myself I'll never use alpha projects again. But here I am using Crystal. :D
<FromGitter> <girng> @sherjilozair Sad thing is. If you depend on RigidBodies for like let's say you're making a pool / bowling game. The physics have a fixed timestep (60fps). So, if a 144hz user plays your game there will be extreme stutter. There is no way they added to remedy this (even if you use a delta). It's kind of pathetic, actually
<FromGitter> <sherjilozair> Actually, I think I was using KinematicBody, not RigidBody.
<FromGitter> <sherjilozair> And even that has this stutter. I'm on a macos though, so maybe that's part of the cause.
<FromGitter> <girng> If you're just doing a KinematicBody, update that character in `_process` with move_and_slide (with a delta). And you should be fine. If you're not using a build from 2 months ago or so, you'll need to update the viewport manually using `get_canvas_transform()` right below your character movement code. If you're using a recent Godot 3.0 build, you can use the Camera2D node (and don't need to manually update
<FromGitter> ... viewport camera). They JUST FINALLY made it so the Camera updates via process time not physics time.
<oprypin> RX14, i was surprised to see that crystal master cannot compile a basic program for Windows (or I'm using it wrong)
<oprypin> `crystal build snakes.cr --cross-compile --target x86_64-pc-windows-msvc --no-debug`
<oprypin> `in crystal/src/crystal/system/win32/file_descriptor.cr:1: while requiring "file/stat": can't find file 'file/stat'`
<RX14> yes
<RX14> thats correct
<RX14> file support hasnt been merged yet
<RX14> or idk
<RX14> nobody uses it
<RX14> it's not really even ready
<oprypin> RX14, it's `puts "hello world"`
<RX14> oh yeah
<oprypin> RX14, crsfml programs could very well use it
<RX14> i see what I broke
<RX14> oh well
<oprypin> RX14, could you reference the commit where you broke it?
<RX14> it was when we removed File::Stat
<RX14> just use the windows branch on my fork oprypin
<RX14> that'll get you working stuff
<oprypin> 96bcc34afbcf23d50823aaecb0c12b6eed0f8fac~ seems to almost work,
<oprypin> except `error LNK2019: unresolved external symbol SystemFunction036 referenced in function .2A.Crystal.3A..3A.System.3A..3A.Random.3A..3A.random_bytes.3C.Slice.28.UInt8.29..3E..3A.Nil`
<oprypin> should be solvable by adding more libs
<oprypin> yes, Advapi32
<FromGitter> <r00ster91> why can I not exit a macro output with ctrl + c?
<FromGitter> <r00ster91> im hanging in this loop now. Crystal is giving me this whole macro output and I cant quit with ctrl+c
<oprypin> r00ster91, seems like crystal is in an infinite loop and has no time to handle the ctrl+c signal
<oprypin> you can kill the process externally
<FromGitter> <r00ster91> oh
<oprypin> start with ctrl+z
<oprypin> you get a process id which you can then kill -9
<oprypin> wait actually you dont
<FromGitter> <r00ster91> ctrl+z isnt doing anything at me
<oprypin> well that sucks
<FromGitter> <girng> rofl
<FromGitter> <girng> pk'd by crystal macro
<oprypin> updated https://pryp.in/blog/23/how-to-build-video-games-for-windows-using-crystal.html to use the main Crystal repo instead of a fork
<oprypin> that's nice :)
<oprypin> (that the progress on the main repo is comparable)
<oprypin> it's slightly surprising that it *must* have secure random (advapi32.lib) - wouldn't the code get optimized out?
<oprypin> cc @sherjilozair, if you're interested in good news about sfml :p
<FromGitter> <sherjilozair> Cool! @oprypin I'll try making a tool which can automate all this, i.e. generate binaries for all 3 platforms. Probably closer to when I actually need to publish.
<FromGitter> <drum445> If I could build an exe from linux it would be a dream come true lol
kurko__ has joined #crystal-lang
kurko_ has quit [Ping timeout: 264 seconds]
<FromGitter> <girng> @oprypin very cool thnks for sharing
<FromGitter> <girng> didn't know crystal had smfl bindings
<oprypin> really?
<FromGitter> <girng> really really
<FromGitter> <girng> very cool
<FromGitter> <girng> one thing i struggle in game development is the math part. i mean, i am truly terrible at math. all i really know are vectors. x and y, and how to move a vector towards another vector using cos and sin. but anything beyond that, i get lost lol
<FromGitter> <r00ster91> same
<oprypin> im good at 2d, terrible at 3d
<FromGitter> <girng> yah i can't even get into 3d i tried with godot but i just don't understand it
<FromGitter> <girng> my brain doesn't grasp the concept ofit iuno wtf is wrong with me.
<FromGitter> <Blacksmoke16> 3D is basically 2D with extra steps...
* FromGitter * Blacksmoke16 sees if anyone gets his reference
<FromGitter> <j8r> was working on https://github.com/j8r/clicr - open to review, specially people that have already used CLI Builders
<FromGitter> <j8r> I need to add some of my projects to https://github.com/veelenga/awesome-crystal though, this latest on `#cli-builders`
<FromGitter> <j8r> and of course `crystal-community/hardware` that has been built by @bararchy and me
<FromGitter> <j8r> I was reaching the point to think about how generating macros with macros :-o
MoskitoHero has joined #crystal-lang
MoskitoHero has quit [Quit: Leaving]
Nathanaelle has quit [Ping timeout: 248 seconds]
Nathanaelle has joined #crystal-lang
Nathanaelle has quit [Ping timeout: 256 seconds]