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