ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.1 | 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
_whitelogger has joined #crystal-lang
maxpert has joined #crystal-lang
maxpert has quit [Ping timeout: 240 seconds]
chamar has joined #crystal-lang
<FromGitter> <codenoid> is it stil possible ? : ) , https://s26.postimg.org/lreyi3l3t/Screen_Shot_2017-08-30_at_08.06.37.png
snsei has joined #crystal-lang
chamar has quit [Read error: Connection reset by peer]
snsei has quit [Ping timeout: 246 seconds]
<FromGitter> <codenoid> but for me, everytime is the time for crystal, <3
<FromGitter> <johnjansen> ok anyone know where the sprintf like format a number nicely as text like docs / method lives? ⏎ I apologise in advance if it turns out to be in an obvious place that ive overlooked / manlooked
<FromGitter> <johnjansen> scratch that .. it was in an obvious place that i had overlooked … top level namespace
<FromGitter> <cevarief> Hi All...
<FromGitter> <picatz> 👋
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 252 seconds]
maxpert has joined #crystal-lang
<FromGitter> <wwselleck> okay help me out here, so I'm trying to wrap my head around blocks and their benefits. One of the articles I'm reading shows this as an example ⏎ ⏎ `````` [https://gitter.im/crystal-lang/crystal?at=59a633b5210ac26920d69409]
<FromGitter> <wwselleck> With the block version, you have to know about the internals of the wrap_in_tags method.
<FromGitter> <ltran> Hmmm well
<FromGitter> <ltran> u defer the implemntation to the caller
<FromGitter> <ltran> Example: ⏎ ⏎ ```def wrap_it(tag, text)``` [https://gitter.im/crystal-lang/crystal?at=59a63437c101bc4e3a6e9401]
<FromGitter> <ltran> omg i cant type =) 1 sec going to type in vim
maxpert has quit [Ping timeout: 248 seconds]
<FromGitter> <picatz> I find blocks especially useful for essentially scoping the logic for the available methods one can use within the given block. The example you shared, I'd argue, doesn't have a tone of benefits being in a block -- from what I can tell / know.
<FromGitter> <picatz> You can also capture blocks ( the code within them ) as Procs and then `.call` them later which allows for some neat stuff. You can capture a Proc in a block and then have it run later, or in a different Fiber/Thread or something when you `.call` it.
<FromGitter> <ltran> sorry, xfinity cust called but, i have this example might help a bit. hope it helps, https://play.crystal-lang.org/#/r/2mf0
<FromGitter> <picatz> Freak'n xfinity asking how your service doing.
<FromGitter> <ltran> their site is broken for a year on my account. :\
<FromGitter> <picatz> Xfinity does the silliest things from my opinion.
<FromGitter> <picatz> Like, the amount of trouble I've had with them over the years has gotten *worse*.
<FromGitter> <picatz> Silly technical problems too; and some security concerns.
<FromGitter> <ltran> @wwselleck did that answer your question?
<FromGitter> <ltran> renamed the method and added comments since looking at it, method name looked confusing, https://play.crystal-lang.org/#/r/2mf1
<FromGitter> <wwselleck> @ltran looking now!
<FromGitter> <picatz> @wwselleck I also put together this lil thing for 'ya, maybe it'll help as well ( or not 😅 ) : https://play.crystal-lang.org/#/r/2mf2
<FromGitter> <wwselleck> they both helped, thanks! with more experience i'll get the hang out it, it's just a big paradigm shift from node/python
<FromGitter> <picatz> 👍 Fo'shizzle, I'm sure you will!
<FromGitter> <ltran> you will use this a lot, https://crystal-lang.org/api/0.23.1/Indexable.html#each%28%26block%29-instance-method
<FromGitter> <johnjansen> @wwselleck this is another take on the same idea ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a63df5162adb6d2e4ad9da]
<FromGitter> <johnjansen> not that i would recommend benchmarking code like this mind you
<FromGitter> <picatz> Pretty slick though.
<FromGitter> <ltran> we have a monotonic clock in crystal?
<FromGitter> <picatz> I don't believe that's been sorted out yet ( could be wrong ).
<FromGitter> <ltran> ah okay thanks. im been out of the loop for a while with crystal, been writing Go :D
<FromGitter> <johnjansen> one thing to note, blocks are expanded at compile time, if you Procs are runtime (from memory)
<FromGitter> <johnjansen> you can achieve similar things with both
<FromGitter> <picatz> @johnjansen care to elaborate a bit for me?
<FromGitter> <picatz> I believe you and all that. Just not entirely sure what you mean.
<FromGitter> <johnjansen> wish i could, its been a while since i went down that rabbit hole …
<FromGitter> <picatz> No worries 👍
<FromGitter> <johnjansen> you could not for instance call `timer` above, from `timer`
<FromGitter> <ltran> bed time for me, have fun with the language, everyones' great here ;)
<FromGitter> <johnjansen> with some mucking around (like getting your head clear and all that) you could implement something with the same net effect using Procs (from my fuzzy memory)
<FromGitter> <johnjansen> yep, im out too .. night all
<FromGitter> <picatz> Aww.
<FromGitter> <picatz> I was gunna ask ya' about this.
<FromGitter> <picatz> ✌️ Night though
<FromGitter> <johnjansen> yeah, thats not the same though …
<FromGitter> <picatz> I'm probs just confused.
<FromGitter> <johnjansen> you would not be able to ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a64044ee5c9a4c5f139e42]
<FromGitter> <picatz> Oh, ok.
<FromGitter> <picatz> That makes sense.
<FromGitter> <picatz> I think.
<FromGitter> <johnjansen> ruby will let you do that, but then its not compiled
<FromGitter> <picatz> Sorry from preventing you from going to bed lol :P
<FromGitter> <johnjansen> no problem … it only took a minute
<FromGitter> <johnjansen> night
<FromGitter> <picatz> 👋 I'ma peace out too. Night.
<FromGitter> <wwselleck> how big a deal is this slow compiler business?
maxpert has joined #crystal-lang
maxpert has quit [Ping timeout: 248 seconds]
DTZUZO has quit [Ping timeout: 255 seconds]
snsei has joined #crystal-lang
<FromGitter> <cevarief> Is it recommended to free up memory manually using GC.free() ?
_tsound has quit [Ping timeout: 246 seconds]
<txdv> @cevarief usually you call GC.free in from within any language in moments where you know that the introduced lags won't affect your system too much
<txdv> a simple web application can live with a delay ... but if you have a game engine and you for example change the map, that is a good moment to collect some garbage
snsei has quit [Remote host closed the connection]
<FromGitter> <cevarief> @txdv thank you.
<crystal-gh> [crystal] icyleaf opened pull request #4898: correct and use simple sample in FormData::Builder doc (master...fix-variable-name-in-formdata-builder-comment) https://git.io/v5ch1
<FromGitter> <icyleaf> please anyone know why it throws exception?
<FromGitter> <icyleaf> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a65c7c66c1c7c477f7173a]
mark_66 has joined #crystal-lang
tdc has joined #crystal-lang
<FromGitter> <cevarief> When a module extended in a class, how to get the parent class and instantiate it? https://play.crystal-lang.org/#/r/2mg9
snsei has joined #crystal-lang
maxpert has joined #crystal-lang
<Groogy> Morning!
<Groogy> @cevarief wouldn't just self.new() just work?
<FromGitter> <crisward> @johnjansen more like 120min, but still needs a lot of work. As a proof of concept, not bad. I have to quote a lot for other devs and my rule of thumb is take what they say, convince them of all the things that can go wrong, give them another guess then x3. Saying that, I'm sure @bararchy can write crystal quicker than me. It'd take me 40 mins just to scan through all the RFC.
<FromGitter> <crisward> Think is may be a good idea to follow ruby's std lib api if possible. At the very least it'll make my docs a copy and paste job.
maxpert has quit [Ping timeout: 240 seconds]
<FromGitter> <bararchy> @crisward I wouldnt say I'm faster, I took SMTP which is a more "simple" protocol, 120 min for a cool client is awsome !
<FromGitter> <bararchy> can you share the repo ?
<FromGitter> <bararchy> if it's opensource
<FromGitter> <marin117> Hi guys
<FromGitter> <marin117> I wrote a C function and now I want to call it in Crystal
<FromGitter> <marin117> How can I do it?
<FromGitter> <bew> @bararchy he shared it some hours before https://github.com/crisward/imap
<FromGitter> <bararchy> Oh, thanks @bew
<FromGitter> <marin117> this is my code (sorry for uploading it twice)
<FromGitter> <marin117> and it is unclear to me how complier know what I want to call?
<FromGitter> <crisward> @bararchy at best it's proof of concept, needs work. Could be my evening project this week.
<FromGitter> <marin117> Oh, never mind I got it
<FromGitter> <bararchy> @crisward I saw the code, it's a great start TBH ⏎ Now that we have IMAP, SMTP and QT, someone should create a mail client ;)
<FromGitter> <bararchy> btw, I'm trying to get back to this project: https://github.com/bararchy/servo , I may add imap now that you working on that @crisward
<FromGitter> <sdogruyol> Morning everyone
<FromGitter> <bararchy> Morning @sdogruyol :)
<Groogy> Morning!
<txdv> hmmmmm
<txdv> mail implementation
<txdv> the most annoying of annoyances
<FromGitter> <crisward> @bararchy That looks like an ambitious project, good luck... You're more than welcome to use anything I can get working. At lot seems possible with IMAP, I'll implement as much as I can, but I may only end up doing read-only stuff as that's all I need. But I'll happily accept pull requests for anything. Also need to work out testing, most of the stuff seem to involve parsing output, so I could do with
<FromGitter> ... generating lots of standard imap responses. Will have to see what they have in the ruby lib.
hightower4 has joined #crystal-lang
hightower3 has quit [Ping timeout: 240 seconds]
maxpert has joined #crystal-lang
<FromGitter> <sdogruyol> Morning @bararchy @Groogy
maxpert has quit [Ping timeout: 246 seconds]
alex`` has joined #crystal-lang
livcd has joined #crystal-lang
bmcginty has quit [Ping timeout: 252 seconds]
bmcginty has joined #crystal-lang
tdc has quit [Read error: Connection reset by peer]
tdc has joined #crystal-lang
ShalokShalom_ has joined #crystal-lang
ShalokShalom has quit [Ping timeout: 248 seconds]
<FromGitter> <veelenga> @crisward just announced your IMAP library https://crystal-ann.com/=n5WrX 😏
<FromGitter> <bararchy> Cool
<Groogy> wuut?
<FromGitter> <sdogruyol> 👍
<FromGitter> <sdogruyol> Just a quick reminder 2017 State of Crystal Survey is still up and waiting for your response :) https://docs.google.com/forms/d/e/1FAIpQLSeDXN0jZJFgXHUZXOBsOtKlWxXV9XxtCURmFz8xx5V0FWfJZg/viewform
DTZUZO has joined #crystal-lang
<vegai> darn, cannot remember if I answered that already
<FromGitter> <sdogruyol> @vegai I think you can check that with your Google account
<vegai> ah, good
<vegai> hmm
<Groogy> crystal doesn't have any fixed point implementation right?
<FromGitter> <sdogruyol> @Groogy nope, as far as i know
<Groogy> there done
<FromGitter> <sdogruyol> thanks @Groogy
<vegai> Groogy: I have a PR open for BigDecimal
<vegai> if that's the same thing as you're talking about
<Groogy> Big decimal can't have .001 or something right?
<Groogy> Fixed point is just that the divider on hte value is a constant
<Groogy> like by a thousand
<vegai> yes, it can
<vegai> crystal already has BigInt, BigRational and BigFloat in the stdlib
<vegai> BigInt is probably what you were thinking just now
<Groogy> no I mean
<Groogy> it's a structure that has the operations like a Floating point
<Groogy> but the point is not floating, its fixed
<vegai> oh ok. Slightly different yes
<Groogy> size has nothing to do with it
<FromGitter> <bararchy> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a69d619acddb2407e44f73]
<vegai> when is a fixed point useful, then?
<Groogy> we use it to ensure numbers over network between two computers always behave the same
<vegai> ok
<Groogy> we don't get for instance floating point imprecisions in the FPU etc since its handled by the ARU
<Groogy> which can cause two clients to go out of sync in our games
<Groogy> on one computer the floating point got rounded to 0.000002 while in another it became 0.000003
<vegai> yeap
<Papierkorb> vegai: Also, especially when it comes to money/currency values. *Never ever* use a float for that.
<vegai> Papierkorb: that's exactly what I'm implementing the BigDecimal for, actually :)
<Papierkorb> Bitcoin does it in their JSON-RPC API. It's awful.
<Papierkorb> Well I simply use Int64 for that
<vegai> and limit your wealth to a mere (2**64)/2? :P
<Papierkorb> I even used it for Bitcoin. Still more than big enough number space.
<Groogy> Isn't like 9,223,372,036,854,775,808 the wealth of the entire world?
<Papierkorb> It's not like I wrote software to handle Blackrocks' books
<Groogy> nine quintillion feels like it should be able to represent literally anything
<vegai> perhaps Int64 would be good enough, yes, but I feel uneasy with that
<vegai> dunno why
<vegai> I heard that "don't use floats for money" thing quite a lot of things too
<Papierkorb> Well a fixed point type is useful for more than money
<vegai> and in fact worked in a financial company at my last place
<vegai> and was agonized over that fact that every money type was a float
<Papierkorb> Well that's awful
<vegai> sometimes even so horrible that it was truncated in middle of a calculation
<Papierkorb> Floating points start to lose data even for small currency values quite quickly, the two-digits-after-comma suffice for a cent here or there
<vegai> people care so very little about doing things correctly
<vegai> except exactly when it makes their thing break
<Papierkorb> Yea I never got that sentiment.
<vegai> it's just so cheap
<vegai> I mean. Engineers who build bridges do things correctly, because if they don't, people die
<vegai> most of the programmers... if they do things almost correctly, the worst that can happen is some hotfixes
<FromGitter> <bew> But then for what kindof stuff Float should be used?
<vegai> computer graphics comes to mind
<vegai> floats are done in the cpu these days, no?
<vegai> so they're very fast and you don't care about the precision that much
<Groogy> Floats can be used whenever you want high range but it doesn't need to be accurate
<Papierkorb> a floating Co-processor has been part of x86 for long, it's actually integrated "nowadays"
<vegai> <oldman> I remember when it was a Thing that the CPU had an FPU </oldman> :P
<Groogy> well you still have the floating point registers etc.
<Papierkorb> vegai: That sentiment is exactly what's wrong. I hate it so much, yet I see it everyday. I worked for a telephony company, and later for a company where the software controlled those big electronic devices for small "power plants" (wind energy, etc.). Neither cared.
<Papierkorb> "Oh you couldn't call emergency services cause our back-end failed to route? Sucks to be you" - Never heard that in reality, but gosh I feared that day
<Papierkorb> "Oh a transformator exploded cause our software didn't check properly, killing workers? Sucks to be you" - Never happened either. Apparently, those in electronics take proper precautions. But damn.
<FromGitter> <bararchy> Papierkorb Check my link :)
<Papierkorb> Ah don't worry. You'd just hear "but we don't program weapons" or something like that
<vegai> Papierkorb: no disagreements
<livcd> vegai: construction companies and "developers" would have a word with you :-)
<vegai> oh? :)
<livcd> there's lot of buildings ond other objects out there that will eventually collapse due to poor design, cutting costs and so on
<livcd> nothing uncommon
<vegai> ah, right. Yes.
<vegai> that is quite odd as well :)
<vegai> I've been in construction work as a younger lad, I know what you mean
<vegai> still, I think bridges get built rather well typically
<livcd> well looks like it
<vegai> perhaps a bit sadly, but it's just a case of the financial people knowing their calculations
<vegai> then again, doing things correctly is often just as cheap as doing it badly
<vegai> so I don't know
<livcd> maybe the definition of correctly is too vague
<livcd> i know number of cases where plane could not land because /sapdata1 was full
<vegai> auch
<vegai> well, we're already in a world where malicious incompetence can get you a prison sentence (Volkswagen)
<vegai> perhaps it'll be generalized to just incompetence in the future :)
<Groogy> problem is also the lack of programmers
<livcd> overengineer and so called AI or whatnot
<Groogy> I think EU as a whole is net missing half a million programmers? (Based of estimates on projections on the workforce)
<livcd> ing*
<Groogy> which means every single person counts so there is no competition on the workforce market really for Programmers
<vegai> I've heard that said many times, but somehow my salary isn't rising
<livcd> Groogy: that's not true
<vegai> which is why I'm a bit skeptical about it
<Groogy> Lol the price of your labour is whatever you agreed to
<Groogy> the best oppertunity to negotiate that price is when you get hired
<vegai> indeed. Perhaps I hit my ceiling years ago
<vegai> or perhaps that figure is just bullshit employers spout out in order to get cheaper labour :P
<Groogy> I mean my salary has increased 1.6x since I got hired here
<Groogy> which is 4 years now
<livcd> eu software industry is too tied to the "real" industries (aka trading and making physical goods). Trading virtual goods and services and paying for the middle man is not that common in europe
<Groogy> no it is the opposite, that number means there's more competition to get labour meaning labour is more expensive
<livcd> hence the software industry is really devalued in Europe
<Groogy> also it is a negotiation, you have to push for it and be good at it for it to increase, obviously the company will try and keep it as low as possible while the employee would wnat it as high as possible
<Papierkorb> Groogy: The EU, or at least Germany, isn't missing personel. There are just many companies wanting to go el cheapo. Their trade organisation tells this tale of there not being enough developers, but by their definition, we don't have enough if for any open job posting there are less than 10 applications.
<livcd> well taxation is high and social security in EU makes it tough for companies to scale
<Papierkorb> Social security is one of the reason I'm not even considering immigrating to the US :)
<livcd> (meaning it's hard to "fail" :-))
<Groogy> Eh it's not a tale, it is actual statistics which is also why we have groups pushing for more women programmers
<Groogy> because we essentially need to find more people wanting to go and become it
<Groogy> and looking at least in Sweden, there is A LOT of jobs for programmers available
<Papierkorb> Taxes and social security isn't the issue. The government is just too stupid to realize that for a big IT sector, you need good internet access, and also better financial backing.
<livcd> Groogy: if there would be shortage as in "we desperately need these people" they would import them from Asia
<Groogy> Well we do
<Groogy> I am a union representative and my union asked me why we hired so many non-swedes
<Groogy> and it is literally because there isn't enough
<livcd> yes but you do not need them
<livcd> it's just
<livcd> "nice to have"
<Groogy> we do have a bias in picking a swede over an american, but sometime we just have to bite the bullet
<Papierkorb> Well to expand you may need more workers I guess...
<Groogy> Eh what you mean "we don't need them"
<Groogy> if there is a job offer for it then we need it?
FromGitter has quit [*.net *.split]
early has quit [*.net *.split]
go|dfish has quit [*.net *.split]
daemonwrangler has quit [*.net *.split]
jokke has quit [*.net *.split]
p0p0pr37 has quit [*.net *.split]
txdv has quit [*.net *.split]
ome has quit [*.net *.split]
jeromegn has quit [*.net *.split]
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ is now known as p0p0pr37
txdv has joined #crystal-lang
<livcd> need -> you throw money at the problem
<Papierkorb> From my POV, every IT company needs more people. Even if they don't have open job postings. Some don't even know they needed something specific.
go|dfish has joined #crystal-lang
<Groogy> you are thinking we are hiring people to try and fit a time table that is unreasonable?
<Papierkorb> Groogy: Me or liv?
<Groogy> livcd
<livcd> these estimations are not based on real data the yare just assumptions "we need XY"
<Groogy> Sometimes you just simply need more people for things livcd :P At least in game companies. As projects grow and you do more stuff you need more people to do different things
<livcd> Groogy: oooh....game companies
early has joined #crystal-lang
<Groogy> You can also apply the same with companies like Spotify I guess
<livcd> are not the game companies the worst "IT" employers in the world ? they hire a lot for a project but fire a lot of people fast and early as they see fit
salvor has quit [Ping timeout: 240 seconds]
<Groogy> yeah? But i live in Sweden ;D
<Groogy> Where it's a bit more reasonable
<livcd> Groogy: Spotify is burning a lot of money because they have very thing (non existent?) margins ?
<livcd> thin*
daemonwrangler has joined #crystal-lang
<Groogy> what kind of margins?
salvor has joined #crystal-lang
<livcd> the fraction of revenue that's left after paying expenses ?
<Groogy> oh the EBIT
<Groogy> thought you meant time margins
<Groogy> I mean their work page at least in Sweden is recruiting like for literally everything
<Groogy> also some jobtitles that sound very madeupish
<Groogy> activation here being a buzzword for "getting people to use our products"
<Groogy> and don't see how a technical director would be part of that?
ome has joined #crystal-lang
<livcd> Groogy: it makes very little sense to move for this jobs even if you are from lets say Ukraine
<livcd> for these*
FromGitter has joined #crystal-lang
jeromegn has joined #crystal-lang
jokke has joined #crystal-lang
<Groogy> why? We have people moving from other continents to work for us?
<livcd> but apparently not that many
<Groogy> yes? Like I said my workers union was wondering why we were not hiring Swedes
<livcd> because it is financially not appealing to work in Sweden if you get 40k pa in Prague and have an apartment and friends there
<FromGitter> <sdogruyol> Well
<FromGitter> <sdogruyol> I've had enough with local company bs
<FromGitter> <sdogruyol> Switching to remote from now on
<Groogy> eh
<FromGitter> <rumenzu> hello everyone
<Groogy> 40k czech crowns would not be a good salary here
<livcd> sorry i was thinking in euros
<Groogy> if you get 40k euros
<Groogy> nothing can beat that
<Groogy> holy fucking shit
<livcd> per anum
<Groogy> oh
<livcd> that's what pa meant
<livcd> :D
<livcd> not sure but i assumed you would be familiar with that ? we usually use sum/pa
<Groogy> That would be mid-level programmer salary at our company
<Groogy> nah in Sweden you usually talk per month
<FromGitter> <bararchy> Also in IL it's per month
<livcd> sorry then
<Groogy> Also want to point out that salaries are notorious of being low in the gaming industry
<FromGitter> <rumenzu> can someone explain to me what is the difference between BigFloat and the BigDecimal PR? both provides arbitrary-precision for floating-point numbers right?
<Papierkorb> rumenzu, BigDecimal is not floating point, it's fixed point
<Groogy> and getting ~3k € a month in Stockholm is mid-level programmer range
<Groogy> in the game industry
<livcd> well thousands of other issues
<FromGitter> <rumenzu> Papierkorb: got it, thanks!
<FromGitter> <bararchy> Groogy, yeha, that's kinda low here too
<Groogy> where do you live?
<FromGitter> <bararchy> Israel
<livcd> but Israel...
<Papierkorb> As far I hear, salaries in Germany are so-so too.
<livcd> i paid 50euros for 2 meals that would cost 18e
<livcd> even in Singapore
<Groogy> prices are however inflated in Stockholm I'll give you that
<Groogy> so not really good to just compare salaries
<FromGitter> <bararchy> Yeha that's true
<Groogy> in order to get somewhere to live, you have to buy an appartment here, or live on second hand contracts that are shade af
<Groogy> shady*
<livcd> exactly
<Groogy> so pretty much everyone in Stockholm are in debt
<livcd> it's easier for me to buy an apartment in asia than in Europe...and less expensive
<FromGitter> <bararchy> I was in Bazel for a few days, I ate for 35Euro a meal
<FromGitter> <bararchy> crazy
<livcd> So I am not moving anywhere in Europe...even if i would get twice as much
<FromGitter> <bararchy> livcd looking to move to a new location ?
<Groogy> no we were talking about recruitment of programmers
<Groogy> and how there is a huge hole of the need of programmers in EU at the moment
<Groogy> i.e more jobs for programmers are being created than we are making programmers
<livcd> that's your assumption :-)
<FromGitter> <bararchy> Oh I see, for us it's really then 2nd most common job I think, maybe more general "High tech"
<Groogy> No that's not an assumption
<livcd> bararchy yeah but IL is a special case :-)
<FromGitter> <bararchy> Yeha that's true, not much else to do here hahah
<livcd> i loved IL
<livcd> can imagine living there
<FromGitter> <bararchy> You where here ?
<Groogy> US department of labor has a projection on 15-20% growth over the coming years for instance
<livcd> more than anywhere in Europe actually
<livcd> yes Tel Aviv,Jerusalem,Haifa
<FromGitter> <bararchy> Cool ! :) you liked it here ?
<livcd> the only thing i disliked was that everyone tried to scam me
<livcd> everywhere where i paid in cash they did not give me the correct change
<FromGitter> <bararchy> lol , that's the Israeli expireance all right
<FromGitter> <bararchy> hahahah
<livcd> or no change at all
<Groogy> Swedish statistics are on a growth of 3k jobs a year, considering our population that is really insane
<livcd> bararchy but i am not sure if i would like to live there with a 60k/pa salary
<livcd> prices are insane
<FromGitter> <bararchy> I would argue that as a residant you will be paid by Israeli standard
<FromGitter> <bararchy> which is around 7028.52 Euro a month
<FromGitter> <bararchy> for a good programmer
<FromGitter> <bararchy> and around 5853.01 Euro for a middle level
<Groogy> holy shit
<Groogy> I am in the wrong industry :(
<FromGitter> <bararchy> Yeha, High tech salaries in Israel are crazyy
<livcd> Groogy: yeah but that's because taxes are really low
<livcd> capitalism
<Papierkorb> huh
<livcd> not social democracy
<Groogy> what is the tax in Israel?
<FromGitter> <bararchy> depends on slaray
<livcd> idk like 6% ?
<FromGitter> <bararchy> LOL
<FromGitter> <bararchy> i wish
<FromGitter> <bararchy> for 7K euro it's like 30%-35%
<Groogy> eh with that kinnd of salary according to wikipedia it's 14% to 20%?
<Groogy> ah
<Groogy> so it is the same as Sweden in tax
<livcd> just grab some net income calculator
<livcd> also
<FromGitter> <bararchy> yeha, we just get paid alllot as programmers
<livcd> bararchy: still the costs for your employer are way LOWER than in europe
<FromGitter> <bararchy> This, I do not know :)
<FromGitter> <bararchy> never looked it up
<Papierkorb> Doesn't mean by itself though that employers are willing to shell out more
<Groogy> well they have a VAT of 17% and a corporate tax of 25% so they are not that far off from Europe
<FromGitter> <bararchy> Though Groogy, we don't have a real gaming industry
<FromGitter> <bararchy> so that sucks
<FromGitter> <bararchy> most is just indie games
<Groogy> no but programmers in the game industry are the lowest paid
<Groogy> because it's passion work, it is easier to keep salary down
<livcd> http://cpulohn.net/lxwebV2/bmf.gv.at/#bruttoNetto -> for austria for example
<livcd> do the comparison
<Papierkorb> Groogy: That and accepting to cope with crunchtime it seems
<Groogy> yeah
<FromGitter> <codenoid> I'm very easy to find a job here with my skills now,
<Groogy> though the industry as a whole I think, at least in Sweden is adressing that
<Papierkorb> codenoid, where?
<FromGitter> <bararchy> I guess India ?
<Papierkorb> Groogy: That's really good, constant crunchtime always sounded like failed planning
<livcd> bararchy: where do you work ? (location) TLV ?
<FromGitter> <bararchy> livecd: https://www.google.co.il/maps/place/Herzliya/@32.1730996,34.792984,13z/data=!3m1!4b1!4m5!3m4!1s0x151d480dc125e56f:0x46a023cb144ac1c4!8m2!3d32.162413!4d34.844675
<Groogy> Biggest issue to fight is the romantic view of crunch
<Groogy> A lot of people view it with a style of "Builds character, pulls the team together" etc
<Groogy> not kidding I've had arguments where someone was trying to defend crunch as a good thing, not as a "nessecary evil"
ShalokShalom_ is now known as ShalokShalom
<livcd> oh cool!
<Papierkorb> whoa
<livcd> bararchy: though it's not fair IL has really a special relationship with the US and the companies ! :-(
<FromGitter> <bararchy> That's true, we got mini-sillicon vally going on here, Microsoft one door from me, Google, Red hat, VMware, etc..
<FromGitter> <bararchy> oracle also
<Papierkorb> The others are ok, but Oracle .. uargh
<livcd> don't you have everyone ?
<livcd> Samsung,Intel,AMD
<FromGitter> <cevarief> > **<Groogy>** @cevarief wouldn't just self.new() just work? ⏎ Thank you so much. How could i miss that 😀
<livcd> you even have a factory for cpus i think
<livcd> Facebook..
<FromGitter> <bararchy> Yeha, just mantioned the ones in my block
<livcd> hah :D
<FromGitter> <bararchy> that I can see from the window
<Groogy> @cevarief no probs!
<livcd> sad that the fastest way to immigrate to israel is to convert to judaism :D
<FromGitter> <bararchy> LOL that's an issue indeed
<livcd> unless you want to marry me bararchy?
<FromGitter> <bararchy> as an atheist , I really dislike it
<FromGitter> <bararchy> XD
<Groogy> what if I follow the word of the Allfather?
<FromGitter> <bararchy> we sadly don't allow gay merrage yet
<Groogy> :(
<livcd> but israelis are very welcoming if you are from certain countries
<livcd> i did not even have to go through the magnetron security checks when i showed them the passport
<FromGitter> <bararchy> well, as long as youre not from enemy countries , youre all good hahah
<Groogy> Actually would I be allowed to bring pagan idols and symbols?
<FromGitter> <bararchy> lol ofc, we even have Pastafarians here
<Groogy> I mean I wear a Mjölnir and a knot made of bone
<FromGitter> <bararchy> dude, Metal heads are welcome ;)
<Groogy> ah cool
<FromGitter> <bararchy> we had Opeth here a few years ago
<Groogy> I'm not a metal head, just history nerd
<FromGitter> <bararchy> wasome show
<FromGitter> <bararchy> oh
<FromGitter> <bararchy> also cool :)
<Groogy> I come from a city named after a viking fortress so ;D
<FromGitter> <bararchy> That's awsome !
<FromGitter> <bararchy> which one ?
<Groogy> where I come from
<Groogy> Trelleborg
<FromGitter> <bararchy> WTF THIS IS SOOO COOOOOOLLLL
<FromGitter> <bararchy> you leave there ???
<FromGitter> <bararchy> live*
<Groogy> No not anymore, live in Stockholm now
<livcd> bararchy: but i have noticed many pride flags everywhere
<livcd> especially in TLV
<livcd> but also in Jerusalem
<FromGitter> <bararchy> livecd, yeha, Gays are super welcomed, it's just our stupid government with it's religous shit making the place less progressive
<Groogy> so it is socially accepted in the urban areas I guess?
<FromGitter> <bararchy> it is, even in the "red neck" places
<Groogy> huh okay then that's weird
<FromGitter> <bararchy> it's just that "offical" stuff like marrige and adoptions which are not yet "working"
<FromGitter> <bararchy> but there is an upror regarding that
<livcd> i plan to visit TLV again when LRT is done :D
<Groogy> Sweden accidentally made having sex with animals legal when we removed that having sex with same sex was illegal
<Groogy> because it was covered by the same law xD
<FromGitter> <bararchy> LOL
<FromGitter> <bararchy> hahaha
<livcd> poor animals
<FromGitter> <bararchy> livecd , what is LRT ?
<livcd> trams and underground trams?
<livcd> i think
<FromGitter> <bararchy> Ohhhh ok, yeha, that might take ages lol
<livcd> should be done in 2021
<livcd> we joked about it with my gf because our apt should also be done in 2021
<FromGitter> <bararchy> you should just come visit no matter :) we can arrange "Crystal meetup" I know @sdogruyol want's to join too hahaha
<livcd> i will if we can sleep at your place
<livcd> LOL
<Groogy> never been east of Warsaw
<Groogy> wherever the crystal code camp ends up I'll probably show up
<FromGitter> <bararchy> They said it will be in Europe somewhere no ?
<livcd> i suggest poland
<Groogy> yeah I think the vote was for eu
<FromGitter> <bararchy> Poland is fine, I can even go see the famely mamorial on the way lol
<Groogy> ugh no my liver can't take another trip to Poland
<livcd> accessible and should be cheap for everyone
<FromGitter> <bararchy> and "Kurwa" everywhere hahah
<livcd> do you work in a big corporation bararchy?
<livcd> or in a small-ish startup?
<FromGitter> <sdogruyol> Berlin should be fine
<FromGitter> <sdogruyol> or London
<FromGitter> <bararchy> livecd: I work at https://www.safe-t.com/ , we have around 30 people working here, it's a small-medium ? we are a public company
<FromGitter> <bararchy> @sdogruyol Berlin is cool !
<Groogy> oh yeah just don't order a Currywurst and ask for mustard for it
<Groogy> I thought I was going to start ww3 D:
<Groogy> I just really love the mustard they have in Germany
<livcd> *insert mustard gas jokes here*
<Groogy> lol
<livcd> bararchy: do you use crystal at work?
<FromGitter> <bararchy> livecd: for really small things, but I'm leaving the comp quite soon and will Use crystal as the main languge in the new startup I'm opening
<livcd> that sounds cool
<FromGitter> <bararchy> Hope it will be ;)
<Groogy> what is the startup?
<Groogy> that you are starting
<FromGitter> <bararchy> Well.... it's still a little hush hush , but it's gonna be offensive security orianted
<Groogy> cool
<FromGitter> <bararchy> I'll make it formal and then I'll push some cool announcments with Crystal
<FromGitter> <bararchy> Groogy Thanks :)
<livcd> bararchy: do you have a beard?
<FromGitter> <bararchy> lol yeha
<FromGitter> <bararchy> hahaha
<FromGitter> <bararchy> but by choise, not divine dectation
<livcd> and tattoos?
<livcd> lol
<FromGitter> <bararchy> yeha
<FromGitter> <bararchy> hahaha
<FromGitter> <bararchy> why ?
<livcd> match!
<livcd> i found you on linkedin
<FromGitter> <bararchy> ?
<FromGitter> <bararchy> oh
<FromGitter> <bararchy> haha
<FromGitter> <bararchy> yeha
<FromGitter> <bararchy> send me an invite, I'll add you
<Groogy> cool のヮの
<Groogy> dang it I looked for that emoji for too long
maxpert has joined #crystal-lang
<livcd> at first i thought you are Micha since he worked for Symantec
<livcd> but then the beard gave you away
<livcd> :D
<FromGitter> <bararchy> lol, nice dedaction skills
<FromGitter> <bararchy> hahah
<livcd> can i now apply for a job at Mossad ?
<livcd> :D
<FromGitter> <bararchy> Enjoy
<FromGitter> <bararchy> but I think you need hebrew
<FromGitter> <bararchy> hahah
<FromGitter> <bararchy> Oh nvm, eng too
<FromGitter> <bararchy> but they use aspx, which means windows, I wouldn't go work there
<FromGitter> <crisward> Can't access that from UK... Damn MI5 will be kicking down my door now. I've probably been added to some kind of watch list 😉
<FromGitter> <bararchy> hahah
<FromGitter> <bararchy> LOL @crisward
<Groogy> I am just imagining now them kicking down the door and say *Oh terribly sorry about the door chap, and I hope it wouldn't be a bother if you could just come here with us now"
<FromGitter> <crisward> Now I just need to avoid mentioning north Korean missle launch codes. Doh!
<FromGitter> <sdogruyol> lol
<FromGitter> <bararchy> lol
<Groogy> haha
<FromGitter> <bararchy> Groogy my Linkdin trapped you , sent an invite
<FromGitter> <bararchy> haha
<Groogy> haha
<FromGitter> <bararchy> btw, do you guys plan any more linux ports any time soon ?
<Groogy> for our games?
<FromGitter> <bararchy> now playing DOW3
<Groogy> We do our games natively for Linux
<FromGitter> <bararchy> not only, I know you port other companies games too
<Groogy> i.e I am sitting on Linux right now working
<Groogy> no?
<livcd> what company?
<Groogy> Paradox Development Studio, subsidary company of Paradox Interactive
<Groogy> it's the inhouse strategy game development studio
<livcd> ohh
<livcd> and you say they pay little
<livcd> :-))
<Groogy> They pay perfectly enough if you ask me, I said that game companies pay the least compared to other industries
<Groogy> though I am very spartan when it comes to my life style
<livcd> haha ok fair enough
<FromGitter> <bararchy> Groogy Oh, sorry , I was thinking Feral Interactive
<Groogy> all I need is my computer, my internet, my appartment and occasionally go out and have beer with my friends
<livcd> and do you use Crystal there ? I thought most of these studios use Unity or similar
<Groogy> no C++, and it is our own engine named Clausewitz
<livcd> ahh
<Groogy> that's what I am doing in Crystal
<Groogy> or well I am making a game but keeping a good architecture so I can share it with others
<FromGitter> <bararchy> Which game are you making ?
<FromGitter> <bararchy> like, what type ?
<Groogy> God Game inspired by Dwarf Fortress
<Groogy> so not Black & White with a dumb creature or anything, but more of a fun autonomous simulation that you poke at
<FromGitter> <veelenga> @crisward sorry, i didn't want to make you feel under pressure. But I like to announce work at early stage, so the interested auditory will be watching/helping you 😸
<FromGitter> <codenoid> indonesia & sg @Papierkorb
<FromGitter> <crisward> @veelenga that's ok.. I'm not used to getting any attention until I've forgotten I've actually open sourced something.
maxpert has quit [Remote host closed the connection]
<FromGitter> <bararchy> Groogy: Cool! tell me if you want beta-alpha testers
<Groogy> would love actually content providers when I have ported most of the code
<Groogy> i.e define tree's and what components its made up off etc. etc.
<FromGitter> <bararchy> Groogy, would you have a "workshop" like engine ? so modders can add things to it ?
<FromGitter> <bararchy> or a general SDK\API
<Groogy> eh well Boleite is framework to render stuff and other periphials
<Groogy> but the game itself will be very moddable yes
<FromGitter> <sdogruyol> Wow, this comment from Ary https://github.com/crystal-lang/crystal/pull/4838#discussion_r136076898
<FromGitter> <bararchy> I guess when tehy started they took the "C speed" as the main thing
<FromGitter> <sdogruyol> runtime performance is still great
<FromGitter> <bararchy> it's crazy great
<FromGitter> <sdogruyol> I like how Ary states the inconsistencies e.g
<Papierkorb> Well they're separate issues. You can have excellent performance and a consistent API
<Papierkorb> And if we say "oh we'll profile it later", then we have to profile it later and actually accept those performance improvements.
<Papierkorb> Else it's the Ruby fallpit: "Oh this makes all programs 2% slower, but only 2%, who cares"
<Papierkorb> Yeah I care when that happens hundreds of times
<RX14> Papierkorb, exactly
<FromGitter> <sdogruyol> IMHO Crystal team is not that ignorant
<FromGitter> <sdogruyol> I've been here for more than 2 years and never seen a PR / Issue which ignored runtime performance
<crystal-gh> [crystal] RX14 pushed 3 new commits to master: https://git.io/v5C5j
<crystal-gh> crystal/master c26fbc9 RX14: Seperate Socket and IO::FileDescriptor...
<crystal-gh> crystal/master 135915d RX14: Remove the edge_triggerable option from IO::FileDescriptor
<crystal-gh> crystal/master f7ca917 RX14: Add IO::Syscall...
<FromGitter> <sdogruyol> Meanwhile congrats on https://github.com/crystal-lang/crystal/pull/4707#issuecomment-326012168 @RX14
<FromGitter> <sdogruyol> Great work there
<RX14> is it just me or has github been really slow recently
<FromGitter> <sdogruyol> oops wrong link
<Papierkorb> didn't notice any real slowdown here
<FromGitter> <crisward> So glad I'm not involved in that pull request. Hate it when there are more lines of discussion than code... I realised everyone wants everything correct, but it's still pretty tough...
<FromGitter> <bararchy> RX14, commits wise or internet wise ?
<RX14> my firefox crashes for 2 secodns when I open that yaml PR
<RX14> well actually maybe it's only 500ms
<FromGitter> <sdogruyol> the diff or the thread?
<RX14> the thread
<Papierkorb> Nope, I use Firefox too, works fine
<FromGitter> <crisward> Anyone had experience of crystal sockets not working in IE11. Behind nginx if that makes a difference.
<RX14> firefox doesn't seem to handle lots of review comments well
<FromGitter> <sdogruyol> I'm on Arch with Chromium and it's just github loading being slow
<FromGitter> <sdogruyol> Rendering is fast
<RX14> and i'm running in e10s with like 6 content threads
<RX14> perhaps it's a addon
<RX14> actually that'd make sense if it was blocking the window chrome thread
<RX14> now i've got to rebase my Crystal::System work I guess
<FromGitter> <sdogruyol> which PR?
<RX14> the one that #4707 was leading up to lol
<RX14> thats why i'm pushing to get it merged
<RX14> it's still groundwork
<FromGitter> <sdogruyol> oh ok
<RX14> which is itself groundwork for windows
<FromGitter> <sdogruyol> lol
<FromGitter> <sdogruyol> you should really check Windows issue thread on your firefox then
<FromGitter> <sdogruyol> like 50+ messages there
<FromGitter> <sdogruyol> Even GH is slow here like 2s to fetch
<FromGitter> <codenoid> only I have never had a bug / what to improve, and I have never created PR in crystal repo :/
<FromGitter> <sdogruyol> the more you use Crystal the more the chance @codenoid
<FromGitter> <crisward> IE11 gives me `Websocket Error: Incorrect HTTP response. Status code 302, Found` Just using socket from kemal.
<FromGitter> <crisward> Works fine elsewhere.
<FromGitter> <sdogruyol> That sounds bad
<FromGitter> <sdogruyol> IE11 is Edge ?
<RX14> page loads on github are fine but mutations seem to hand for 2s+
<RX14> hang*
<FromGitter> <crisward> No, IE11. My chat client retries after 2 seconds if it fails to connect. That's how I found it because IE11 users are having a bit of a ddos effect. Not too bad, but far from ideal.
<RX14> looks like something weird might be going on from those graphs
<FromGitter> <crisward> Edge is a rewrite I think.
<Papierkorb> MS style rewrite*
<Papierkorb> Supervisor be like "Call it new with some touch UI, no one will notice"
<FromGitter> <sdogruyol> More like redesign :D
<FromGitter> <crisward> I'm only seeing the issue in IE11, not sure what to try. Not sure it's nginx on crystal.
<Papierkorb> MS has (had?) VirtualBox images with Windows and IE in it for webdevs
<Papierkorb> Exactly so people can test their pages on their IE crap
<Papierkorb> Free of charge and without MS account too, so that's kinda nice
<FromGitter> <bararchy> BTW latest change to socket / FD made any change to calling TCPSocket ?
<FromGitter> <crisward> @sdogruyol didn't you have a chat demo somewhere?
<FromGitter> <sdogruyol> that's pretty old though
<FromGitter> <sdogruyol> https://github.com/f/kemal-react-chat
<Papierkorb> Oh, f uses Crystal?
<RX14> I only know of f through crystal lol
<Papierkorb> Was always "the Ruby guy" to me.
<RX14> i was never deeply ruby
<RX14> i used it but never got involved with news or that
<FromGitter> <crisward> @sdogruyol that doesn't work on IE either, but probably a different reason, says there is a js syntax error, though the line it points to looks fine.
<travis-ci> crystal-lang/crystal#c26fbc9 (master - Seperate Socket and IO::FileDescriptor): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/270025148
<FromGitter> <crisward> Think I've found the bug, apparently IE needs a url with a trailing slash for web sockets. Will try a fix for that and let you know how I get on.
<FromGitter> <bitmappergit> how do i force a variable to be a u64
<FromGitter> <bitmappergit> nvm
<FromGitter> <bitmappergit> i remember
<FromGitter> <johnjansen> ```var_name : UInt64```
mark_66 has quit [Remote host closed the connection]
<FromGitter> <bitmappergit> HAHA I CANT BELIEVE THAT WORKED
<vegai> huh? :)
<FromGitter> <bitmappergit> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a6d9d2614889d475a24197]
jwaldrip has joined #crystal-lang
<FromGitter> <bitmappergit> a method i had was outputting a nil at compile time
<FromGitter> <bitmappergit> so i converted it to a string and then to a u64 to bypass that
<FromGitter> <johnjansen> no no no
<FromGitter> <bitmappergit> yeah
<FromGitter> <bitmappergit> it's shitty i know
<FromGitter> <bitmappergit> i'm replacing it
<FromGitter> <bitmappergit> i was just curious
<oprypin> johnjansen, your previous advice is bad anyway, it has no effect
<FromGitter> <johnjansen> first, ensure your method returns the right stuff … personally i recommend specifying the return type in the method definition. ⏎ ⏎ secondly, this is not ruby, dont try to make everything behave like a string to avoid the minor hassle of making sure you know whats actually being returned
<FromGitter> <johnjansen> yeah @oprypin i was trying to give a clue … whilst cutting firewood outside ;-)
<FromGitter> <johnjansen> thats my lot for today anyway … have fun everyone
<FromGitter> <sdogruyol> @johnjansen take care
<FromGitter> <bitmappergit> i used if var to make user not nil
<FromGitter> <crisward> It's not the trailing slash...
<FromGitter> <crisward> Feel as though I should send bill to microsoft for this
<FromGitter> <crisward> Found the bug, it was fixed in july, I'm using an older version of crystal. Patched it in my app for now 😟 https://github.com/crystal-lang/crystal/commit/dcf8a032d10e648318a3ba6041be37300be429ff
<oprypin> now that's unexcusable
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
<FromGitter> <crisward> Waiting for the LLVM fix as I have some compile issues in 0.23.1
DTZUZU has quit [Quit: WeeChat 1.9]
DTZUZU has joined #crystal-lang
<RX14> --no-debug ??
<RX14> if that doesn't fix everything there is no "LLVM fix"
imconnectedtoirc has joined #crystal-lang
flaviodesousa has quit [Ping timeout: 260 seconds]
<imconnectedtoirc> hello! can someone answer me this question https://carc.in/#/r/2mke/edit
<RX14> .gsub(/ +/, " ")
<imconnectedtoirc> thank you very much
<crystal-gh> [crystal] RX14 opened pull request #4900: Collapse modules in Crystal::System (master...feature/collapse-crystal-system) https://git.io/v5Wcg
<crystal-gh> [crystal] asterite opened pull request #4901: Make IO a class (master...feature/io-as-class) https://git.io/v5WWe
<imconnectedtoirc> is there a way to restart a each do thing? so that its again getting executed?
<oprypin> imconnectedtoirc, put it in a loop and use `break`
<FromGitter> <sdogruyol> @crisward ugh
<ShalokShalom> Papierkorb: hi there, your code in qt5.cr reminds me a lot on the KDE Frameworks itself
<ShalokShalom> its very compact
<ShalokShalom> which kind of magic is this?
<Papierkorb> Mh? qt5.cr is almost entirely auto-generated
<Papierkorb> or which part(s) are you thinking of?
<crystal-gh> [crystal] RX14 closed pull request #4900: Collapse modules in Crystal::System (master...feature/collapse-crystal-system) https://git.io/v5Wcg
imconnectedtoirc has quit [Quit: Page closed]
thews has quit [Ping timeout: 248 seconds]
thews has joined #crystal-lang
<crystal-gh> [crystal] txe opened pull request #4903: Win: add Crystal::System::DirHandle (master...win-dir) https://git.io/v5WPq
<FromGitter> <kazzkiq> Is there a way to import shards into `crystal play` playground?
<FromGitter> <johnjansen> start play from the directory of your shards file (after installing them)
tdc has quit [Ping timeout: 246 seconds]
<travis-ci> crystal-lang/crystal#cd0d089 (master - Collapse modules in Crystal::System (#4900)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/270134179
<travis-ci> crystal-lang/crystal#cd0d089 (master - Collapse modules in Crystal::System (#4900)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/270134179
<oprypin> RX14, I don't get why Crystal::System exists, to be honest. not sure about wrappers upon wrappers. it could just be defining some private (or not private) methods and be reopened in the common interface file. could you remind me about why it can't be so?
<RX14> it could be
<RX14> but i think it would be messier
<RX14> because this way we have a clean seperation
<RX14> you're always implementing a whole interface
<RX14> splitting classes over multiple files is pretty hard to navigate
<RX14> i often open up random crystal files and search def <foo>
<oprypin> RX14, but this is just as hard to navigate, if not more so
<RX14> how so
<oprypin> look at https://github.com/crystal-lang/crystal/pull/4903/files it even has the `def`s - could do it the same way
<RX14> the thing is at least this way it's obvious what's being delegated to the platform specifics
<oprypin> and then you have to deal with those internal objects being exposed for no reason, and you get conflicts on which one should be used in stdlib (remember the 'phobia' comments on Random)
<RX14> because a stub implementation exists in the file
<oprypin> RX14, you could still make it obvious by enforcing only private methods in platform specific files
<oprypin> though i like the comment stuff more
<RX14> and then if we have to delegate *anyway* (def foo; private_foo_impl; end) why not do it this way?
<oprypin> the better question is why do it this way
<RX14> because this way has momentum
<RX14> perhaps if you'd made this argument in the issue we'd be doing it your way
<RX14> another thing is that i'd like people to be able to start with an empty prelude and requite crystal/system without the rest of the stdlib
<RX14> I don't think changing this now is a good idea
<RX14> it'd just delay windows more
<RX14> i know that's a shit argument
<oprypin> welp at least good to know that i'm not crazy
<oprypin> might be worth a try to see how it looks
<RX14> i think the difference is minimal at best oprypin
<oprypin> not when you have a class wrapping a class that ultimately just stores a pointer https://github.com/crystal-lang/crystal/pull/4903#issuecomment-326115128
<RX14> oprypin, yes that specific case is particularly terrible
<RX14> but it's the same way i'm doing FileHandle
<RX14> and for FileHandle it's not so clean cut
<RX14> because one's buffered and one's not
<RX14> so there's quite a bit of other code around
livcd has quit [Ping timeout: 240 seconds]
<oprypin> make internal stuff a struct at least???
<oprypin> again, seems obvious but i could be missing something
livcd has joined #crystal-lang
<oprypin> ak=fk
<oprypin> oops, meant afk
<RX14> oprypin, in this case it should be a struct because it's immutable i think
<RX14> actually there's closed
<RX14> i've always stayed away from mutable structs unless the instantiation and mutation are all in one mthod
<oprypin> this is a special case where this argument must not be applied. just view it as being possible to own only by the public object and you don't have to think about it this way (though honestly not having this indirection in the first place would have made it more natural). have to keep performance at a sane level.
<crystal-gh> [crystal] asterite opened pull request #4904: Codegen: inline constants (master...feature/inline-consts) https://git.io/v5WSD
<RX14> yay
<RX14> oprypin, ok i'll try a struct once the class works lol
<RX14> i broke backtraces somehow?
<RX14> and like 4 random specs
<RX14> :(
<oprypin> heh asterite has spoken
<oprypin> why does the exciting stuff always happen so late
<RX14> because it's evening for ary?
<RX14> and all of manas?
<oprypin> rhetorical question :|
<oprypin> the only thing that the reopening idea doesnt work well for is documentation
<oprypin> you'd have to duplicate documentation or rely on require order
<RX14> that's if you don't enforce all the plat specific is private
alex`` has quit [Ping timeout: 246 seconds]
<RX14> and you then have to do `#doc\ndef foo\n foo_impl\nend`
<RX14> which as I said is almost as ugly as this way
<RX14> which we're already doing
<oprypin> yeah but at least it solves the dilemmas like these 1) can it really be a struct? 2) should i use the Crystal:: version in stdlib or the public one? (yes, you could argue this, especially in the context of your argument of "start with an empty prelude and requite crystal/system without the rest of the stdlib")
<oprypin> and, of course, arguments about whether Crystal:: is an API or not
<RX14> well i think #2 is a nonissue for anyone who doesn't already know the answer
<RX14> if you're implementing a stdlib you're expented to know what you're doing
<RX14> and no Crystal:: isn't an API
<RX14> well
<RX14> Crystal::System isn't
<RX14> Crystal::VERSION is
<RX14> #1 is trivial
<RX14> if it's an ivar it can be a struct, right?
<RX14> oprypin, my true opinion is that both methods are about equally ugly
_tsound has joined #crystal-lang
<RX14> and we've started down one path
<RX14> why not keep going
<oprypin> it's trivial to switch to the other path.
<RX14> really?
<oprypin> i mean i just did it lol
<RX14> plus where would you keep all these files
<RX14> i don't want a file and a file_win.cr and a file_unix.cr for everything
<oprypin> everything stays the same
<oprypin> file-wise
<oprypin> better use this link because i already amemded something https://github.com/crystal-lang/crystal/compare/master...oprypin:no-crystal-sytem
<RX14> i'd still want you to make all the platform specific stuff private
<RX14> for the doc reason you mentioned
<oprypin> i did a different approach to the doc stuff
<oprypin> which brings up the decision - should the functionality that's not supported on a platform fail to compile or give an exception
<RX14> fail to compile
<oprypin> that's what you think right away
<oprypin> but people may want to do fallbacks
<RX14> so they use flags
<oprypin> that's fair but it's inelegant to enumerate supported systems
<oprypin> in user code
<oprypin> and it would need to be adapted as support for the functionality improves
<RX14> but raising an exception seems ugly too
<RX14> to be fair
<oprypin> sure
<RX14> we can do the same thing you proposed with Crystal::System
<RX14> very easilly
<oprypin> i'm not saying you can't
<RX14> i know
<oprypin> just that my method has this docs problem and this would solve it and it's a related question
<RX14> you didn't say you could either :)
<RX14> yeah
<RX14> well
<RX14> bring it up
<RX14> there's something about having it all completely encapsulated that I like
<RX14> but your method is pretty good and warrants further discussion
<oprypin> RX14, funnily enough, it's not "completely encapsulated" if it's publically available :p
<RX14> but it's not?
<oprypin> just call Crystal::System::whatever
<oprypin> you can do that in user code
<RX14> it's as publicly available as any of the other stdlib internals
<oprypin> yeah it's not important, i just wanted to be annoying i guess
<RX14> besides
<RX14> what does that have to do with encapsualtion
<oprypin> to me encapsulation is whether you can access things not meant for the public
<oprypin> and this exactly falls under such a definition
<RX14> yeah i'm using encapsualtion wrongly
<RX14> i meant seperate
<RX14> one thing, you can see at a glance which calls are platform specific
<RX14> Crystal::System will always appear
<RX14> with your approach the methods could be anmed anything
<RX14> named*
<oprypin> yeah
mach has joined #crystal-lang
<RX14> oprypin, with crystal::system you can find the documentation for the methods for new platforms much easier
<oprypin> I don't get it?
<RX14> there's a single "cover file" with commented out method defs
<RX14> you just copy that and work for the new platform
<RX14> with your way, you'd need to find the docs at the bottom of the main file
<oprypin> so how is that a bad thing?
<RX14> which is weird as the impls would be in crystal/system
<oprypin> you can copy this stuff directly without even needing to uncomment it
_tsound has quit [Ping timeout: 252 seconds]
<oprypin> yeah that's a downside but there are upsides
<RX14> oh ye because of the raise stuff
<RX14> damn
<oprypin> what
<RX14> nvm
<RX14> the part where you raise for an unimplemented platform
<RX14> assuming we decide to do that
<oprypin> yeah assuming. im writing a separate issue for that (actually writing that one first)
<oprypin> and the removal of crystal::system will be a combined PR+discussion
<RX14> be aware i'll continue to encourage things to be merged that already use crystal::system until that discussion is finished
<oprypin> that is wise
<RX14> i dont want to delay stuff just so that finishes
<FromGitter> <sdogruyol> @RX14 👍
<RX14> a lot of people are waiting on windows
<RX14> and i want to streamline that
<bmcginty> Speaking of windows, has anyone gotten the recent docker mentioned in the windows pr to work? I followed the guide, and got either a note on gc missing, or a long unsaved error from llvm.
<oprypin> docker?
<RX14> on windows?
<oprypin> how does that even work with windows
<bmcginty> I was trying to compile a crystal program to windows. I though the pr was discussing cross-compiling?
<oprypin> bmcginty, yeah there's an old messy fork that kinda works, and also gradual progress on master branch
<oprypin> i reworded the instructions for the old messy fork here http://blaxpirit.com/blog/23/how-to-build-video-games-for-windows-using-crystal.html - may be helpful
<bmcginty> oprypin: thanks. will give it a shot.
<FromGitter> <drujensen> what is the status regarding parallelism in Crystal? Last I heard, there were issues with the GC thread and performance wasn't stellar.
<oprypin> i dunno, core team keeping silent about it
<RX14> the last I heard was "we need to lock these people on a plane together to get parallelism working"
<RX14> which isn't... encouraging
<FromGitter> <drujensen> Ok, still hoping to hear good news
<FromGitter> <drujensen> But it doesn't sound like memory management was thought out so well unlike Rust or Swift
<RX14> crystal evolved much more organically compared to those two
<RX14> it started out as a project to compile ruby
<RX14> and ended up as a seperate language
<RX14> there's a lot that isn't planned, but just worked out well
<FromGitter> <drujensen> Yeah, it's a beautiful language so I'm hopeful
<FromGitter> <drujensen> I guess parallel processes is just as good as node
<FromGitter> <drujensen> Better performance wise
<FromGitter> <drujensen> Maybe it's not that critical?
<RX14> a good parallelism story is pretty essential for some applications
<FromGitter> <sdogruyol> Should be better compared to nofe
<RX14> and it has few downsides
<FromGitter> <sdogruyol> Like?
<RX14> you have to be wary of concurrent access to shared structures
<FromGitter> <sdogruyol> That's always the issue :)
<FromGitter> <sdogruyol> even go still has some hard to find data races with channels
<FromGitter> <sdogruyol> i wonder how will Crystal do with multi threaded fibers
<oprypin> my prediction: either very well or not at all
<FromGitter> <bew> Sad but true.. do you think it might be possible to release the language without parallelism, and add it later?
<FromGitter> <sdogruyol> That'd be not good
<oprypin> bew, not possible. well possible but that's a definite 2.0 you're looking at, making the 1.0 meaningless
<FromGitter> <bew> Yeah it makes sense,
<FromGitter> <bew> (ups nothing to add, forget that comma)
<oprypin> ayy now i dont need to open a gitter window to check for edits
<crystal-gh> [crystal] oprypin opened pull request #4906: Remove Crystal::System, do system-specific methods by reopening (master...no-crystal-system) https://git.io/v5le3
<FromGitter> <bew> You updated the bot? Or you were just saying that because I didn't edited?
<oprypin> bew, no updates in a long time. being thankful that you made it explicit
<FromGitter> <drujensen> can you get callbacks on edits?
<FromGitter> <drujensen> might be worth an update
<oprypin> drujensen, i actually cant get callbacks on edits
<FromGitter> <drujensen> bummer
<oprypin> and if i could, there are a ton of corner cases, what if someone makes 5 quick edits, should i repeat the message 5 times?
<FromGitter> <drujensen> true
<oprypin> to get edits i need to use https://developer.gitter.im/docs/faye-endpoint which has an extremely complicated client available only for ruby and js
<FromGitter> <drujensen> interesting endpoint
<FromGitter> <drujensen> GraphQL like
<FromGitter> <drujensen> https://developer.github.com/v4/
<FromGitter> <drujensen> but pubsub
<FromGitter> <drujensen> actually, its not so GraphQL like after all
<FromGitter> <elorest> As far as web goes soreuse port is pretty much as good. would still be nice to have full parallelism though.
<oprypin> elorest, i think for web the current state is indeed good. most current web dev is done in isolation, using the database as the central synchronization point
<FromGitter> <drujensen> for games, not so much
<oprypin> apps are strongly discouraged to keep global state
<oprypin> though this is me coming from Python where it's done more out of necessity than preference
<oprypin> (all web dev is multiprocess due to bad multithreading)
<FromGitter> <drujensen> didn’t follow that
<FromGitter> <drujensen> web dev has a need for background processing as well
<FromGitter> <elorest> Could definitely be useful.
<FromGitter> <drujensen> threads for sending an email in the background, for example
<oprypin> drujensen, i'm saying that in Python all web applications must be done under the assumption that each endpoint could basically be spawned in its own process
<oprypin> background processing is done thru terrible hacks (basically another process)
<FromGitter> <drujensen> i see, yes
<FromGitter> <drujensen> in python
<FromGitter> <drujensen> in ruby, sidekiq
<FromGitter> <drujensen> righ
<oprypin> background processing is definitely a huge upside
<FromGitter> <drujensen> sorry for the edit. :-)
<oprypin> aaaand im going to bed at 2AM
<FromGitter> <drujensen> k
<FromGitter> <drujensen> good night