ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Crystal 0.23.1 | Fund Crystal's development: | GH: | Docs: | API: | Gitter:
<FromGitter> <straight-shoota> @mgarciaisaia There's a typo in the release notes: "rand(0) is now valid and re*ut*rns 0"
<FromGitter> <asterite> fixed
DTZUZO has quit [Ping timeout: 246 seconds]
DTZUZUU has quit [Ping timeout: 240 seconds]
<FromGitter> <straight-shoota> now the entire release message is gone...
<FromGitter> <asterite> Yes, I don't know what's going on. Seems to be a bug in GitHub
<RX14> the 0.24.0 release has gone from pre to draft...
<RX14> i feel a bit sad for the cool PRs comping
<RX14> coming*
<RX14> but they'll just end up in 0.24.1 i guess
<RX14> i can't think of too many breaking changes coming up
<FromGitter> <Qwerp-Derp> I'm getting an error with `Proc`:
<FromGitter> <Qwerp-Derp> ```code paste, see link``` []
<FromGitter> <Qwerp-Derp> `@fn` is a `Proc(Void, Void)`
_whitelogger has joined #crystal-lang
<watzon> Hmm interesting. Just tried to build Crystal on Fedora and got an error saying that `redhat-hardened-cc1` didn't exist. After some searching it turns out that this is because of the `redhat-rpm-config` package missing. That should probably be added to the required libraries for Fedora
<watzon> Added
<FromGitter> <pnloyd> @oprypin, I tried parallelize some code with you map functions and got crashes. Trying to figure out the cause I eventually tried running in isolation (but inside section in my program where I want to run parallel calculations) as.. `(1..100).to_a.pmap &->(num : Int32) { num }` and still get crashes. Is that maybe a garbage collection thing?
<FromGitter> <pnloyd> It's so weird, when I run your prime number function by itself outside my program it works just fine.
<FromGitter> <pnloyd> I even tried simulating the conditions of my program by spawning fiber's but it still wouldn't crash by itself.
<FromGitter> <pnloyd> @unreadable did you try oprypin's map snippet by any chance?
<wmoxam> whoa 0.24 tag
<wmoxam> woot
<FromGitter> <bararchy> πŸŽ† yeh 0.24
<FromGitter> <bararchy> "Pre"
<watzon> Is there a changelog for 0.24 yet?
<FromGitter> <Qwerp-Derp> oprypin, for some reason the display flips in CrSFML, and I have no idea why it's doing that
<FromGitter> <Qwerp-Derp> Here ( is my repo where it happens
<FromGitter> <bew> There was watzon but it disappeared after a typo edit if I understood correctly^^
<watzon> Well damn, I want to see a changelog
<FromGitter> <bew> I hope @mgarciaisaia saved it before putting it on GH
<watzon> I hope so too haha
<watzon> At least I can browse the 0.24 tag on github
DTZUZO has joined #crystal-lang
tdc has joined #crystal-lang
<FromGitter> <bararchy> watzon
<FromGitter> <unreadable> Morning all, rainy day
<FromGitter> <bararchy> Here too :) @unreadable
<watzon> Yay! Thank you!
<FromGitter> <unreadable> @pnloyd I haven't try it since I was told it's gonna crash..
<watzon> Ooh thoughtbot is using Crystal now?
claudiuinberlin has joined #crystal-lang
<FromGitter> <unreadable> Great changelog, congratz to the team and contributors πŸ‘
<FromGitter> <pnloyd> @unreadable, ya it does crash under most circumstances
DTZUZO has quit [Ping timeout: 240 seconds]
Yxhuvud has joined #crystal-lang
<oprypin> pnloyd, you're not showing code. but anyway, haven't i said "almost anything can cause a crash"
<oprypin> Qwerp-Derp, what, clipping to 50x50 as in, 50) ?
<FromGitter> <Qwerp-Derp> Yeah
<FromGitter> <Qwerp-Derp> It's flipped horizontally for some reason
<oprypin> show screenshot and explain why it's not what you expect
<oprypin> also goddammit don't make me click through like 15 files
<FromGitter> <Qwerp-Derp> Sorry about the 15 files, I honestly don't know where the bug is from
<FromGitter> <Qwerp-Derp>
<oprypin> yeah that looks like 50x50 to me
<FromGitter> <Qwerp-Derp> That's the image, and the square on the bottom-left-hand corner is meant to be at the top-left, and whenever I drag from where the square is meant to be to another place the whole thing is flipped
<oprypin> could it have anything to do with the project name "Mirrors" :o
<FromGitter> <Qwerp-Derp> I honestly have no idea what is going on, the code should work fine (but it obviously doesn't)
<FromGitter> <Qwerp-Derp> :O
<FromGitter> <Qwerp-Derp> oprypin, do you have any leads as to what the issue is so far?
<FromGitter> <Qwerp-Derp> Or are you still scrolling through my 15 files :P
<oprypin> that
<FromGitter> <pnloyd> @oprypin, ya I realize it's not likely to work. I just thought it was strange just spawning the threads was enough to cause a crash
<oprypin> Qwerp-Derp, what is the purpose of RenderTextures in this code?
<FromGitter> <Qwerp-Derp> I think only `display/`, `display/` and `` are the ones that matter
<FromGitter> <Qwerp-Derp> As well as the main file
<FromGitter> <Qwerp-Derp> Well, RenderTextures are a way for me to switch from one "window" to another, without creating a physical window
<oprypin> Qwerp-Derp, what's the purpose of 50x50 RenderTextures in this code?
<FromGitter> <pnloyd> And also odd it seems to be context dependent (e.i what code path (or green thread) the threads were spawned on
<oprypin> Qwerp-Derp, you don'
<FromGitter> <Qwerp-Derp> Oh that
<oprypin> Qwerp-Derp, you don't need physical window switching, in the game loop depending on the state you either draw and process one kind of window or the other
<FromGitter> <Qwerp-Derp> So should I just create two windows instead of doing what I'm doing right now?
<oprypin> no, one window
<oprypin> and switch between two different drawing/event processing implementations within it
<FromGitter> <Qwerp-Derp> Ehhhhh I prefer what I'm doing right now
<FromGitter> <Qwerp-Derp> Is it much less efficient?
<oprypin> Qwerp-Derp, technically not, it's just much less convenient
<FromGitter> <Qwerp-Derp> Also for your 50x50 question, I'm using it because it's the easiest way to create a 50x50 sprite with a white background, which is what my listener is for
<FromGitter> <Qwerp-Derp> My listener uses sprites instead of other drawables, such as rectangular shapes, since I want the listener to be more general
<oprypin> Qwerp-Derp, i even ran your code but i just see a square and nothing is happening
<FromGitter> <Qwerp-Derp> Use your mouse to drag
<oprypin> nope, nothing is happening
<FromGitter> <Qwerp-Derp> Start dragging your mouse from the top-left corner (i.e. hold mouse down, and drag it to another place)
<oprypin> well that's intuitive...
<FromGitter> <Qwerp-Derp> Click and drag my dude
<FromGitter> <Qwerp-Derp> Does it work?
<oprypin> yes..
<oprypin> well you're subtracting @mouse_pos so what exactly do you expect?
<FromGitter> <Qwerp-Derp> WDYM I'm subtracting `@mouse_pos`? I'm calculating the diff between the new position of the mouse and the original position the mouse was in
<FromGitter> <Qwerp-Derp> If I added them then the grid would be off of the grid
<oprypin> yes but if the mouse moves down you want the position to go down
<FromGitter> <Qwerp-Derp> TTYL, I'll be back in ~30 minutes
<oprypin> need to add mouse position and subtract orignal position
<FromGitter> <Qwerp-Derp> Did that, doesn't work
<oprypin> it's broken in more than one place due to extreme over-engineering
<FromGitter> <pnloyd> @oprypin have you successfully parallelized anything in not super trivial contexts?
<oprypin> no
<oprypin> the use case is heavy computation, confined to pre-allocated memory
<FromGitter> <Qwerp-Derp> I'm pretty sure the image is just flipped around for some reason, when I print out the sprite's position in `listener`, it's the expected position, but flipped horizontally
<oprypin> no it's your coordinate handling
<FromGitter> <Qwerp-Derp> ??? My coordinate handling is fine, it doesn't work when you flip the addition around like you said
gewo has quit [Quit: WeeChat 1.6]
<watzon> I can't remember how to accept post data in kemal
<watzon> And it doesn't seem as if there are any examples on the site
<watzon> I can get it to work for urlencoded form data, but not JSON
<watzon> Nvm. `env.params.json` works
<FromGitter> <Qwerp-Derp> Wait what it's suddenly working now
claudiuinberlin has quit [Read error: Connection reset by peer]
alex`` has joined #crystal-lang
<FromGitter> <sdogruyol> Hey everyone
<FromGitter> <sdogruyol> We're on front page of HN please upvote :)
<FromGitter> <sdogruyol>
<FromGitter> <asterite> Patrick Loyd: I'd you use any IO inside threads, or anything concurrency related (fibers), it will crash. Don't use threads, they don't work
<FromGitter> <asterite> I'd - > if
<FromGitter> <sdogruyol> we're on top of HN now
olbat has quit [Ping timeout: 240 seconds]
<FromGitter> <paulcsmith> πŸŽ‰
Groogy2 has joined #crystal-lang
Groogy has quit [Disconnected by services]
Groogy2 is now known as Groogy
Groogy_ has joined #crystal-lang
<FromGitter> <unreadable> hehe, facebook is using vue js on frontend :X
<FromGitter> <paulcsmith> No way! That's interesting. I've been thinking about trying it out. I really like the concepts after reading their guides
<FromGitter> <fridgerator> I like vue, much more than react
<FromGitter> <ansarizafar> Try . Even Creator of VueJs trying to copy Stenciljs. Web components are here.
<FromGitter> <ansarizafar> I had developed with NodeJs + Vuejs. Now trying to port that same project to Crystal + Stenciljs. Amazing combination.
<FromGitter> <paulcsmith> Nice! I'll check it out
<FromGitter> <ansarizafar> Stenciljs is a compiler and not a framework like Vuejs or React.
<oprypin> facebook's frontend is a trainwreck, not sure if you want to follow that
<dom96> where is facebook using vue?
_whitelogger has joined #crystal-lang
<FromGitter> <unreadable> Idk, I've an extension that tells me that fb uses At Least 20%
<FromGitter> <unreadable> Vue
<oprypin> ...
<crystal-gh> [crystal] lbguilherme opened pull request #5197: Implement Digest::SHA256 (master...sha256)
<crystal-gh> [crystal] MakeNowJust opened pull request #5198: Format: fix indentation of last comment of exception handler block (master...fix/crystal-format/5196-format-last-comment-of-exception-handler-block)
<FromGitter> <fridgerator> ... what?
<FromGitter> <unreadable> Check
<FromGitter> <unreadable> It injects a script that gets the job done
<crystal-gh> [crystal] myfreeweb opened pull request #5199: Support FreeBSD 12 (64-bit inodes) (master...master)
<FromGitter> <fridgerator> are there any blog posts / information on profiling a crystal app with mac Instruments ? @sdogruyol
<crystal-gh> [crystal] RX14 opened pull request #5200: Disallow invalid values to be set in XML::Node (master...bugfix/xml-special-entities)
<FromGitter> <faustinoaq> @fridgerator Maybe this πŸ‘‰
<FromGitter> <fridgerator> thnx
<FromGitter> <jwaldrip> @asterite Saw a tag drop for 0.24.0, can we expect an updated changelog soon to track whats new in this version?
<FromGitter> <fridgerator> There is a changelog on the tag
<FromGitter> <fridgerator> well... there was
<FromGitter> <fridgerator> its gone now
<FromGitter> <jwaldrip> lol
<FromGitter> <jwaldrip> i just found the email with the changelog.
<FromGitter> <jwaldrip> Is the CHANGLOG file itself no longer being maintained?
<RX14> is there any at all popular modern web framework which uses a rails-style generator?
<RX14> because i see crystal web frameworks with rails-styles generators (1 other thing to set up and install and learn) and I wonder why they do it?
<RX14> they simply can't think up of a web framework design which doesn't require unneccesary boilerplate to the point of templating it?
<RX14> they're too uncreative to think of a design which sin't rails?
<RX14> if you want to make a rails clone make a rails clone but if you want to make a modern web framework (rails isn't modern at all) you shouldn't be using the hack which is code generators
<RX14> </rant>
<FromGitter> <jwaldrip> Generators can be nice…
<RX14> no they're an ugly hack
<FromGitter> <jwaldrip> Just to create the nesicary files.
<RX14> ok they're acceptable to start a project
<RX14> but we already have one of those
<RX14> crystal init
<FromGitter> <jwaldrip> sure.
<FromGitter> <jwaldrip> I can see that
<RX14> your setup instructions for a new web framework should be require "framework" and like 3 lines of code
<FromGitter> <jwaldrip> I see rails generators for models to be nice because they create spec, model and migration.
<FromGitter> <jwaldrip> well rails is routing, models, controllers, etc
<FromGitter> <jwaldrip> albeit a bit of overhead in all those areas
<FromGitter> <jwaldrip> and a bunch of needed abstraction on top of rack.
<FromGitter> <jwaldrip> Crystal HTTP is a bit easier to understand and interact with, and is native to the language.
<FromGitter> <jwaldrip> I see crystal as being a little bit more like go in the sense that you can pick and choose the various components.
<RX14> so why come I never have to install generators when I use other modern web frameworks? what do they do differently?
<FromGitter> <jwaldrip> bring your own router, your own ORM/ODM/Mapping model.
<FromGitter> <jwaldrip> rails is opinionated and their generators help enforce those opinions.
<FromGitter> <jwaldrip> like file structure.
<FromGitter> <jwaldrip> rails apps all look vastly the same in that sense, where if you look at other web frameworks or languages, it can vary quite a bit.
<FromGitter> <drujensen> @jwaldrip πŸ‘
<FromGitter> <jwaldrip> i see generators as a way to enforce design and structure.
<RX14> i think we can be opinionated without spreading things between many files
<RX14> for example adding a new column to a model
<RX14> should just be adding 1 line to the model types and then adding 1 line for a simple migration
balduin has joined #crystal-lang
<RX14> idk it just feels wrong
<FromGitter> <jwaldrip> but where was that migration, where was that model?
<RX14> it's bad user experience to make be install commandline tools to use your frameworks
<Yxhuvud> people actually use the generators? I thought they were only to help newbs writing ideomatic structure
<RX14> installing something at the commandline is enough friction to make me disregard a framework
<RX14> thats something to strongly consider
<FromGitter> <jwaldrip> you dont HAVE to install a CLI.
<RX14> so then why do all the tutorials require it?
<FromGitter> <jwaldrip> On?
<RX14> HAVE to is a strong word
<FromGitter> <jwaldrip> Rails?
<FromGitter> <jwaldrip> or something like amber?
<RX14> something like amber
<RX14> rails too
<RX14> everyone uses the generator so they never tell you how to live without
<RX14> if you are going to have a code generator make it really optional and introduce it later in the tutorial
<RX14> people should do the motions manually a few times to really understand the generator
<FromGitter> <drujensen> I have several amber projects without using the generator
<RX14> plus it gives them some runway before hitting them with the brick wall of installing another CLI tool
<RX14> soo
<FromGitter> <drujensen> the CLI tool is just that, a tool. nothing stopping you from just includiing the shard
<RX14> if i look at the amber docs
<RX14> it's "getting started"
<RX14> striaght into "installation" which is all about the CLI
<RX14> and after that there's a huge CLI tool reference
<RX14> it's daunting
<FromGitter> <drujensen> well it is targeting newbies
<RX14> yes
<FromGitter> <drujensen> and?
<RX14> and as a newbie i don't want to deal with installing yet another thing
<RX14> because that installation will invariably go wrong
<RX14> on mac it's a little easier because you have homebrew
<FromGitter> <drujensen> it is a barrier, true
<RX14> on linux you're facing installing something globally which isn't in the distro repos
<Papierkorb> I don't see your issue? If you don't like frameworks using generators, don't use those frameworks?
<FromGitter> <drujensen> yes, on linux its a pain
<FromGitter> <drujensen> right, use Kemal. lol
<RX14> Papierkorb, sure but my issue is that all the new frameworks for crystal I see use generators
<Papierkorb> We already have a handfull of small and big frameworks in Crystal, and a gazillion to choose from in Ruby
<Yxhuvud> or use them, but ignore the generators. Works well for me.
<FromGitter> <fridgerator> Its pretty to easy to run amber in a single file that is ~20 lines
<Papierkorb> RX14: I'd actually prefer if there was a way to load a custom template into the crystal init command
<RX14> there's a big gap between "you can theoretically not use the generator" and "all the documentation and tutorials and guides use the generator"
<RX14> and the latter is definitely the case of rails
<FromGitter> <drujensen> Its about target audience
<Papierkorb> That'd help tremendously for newcomers, or people who just want to try stuff without having to get shit working
<RX14> if you want to change that in crystal then you should change your documentation to change the feel
<RX14> to make it feel like the cli is optional
<RX14> instead of slamming straight into it in the welcome guide
<Papierkorb> it's the easiest route, so it's ideal for a welcome guide
<Papierkorb> if someone wants to do it the hard way, they can
<Papierkorb> Or not and do something else
<FromGitter> <drujensen> we could add a 20 liner somewhere in the docs
<FromGitter> <eliasjpr> Papierkorb: That would be great to include templates in crystal
<RX14> i completely disagree, unless your framework is horiffic, CLI shouldn't become worth the pain until you're using the framework daily
<Papierkorb> Especially the initial project creation can be well automated. Hence the init command.
<Papierkorb> RX14: You're arguing against `crystal init`?
<RX14> no
<Papierkorb> Because it basically does just that
<RX14> crystal init templates a bunch of things we can't change
<RX14> like license, shards, gitignore, etc
<Papierkorb> I can live without scaffolding stuff, but automated project initialization is a good thing
<FromGitter> <drujensen> sorry, whats the diff?
<FromGitter> <drujensen> `amber new blog`
<RX14> starting with a new framework should be crystal init and 3 lines of code
<FromGitter> <eliasjpr> Papierkorb : scaffolding is always optional, is simplicity of use the objective
<Papierkorb> You do realize that a big web application is much more complicated than that RX14?
<RX14> yes but a framework should be able to scale sensibly
<FromGitter> <drujensen> we tried using post install but that is just bad
<RX14> from small applications with no configuration (good defaults)
<RX14> to a large project which obviously does need a lot of work put in
<FromGitter> <eliasjpr> it can, scaling is about the design the user of the framework chooses
<Papierkorb> RX14: History has shown that "small applications" will become big applications in time, and many devs really need all guidance they can get
<RX14> yes and the framework should provide a good route to get between a and b
<RX14> not start at b
<Papierkorb> That's not really how it works in the real world
<Papierkorb> That's how it would be ideally
<Papierkorb> But it's not how it's in practice
<FromGitter> <drujensen> well, another target is Rails Devs
<FromGitter> <eliasjpr> Scaling is a complete different thing, I mean look I can have a Kemal, very simple and porwerful framework and make it unscalable, if I choose a poor design, that can happen with any framework
<FromGitter> <drujensen> who will be quite familiar with Amber’s structure
<RX14> rails devs are going to be using an entirely different language
<RX14> they can use some modernization in other areas too
<FromGitter> <drujensen> ???
<Papierkorb> application architecture is a whole topic on its own, filling books. Many devs don't want to bother. You don't have to like it (I surely don't), but it's the way it is. Pushing those into the right direction is a good thing
cyberarm has quit [Ping timeout: 240 seconds]
<RX14> yes thats why you have a fantastic tutorial
<RX14> which shows them how to lay out their project
<FromGitter> <drujensen> or a simple generator
<FromGitter> <fridgerator> whats the point of this discussion? lol
<FromGitter> <eliasjpr> RX14: Write us a tutorial on Amber on how you think it should be, the community would truly appreciate that
<FromGitter> <fridgerator> people have different opinions and preferences
<FromGitter> <drujensen> @fridgerator true. It sounds like a preference thing
<Papierkorb> And honestly, a custom skeleton feature for the init command would be much appreciated
<FromGitter> <fridgerator> ^ sounds like a good idea
<FromGitter> <drujensen> πŸ‘
<FromGitter> <eliasjpr> πŸ‘
<FromGitter> <eliasjpr> A true crystal REPL will be even more appreciated :)
<RX14> well dont get your hopes up
<FromGitter> <eliasjpr> ICR does the job, but...
<FromGitter> <drujensen> πŸ‘
<FromGitter> <eliasjpr> RX14: On the article or the REPL?
<RX14> repl
<RX14> both
<RX14> everything
<FromGitter> <eliasjpr> Lol πŸ‘Ž
<FromGitter> <eliasjpr> why so negative
<FromGitter> <fridgerator> probably because he knows the crystal codebase, lol
<FromGitter> <fridgerator> crystal / compiler
<FromGitter> <unreadable> I really like the standard http lib even more than the go one
vivus has joined #crystal-lang
<vivus> Hello. Which Crystal web framework is the most popular?
<FromGitter> <unreadable> Kemal express like and amber FOR mvc
<FromGitter> <unreadable> If u're not gonna have a large project go for stdlib and a swich for routing
jrwren has joined #crystal-lang
dviola has joined #crystal-lang
hightower4 has joined #crystal-lang
hightower3 has quit [Ping timeout: 240 seconds]
<vivus> im just tinkering. I'll test out amber then
<crystal-gh> [crystal] lbguilherme opened pull request #5202: Don't lookup super method on the top level (master...super)
csk157 has joined #crystal-lang
<FromGitter> <marksiemers> Regarding having generators vs not, from my experience teaching software development to newbies. They learn a ton from looking at the code a generator creates. Often more than they learn from a guide. ⏎ I think have a "barebones" or "skeleton" section to the guides is a good idea. It is just a different target audience - someone who is new to the framework, but it familiar with the language and/or
<FromGitter> ... computer science and web fundamentals.
<FromGitter> <marksiemers> ^ by my experience, I mean my full time job for the past 18 months.
<FromGitter> <unreadable> Wth, nodejs does better than crystal on techempower oO
<FromGitter> <marksiemers> Which round? I think Round 14 was pretty abysmal for Crystal, but the preview for Round 15 looks good.
<FromGitter> <marksiemers>
<RX14> yes
<RX14> round14 was comparing crystal on 1 core vs everything else running on 80 cores
<RX14> we do much much better now
greengriminal has joined #crystal-lang
<FromGitter> <unreadable> For a single threas, node does pretty good I'd say
<FromGitter> <unreadable> Thread*
<RX14> nodejs doesnt run on a single thread either in that benchmark
<RX14> they use cluster mode
<RX14> we also use a single thread
<FromGitter> <marksiemers> RX14 - AFAYK, is crystal approaching its benchmark limit for plaintext or is there still potential for significant increases (50% or more) on the same hardware?
alex`` has quit [Ping timeout: 264 seconds]
<RX14> well its theoretically possible to match ulib im sure
<RX14> it's just whether its practical
<RX14> there are surely low-hanging fruit though
<FromGitter> <marksiemers> True, 2.5M, that's pretty good. ⏎ It seems crystal falls off a bit (relatively) when it comes to DB operations. Any thoughts there? Room for significant improvement in `crystal-pg`?
<RX14> probably
<RX14> nobody's benchmarked crystal-db or crystal-pg
<RX14> nor do we have regression testing
<FromGitter> <unreadable> Node js and js in general is single threaded language, how do they run in on more threads???
<RX14> crystal is a single threaded language
<RX14> how do we run in more threads?
<RX14> answer? more processes
<RX14> you keep 1 thread per process
<RX14> but just spawn more processes
<RX14> no shared memory
<FromGitter> <unreadable> Nailed it
<RX14> and use something like reuse_port or fork to share a listen port
<RX14> we use reuse_port
<RX14> i think nodejs uses fork
<RX14> but it's just a cheap and dumb method of scaling
<RX14> but it works
<c-c> processes is what you start to use when you grow up
<RX14> well not everything is possible to scale without sharing global state
<RX14> HTTP is
<RX14> a lot of things are
<RX14> but some things you need to do it the old dumb way
<c-c> you mean using threads?
<RX14> yep
<c-c> well, if you want to complicate your programmatic problem-set
<RX14> sometimes you need to to get acceptable performance
<RX14> im not saying its too common though
<RX14> c-c, having multiple cores share 1 GC would probably be a benefit too
<RX14> but thats much more minor
<c-c> Well, to be honest, I know nothing about crystal's internals. But a common GC sounds like globally shared memory allocation thang
<c-c> and that just sounds waird
<FromGitter> <marksiemers> Amber struggled in the benchmarking and one hypotheses is there were too many GCs spawned on an 80 core machine and they competed for resources.
<FromGitter> <marksiemers> There is a PR with TechEmpower to try to fix it.
<FromGitter> <unreadable> Shouldn't LLVM optimize that?
<RX14> wat
<FromGitter> <marksiemers> RX14 - is that for me or unreadable?
<RX14> unreadable
<FromGitter> <unreadable> The GCs
<RX14> thats not how any of this works
<c-c> I don't see how the number of cores relates to CG. Apparently theres a way to run GC on a programs memory space without the GC being part of the program?
<RX14> c-c, no
<RX14> if you have 1 process with 80 threads you have 1 GC which pauses every thread
<RX14> does it's work
<RX14> and then finishes
<RX14> if you have 80 processes you have 80 seperate GCs
<c-c> ok, I'm not entirely lost
<RX14> which means much higher overhead
<RX14> especially when the off-the-shelf GC we uses uses concurrent garbage collection
<RX14> so suddenly your singlethreaded process is trying to use 16 threads to GC 1 thread
<RX14> which is... suboptimal
<RX14> it muddies the scheduler
<FromGitter> <unreadable> Can crystal be used without a GC?
<RX14> destroys caches on 16 cores
<RX14> @unreadable yes but not for long lol
<FromGitter> <marksiemers> RX14 - is there a known way in crystal to limit the number of GCs?
<RX14> yes
<RX14> the ones suggestind in the thread
<c-c> So the problem is crappy GC, not GC
<RX14> the GC_MARKERS env var
<RX14> c-c, if you had say 16 processes of 5 threads
<RX14> or 8 processes of 10 threads
<RX14> I think that would be more efficient
<FromGitter> <unreadable> I think crystal would benefit by implementing destructors on'll be less pressure on the GC
<RX14> since the GC has much more work to do in each pause
<RX14> which means more throughput c-c
<c-c> What I have most of the time is 1 process with 1 thread.
<c-c> It works great.
<RX14> c-c, throughput and latency
<RX14> it's a GC tradeoff
<RX14> it's about finding the right balance
<c-c> Crystal should steal Rust's borrow
<c-c> *clone
<RX14> rust requires annotations for it's borrow checker
<RX14> i doubt we're going to be redesigning the language to be GCless
<c-c> Naw, just have both
<RX14> complicating design
<c-c> Compile time out-figuring for the borrowed variables may be complicated, I haven't read the source - but I bet its dead simple
<FromGitter> <unreadable> Rust also has a very smart memory management system which looks dead simple
<FromGitter> <unreadable> But sometimes, less is better
<c-c> B) Ah well, I have to finish my lil game engine base in ruby, so I can start porting it to crystal later, thanks for mindshare
<FromGitter> <asterite> Simple? You can't
tdc has quit [Ping timeout: 248 seconds]
<FromGitter> <HCLarsen> There's one thing about Crystal that I'm curious about. It seems to work well as a language, so why's it still in Alpha?
cyberarm has joined #crystal-lang
<FromGitter> <marksiemers> I think they still want to be able to make a lot of breaking changes before getting to 1.0
<RX14> i wouldnt say its alpha
<RX14> it's pre-release
<RX14> i don't think "alpha" and "beta" are really meaningful
<RX14> but we're definitely not ready for 1.0
<Papierkorb> I'd call it a Beta-on-an-overall-good-track
<RX14> there are beta parts and there are alpha parts
<RX14> then there's stuff like random's API which i would say doesnt have to be changed before release
<FromGitter> <HCLarsen> The Github page says Alpha, so that's why I used the term.
<FromGitter> <HCLarsen> The main point is wondering why it's not 1.0 yet.
<Papierkorb> Time and money
nathanj has joined #crystal-lang
<RX14> mostly the lack of ir
<RX14> it*
<FromGitter> <HCLarsen> What more needs to be done to it?
<FromGitter> <marksiemers> There are over 300 open issues - some subset of those I assume.
<FromGitter> <HCLarsen> A fair, yet vague assumption.
<FromGitter> <asterite> Well, you can get segmentation fault on valid code. Wrong code generated. Lots of bugs related to generics. I don't think that's valid to have in a 1.0 release
<RX14> well unfortunately i suspect that the "bugginess" of the compiler will only truly be fixed by a rewrite
<RX14> and we definitely dont have the manpower for that
<RX14> so we should just carry on and build a spec suite to prop up the compiler until it can be rewritten
<RX14> or at least refactoried enough
<FromGitter> <unreadable> Well, a compiler rewrite sounds pretty huge..there should be some workarounds
<FromGitter> <HCLarsen> That answers my question. I was certainly not aware of those bugs. I'd offer to help, but I don't know squat about writing a compiler.
cyberarm has quit [Ping timeout: 240 seconds]
cyberarm has joined #crystal-lang
Groogy has quit [Quit: WeeChat 1.9]
csk157_1 has joined #crystal-lang
csk157 has quit [Ping timeout: 240 seconds]
RickHull has joined #crystal-lang
csk157_1 has quit [Ping timeout: 248 seconds]
<FromGitter> <faustinoaq> > Next generation compilation technology supporting Java, Ruby, R, JavaScript, LLVM, and more... ⏎ ⏎ Very interesting VM by Oracle