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> 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>
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>
<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>
<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>
<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?
<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
<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
<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
<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?
<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
<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>
<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>
<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>
<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
<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.
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?
<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
<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
<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>
`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>
(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
<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