jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.28.0 | 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
<FromGitter> <jayleeran> I'm trying to upgrade something to work with 0.28.0. I'm running into a weird shards issue. ⏎ ⏎ 1) `shards install` runs perfectly. ⏎ 2) `shards update` works just fine. ⏎ 3) All the deps seem to work as expected. ... [https://gitter.im/crystal-lang/crystal?at=5cc39c98b4700e023ddb6273]
<FromGitter> <jayleeran> Is there anyway to get a more verbose error or has anyone else ran into something like this before? A google search didn't return anything useful.
<FromGitter> <Blacksmoke16> prob just a bug with that command
<FromGitter> <jayleeran> Probably. But it seems to have worked fine with 0.27.2.
<FromGitter> <Blacksmoke16> hmm
<FromGitter> <jayleeran> shards doesn't seem to have changed since febrary.,
<FromGitter> <dscottboggs_gitlab> why would it?
<FromGitter> <dscottboggs_gitlab> oh that was weird... only the most recent message was showing up until after I replied to it
<FromGitter> <jayleeran> I'm not saying it should have changed.
<FromGitter> <jayleeran> got it.
<FromGitter> <jayleeran> There must be something in the criteria it checks other than just being able to install and work properly.
<FromGitter> <jayleeran> Yeah we looked through that but didn't dive too deep into the method calls into other files. Need to probably dig through that.
<FromGitter> <dscottboggs_gitlab> I don't see anything obvious that would be an issue... perhaps just raise an issue on the shards repo
<FromGitter> <dscottboggs_gitlab> the people who actually write the code don't really frequent the chat but they do take note of bug reports
<FromGitter> <jayleeran> Yeah I can see that. I just don't want to report a bug if I'm just misunderstanding something. Thanks.
<FromGitter> <dscottboggs_gitlab> doesn't seem like it to me
<FromGitter> <dscottboggs_gitlab> `shards check` works on the repo I'm on now
<FromGitter> <jayleeran> Yeah I can make it work on a few other projects as well. Possibly related to using `path: ../project_name` instead of github. Although I can make it work as well on other projects. ⏎ ⏎ My guess is that there is something in one of the deps shard files or something (crystal version?) which causes `shard check` to fail even though it actually `shard installs` and works.
<FromGitter> <dscottboggs_gitlab> yup
<FromGitter> <jayleeran> I think I got it: ⏎ ⏎ Given the directory tree: ⏎ ⏎ ```dep1: ⏎ path: ../``` [https://gitter.im/crystal-lang/crystal?at=5cc3a20c6a84d76ed8ff2112]
<FromGitter> <dscottboggs_gitlab> intersting
<FromGitter> <Blacksmoke16> check it out @dscottboggs_gitlab ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ we getting there :p [https://gitter.im/crystal-lang/crystal?at=5cc3a2482e2caa1aa6c5d4d3]
<FromGitter> <dscottboggs_gitlab> I don't get it...
<FromGitter> <dscottboggs_gitlab> hang on
<FromGitter> <Blacksmoke16> annotation ORM 😉
<FromGitter> <Blacksmoke16> inheritance works fine as far as i can tell, should make STI/MTI easier
<FromGitter> <Blacksmoke16> in the future*
<FromGitter> <dscottboggs_gitlab> why isn't it ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ like....I get that you like annotations but you've gotta draw the line somewhere! [https://gitter.im/crystal-lang/crystal?at=5cc3a3483d78aa6c039f60b5]
<FromGitter> <Blacksmoke16> :S
<FromGitter> <dscottboggs_gitlab> (sorry) :(
<FromGitter> <dscottboggs_gitlab> but like...property is already a macro, why not just reimplement `property` as column.
<FromGitter> <Blacksmoke16> i thought about that version, this is more of a proof of concept so just trying to see whats possible w/o normal macros
<FromGitter> <dscottboggs_gitlab> shit, you could even overload `property` within a module/class that `include`s some module
<FromGitter> <dscottboggs_gitlab> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cc3a3ee1cd0b8307d7c1027]
<FromGitter> <Blacksmoke16> yea and really as long as the `column` macro defines the property/ivar still could use annotations above it
<FromGitter> <Blacksmoke16> planning on using CrSerializer for the validations
<FromGitter> <Blacksmoke16> so wont have to do like db validations and deserialization separately,
<FromGitter> <dscottboggs_gitlab> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cc3a44197dcb371d81d3a0e]
<FromGitter> <dscottboggs_gitlab> nice
<FromGitter> <Blacksmoke16> whast the `include Charon::PropertyColumns`?
<FromGitter> <dscottboggs_gitlab> sec
<FromGitter> <dscottboggs_gitlab> that would be a module which would be like ⏎ ⏎ ```module PropertyColumns ⏎ def property ⏎ ... ⏎ end ⏎ end``` ⏎ ⏎ and overload property to create not just an instance variable and getter/setter, but a db column as well [https://gitter.im/crystal-lang/crystal?at=5cc3a4b54b4cb471d96383cc]
<FromGitter> <Blacksmoke16> oh i see
<FromGitter> <dscottboggs_gitlab> it would have to also implement `property!` and `property?` but yeah
<FromGitter> <dscottboggs_gitlab> cleans things up a lot without making a weird DSL
<FromGitter> <dscottboggs_gitlab> would that sort of idea be able to handle `getter` and `setter` as well?
<FromGitter> <Blacksmoke16> downside with that tho, what about properties that you dont want to be db columns?
<FromGitter> <dscottboggs_gitlab> annotation?
<FromGitter> <Blacksmoke16> so kinda like the opposite
<FromGitter> <Blacksmoke16> annotation virtual columns and just assume rest are columns
<FromGitter> <dscottboggs_gitlab> more than likely there will be less properties ignored overall than not ignored
<FromGitter> <Blacksmoke16> thats not a bad idea
<FromGitter> <dscottboggs_gitlab> and you could always keep the annotations so you could not `include` the module and do the inverse
<FromGitter> <Blacksmoke16> i might do that, just assume properties w/o like `@[Charon::Virtual]` are columns
<FromGitter> <Blacksmoke16> would clean it up a bit
<FromGitter> <Blacksmoke16> good call
<FromGitter> <Blacksmoke16> again one of the main reasons i like annotations is that the implementation could change and everything would still work
<FromGitter> <Blacksmoke16> vs macro dsl is its easier to cause breaking changes
<FromGitter> <Blacksmoke16> going to make another blog post using this and Athena once its to a more stable point, not a fan at all of having to do the array of strings in Granite :/
<FromGitter> <dscottboggs_gitlab> :)
<FromGitter> <dscottboggs_gitlab> sorry to be so critical
<FromGitter> <Blacksmoke16> no no its good
<FromGitter> <Blacksmoke16> dont get much feedback so is at least good to hear thoughts
<FromGitter> <dscottboggs_gitlab> but tbf you're kinda askin for it asking someone whose like into syntactical aesthetics and hates crystal's annotation syntax :p
<FromGitter> <Blacksmoke16> :s
<FromGitter> <dscottboggs_gitlab> jsjs
<FromGitter> <Blacksmoke16> saw that reddis thread about a guy wanting to make a REST api, and was like oo my time to shine
<FromGitter> <Blacksmoke16> apparently he wasnt impressed :/
<FromGitter> <dscottboggs_gitlab> oh, that sucks :(
<FromGitter> <Blacksmoke16> id like to hear his feedback, i mean thats literally what its made for
<FromGitter> <dscottboggs_gitlab> There's a library that's trying to auto-generate crystal structs from JSON APIs
<FromGitter> <Blacksmoke16> link?
<FromGitter> <dscottboggs_gitlab> https://github.com/z64/api_mapper
<FromGitter> <Blacksmoke16> neat
<FromGitter> <Blacksmoke16> i feel like that would be quite challenging giving as you're basically parsing dynamic json
<FromGitter> <Blacksmoke16> lol is like 60 lines
<FromGitter> <dscottboggs_gitlab> haha
<FromGitter> <dscottboggs_gitlab> that's kinda what I was thinking
<FromGitter> <Blacksmoke16> what its doing now is easy
<FromGitter> <dscottboggs_gitlab> doesn't seem like a crazy complicated concept
<FromGitter> <Blacksmoke16> will be challenging when you get to like `T`
<FromGitter> <Blacksmoke16> as every T you'll need to build out another struct
<FromGitter> <dscottboggs_gitlab> You could use it as a template to offer that feature in Charon
<FromGitter> <Blacksmoke16> with those types and do that recursively
<FromGitter> <dscottboggs_gitlab> JSON doesn't support recursive types
<FromGitter> <Blacksmoke16> or make it so you can build out your API/Models using Athena/Charon from swagger docs
<FromGitter> <dscottboggs_gitlab> yup
<FromGitter> <Blacksmoke16> no i mean like when you hit `begin_object` that would have to be another struct
<FromGitter> <Blacksmoke16> in order for the serializable stuff to work
<FromGitter> <dscottboggs_gitlab> what's wrong with that?
<FromGitter> <Blacksmoke16> nothing?
<FromGitter> <dscottboggs_gitlab> that would be super compelling, if you could auto-generate a rough sketch of your models and CRUD controllers from some JSON examples or standardized documentation format
<FromGitter> <Blacksmoke16> all in due time...ha
<FromGitter> <dscottboggs_gitlab> like it doesn't even have to compile, just save me a couple hunred keystrokes! :p
<FromGitter> <Blacksmoke16> to/from swagger 3.0 is on my to do list
<FromGitter> <Blacksmoke16> to is going to be a lot easier than from
<FromGitter> <dscottboggs_gitlab> that's for sure
<FromGitter> <dscottboggs_gitlab> wish i had time to offer to help but I am swamped these days
<FromGitter> <Blacksmoke16> all good
<FromGitter> <dscottboggs_gitlab> :)
<FromGitter> <Blacksmoke16> just need to get some people using it to get feedback
<FromGitter> <Blacksmoke16> but its in a pretty good state right now, so was hoping that guy would have been like "omg thats perfect thanks" :p
<FromGitter> <dscottboggs_gitlab> haha yeah that would've been great :)
<FromGitter> <Blacksmoke16> hows that package manager iirc thing going?
<FromGitter> <dscottboggs_gitlab> it's ok... I've been kinda slipping a bit on it. I wrote a monitoring/pinging script and that took up...way more time than I thought it would. Gonna try to play catch up this weekend and next though
<FromGitter> <Blacksmoke16> went down the rabbit hole eh?
<FromGitter> <dscottboggs_gitlab> a little bit. Idk it's so easy to underestimate scope, even without feature creep
<FromGitter> <Blacksmoke16> yea i couldn't imagine, i wouldnt know where to begin
<FromGitter> <dscottboggs_gitlab> It's not that complicated. It reads a JSON config file (the one we were struggling with the other day) to ping either a URL or a shell command every X seconds, and sends a telegram message if the command fails. `wc -l` says 338 total LOC
<FromGitter> <Blacksmoke16> where did you end up on that?
<FromGitter> <Blacksmoke16> get it working?
<FromGitter> <dscottboggs_gitlab> it has a TON of room to grow, with more types of "pingers" and notifiers other than telegram but rn it will do what I need it to do (send me a message when one of my sites goes down)
<FromGitter> <dscottboggs_gitlab> > get it working? ⏎ ⏎ yup
<FromGitter> <Blacksmoke16> just doing like a head request or something?
<FromGitter> <dscottboggs_gitlab> the `options` allows you to set the URL, method, and body to check for. I seem to have overlooked response code (lol whoops) but I'm gonna add that now
<FromGitter> <Blacksmoke16> can make use of the new `HTTP::Status` type
<FromGitter> <Blacksmoke16> is 💯
<FromGitter> <dscottboggs_gitlab> the plan is to add a message listener too so that I can send a message back like `restart nextcloud` and it'll do like `systemctl restart nextcloud`
<FromGitter> <dscottboggs_gitlab> is that new??
<FromGitter> <Blacksmoke16> part of `0.28.0` yea
<FromGitter> <Blacksmoke16> allows you to do like `ctx.response.status.success` or `ctx.response.status = HTTP::Status::NO_CONTENT`
<FromGitter> <Blacksmoke16> is pretty slick imo
laaron has quit [Remote host closed the connection]
<FromGitter> <Blacksmoke16> `.success?`*
laaron has joined #crystal-lang
alex2``332 has joined #crystal-lang
alex2``33 has quit [Ping timeout: 250 seconds]
ashirase has quit [Ping timeout: 245 seconds]
ashirase has joined #crystal-lang
rohitpaulk has joined #crystal-lang
alex2``332 has quit [Ping timeout: 246 seconds]
ashirase has quit [Ping timeout: 250 seconds]
ashirase has joined #crystal-lang
ashirase has quit [Ping timeout: 245 seconds]
ashirase has joined #crystal-lang
ashirase has quit [Ping timeout: 245 seconds]
rohitpaulk has quit [Ping timeout: 258 seconds]
ashirase has joined #crystal-lang
ashirase has quit [Ping timeout: 246 seconds]
ashirase has joined #crystal-lang
ashirase has quit [Ping timeout: 246 seconds]
ashirase has joined #crystal-lang
ashirase has quit [Ping timeout: 250 seconds]
ashirase has joined #crystal-lang
sagax has joined #crystal-lang
<oprypin> > The Go programming language omits assert(). The Go developers recognize this is contentious. Disallowing assert() is essentially telling developers that they are not allowed to do run-time verification of invariants. It is as if the developers of Go do not want coders to prove the software is correct. The SQLite developers believe that the lack of assert() disqualifies Go as a language for serious development work.
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
hightower2 has quit [Ping timeout: 258 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
_whitelogger has joined #crystal-lang
hightower2 has joined #crystal-lang
ashirase has quit [Ping timeout: 250 seconds]
ashirase has joined #crystal-lang
<FromGitter> <vladfaust> Is there any reason we don't have `Number#to_slice`? https://carc.in/#/r/6snr
waheedi has joined #crystal-lang
<FromGitter> <vladfaust> It also would be cool to https://carc.in/#/r/6sns, but for some reason the restriction doesn't work (see https://github.com/crystal-lang/crystal/blob/639e4765f3f4137f90c5b7da24d8ccb5b0bfec35/src/int.cr#L692)
waheedi has quit [Client Quit]
<Yxhuvud> I don't understand why we would *want* to have that.
<Yxhuvud> Typically, you want to avoid small allocations as many small allocations tend to be a lost costlier than a few large.
<FromGitter> <solaspace> Hello, just giving Crystal a try today and very impressed with what the Crystal developers have produced; such low inertia to get started. Just wondering if Blocks can be stateful, without polluting a higher scope ?
_whitelogger has joined #crystal-lang
<FromGitter> <vladfaust> @yxhuvud it's useful when working with remote APIs
<FromGitter> <vladfaust> For example, I store ints as bytes, which is more efficient
<FromGitter> <vladfaust> @solaspace https://crystal-lang.org/reference/syntax_and_semantics/blocks_and_procs.html#performance ⏎ ⏎ > When using blocks with yield, the blocks are always inlined: no closures, calls or function pointers are involved.
<Yxhuvud> vladfaust: That makes no sense.
<FromGitter> <vladfaust> Why's that?
<Yxhuvud> Why do you think it would be more efficient to have bytes than to have ints?
<FromGitter> <vladfaust> Efficiency in my case is less RAM taken
<Yxhuvud> .. but storing an int in a slice take more memory! The value itself takes an equal amount of memory, but there is also a pointer to it if you have it as a slice.
<FromGitter> <solaspace> Thanks Vlad. I had noticed that statement but I wanted to double check if my interpretation was correct. Given the blocks are inlined I thought it was might be possible Crystal inline a variable into the inclosing method scope.
<FromGitter> <vladfaust> @yxhuvud well, I might have been confused by Redis Desktop manager, which said that "sliced" value takes only 4 bytes, rather than "text int" which takes 10 bytes if it's Int32::MAX
<FromGitter> <vladfaust> However, `MEMORY USAGE` tells that sliced values actually takes 6 bytes more
<Yxhuvud> .. What you are saying is that the textual decimal representation of Int32::MAX has 10 digits. Well, thankfully the internal representation of ints in crystal is binary and not textual.
<FromGitter> <vladfaust> Thanks for the insight!
<FromGitter> <vladfaust> @solaspace I'm that deep into the internals, but usually using outside local variables inside blocks
alex2``332 has joined #crystal-lang
alex2``332 has quit [Client Quit]
alexherbo2 has joined #crystal-lang
alexherbo2 is now known as alex``
rohitpaulk has joined #crystal-lang
<FromGitter> <solaspace> @vladfaust In the docs I am sure it said everything is an object so I assumed blocks were as well. I think that is what gave me some incorrect assumptions. I was thinking something like : method do with z=1 |x| z+=x end was possible.
rohitpaulk has quit [Ping timeout: 246 seconds]
alex``6 has joined #crystal-lang
alex`` has quit [Ping timeout: 245 seconds]
Jenz has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> @solaspace blocks *can* be objects, they become a closure type called a `proc` in that case.
<FromGitter> <dscottboggs_gitlab> a `Proc` is a representation of a block that can be passed around like a variable, but it works differently than regular `do...end` or curly-brace blocks
Jenz has quit [Ping timeout: 250 seconds]
lucasb has joined #crystal-lang
Jenz has joined #crystal-lang
<FromGitter> <schoening> I have crystal installed via homebrew. Why am I seeing this error with the Crystal Language extension for VSCode? The github issue I saw looked like it had been fixed.
sagax has quit [Read error: Connection reset by peer]
<FromGitter> <dscottboggs_gitlab> what's the output of `which crystal` in your Terminal
<FromGitter> <schoening> /usr/local/bin/crystal
<FromGitter> <schoening> I just tried setting that path in the settings ui of vscode, and restarted, but still complained ..
<FromGitter> <dscottboggs_gitlab> welp.
<FromGitter> <schoening> unless the first dash does something, lemme try without lol
<FromGitter> <schoening> Oh well.. time to search the web for an hour haha
<FromGitter> <dscottboggs_gitlab> I would just reopen the issue on the VS code extension or perhaps open a new one and see if someone who's messed with it before can help
<FromGitter> <schoening> Yeah, and I also only skimmed it, perhaps there is something in the thread thatll fix this ^^
Jenz has left #crystal-lang [#crystal-lang]
sagax has joined #crystal-lang
<_ht> Quick question, can I change the default license generated by the "crystal init" command?
<_ht> I never use MIT for my own projects
<FromGitter> <j8r> `rm LICENSE`
<FromGitter> <Blacksmoke16> ^
<_ht> Sure, that's what I am doing now
<_ht> But cannot I configure what template to use?
<FromGitter> <Blacksmoke16> not atm no
<FromGitter> <j8r> haha :) IMO `crystal init` hasn't its place on a compiler, too opinionated. But that's another topic
<FromGitter> <j8r> It should be project of its own, possibly full featured
<_ht> I do like the idea, particularly for novice programmers, as it sets them up without a good default
<_ht> But, well, I fear that I might forget replacing the template one day and accidentally releasing something with the wrong license
<FromGitter> <j8r> sure
waheedi has joined #crystal-lang
<FromGitter> <j8r> Am I the only one thinking it's weird to have this project tools inside a compiler?
<FromGitter> <j8r> Would it be OK to have one too in `gcc`, `clang`, `rustc`, `go`, `python`, `ruby`?
waheedi has quit [Ping timeout: 246 seconds]
<FromGitter> <Blacksmoke16> i find it useful
<FromGitter> <Blacksmoke16> :shrug:
alex``65 has joined #crystal-lang
alex``6 has quit [Ping timeout: 245 seconds]
<FromGitter> <Blacksmoke16> @dscottboggs_gitlab I ended up doing that ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cc48edf2e2caa1aa6cbc950]
<FromGitter> <dscottboggs_gitlab> super nice :D
<FromGitter> <Blacksmoke16> aye, im happy with it
<FromGitter> <Blacksmoke16> now comes the fun part of writing specs for all this stuff ha
waheedi has joined #crystal-lang
<FromGitter> <vladfaust> Just noting that Onyx::SQL is also annotations-based, whereas `schema` is just a sugar: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cc4943d6a84d76ed8054e4c]
<FromGitter> <vladfaust> With the amount of tests (https://travis-ci.org/onyxframework/sql) needed for an ORM to pass... I wish you luck
<FromGitter> <bigeasy> Evaluating Crystal. Where does debugger/coverage support stand and where is it on the roadmap?
<FromGitter> <dscottboggs_gitlab> in my experience debugging support is minimal but I've heard that someone got it working pretty nicely in VS code. I haven't been able to print variables from debugger so that kinda removes its usefulness in a lot of cases IMO
<FromGitter> <bigeasy> Anyone working on it a la: https://llvm.org/docs/SourceLevelDebugging.html
<FromGitter> <bigeasy> Or has a decision been made not to add debugging information or coverage support because of reasons.
<FromGitter> <dscottboggs_gitlab> it is still a WIP AFAIK. I know there was someone who got source-level debugging working on VSCode but it didn't work when I tried to set it up. Coverage is not as close I don't think. There was a library that tried to implement it in macros and IIRC resulted in a lot of weird bugs
<FromGitter> <bigeasy> Please don't take this as a complaint. I know it is a small team and the work is pretty amazing. Wondering if anyone is working on it, if it is on the todo list, or if it has been deemed especially difficult for some reason.
<FromGitter> <Blacksmoke16> PRs are welcome 😉
<FromGitter> <dscottboggs_gitlab> the vscode plugin was using the LLVM debugger you were referencing
alex``65 is now known as alex```
waheedi has quit [Quit: waheedi]
<FromGitter> <Blacksmoke16> https://crystal-lang.org/reference/guides/performance.html#premature-optimization talks about profiling a tiny bit
<FromGitter> <bigeasy> @Blacksmoke16 I'd love to contribute, but it is probably unlikely that I'll be able to. But, before I even set out to try, I'd be interested to know if it is something that someone else tried and hit a lot of roadblocks.
<FromGitter> <Blacksmoke16> all good, i dont really know. not my area of expertise
<FromGitter> <bigeasy> Okay. Well if someone where to day, "yeah, it's possible, we haven't got around to it, you'd want to look at <this> and <that> but watch out for <this other>" I might get ambitious. Not that my ambitions ever amount to much.
<FromGitter> <dscottboggs_gitlab> is there anything in the github issues perhaps?
hightower2 has quit [Ping timeout: 258 seconds]
<FromGitter> <bigeasy> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cc49f305b3f941aa5a0f9bd]
<FromGitter> <Blacksmoke16> where you find that?
<FromGitter> <bigeasy> (Why syntax highlight?)
<FromGitter> <Blacksmoke16> i t thinks its crystal code prob
<FromGitter> <bigeasy> So, yeah, there has been frustration.
<FromGitter> <Blacksmoke16> `pp` is your friend :)
<FromGitter> <bigeasy> If they implemented it and LLVM changed it out from under them, then I can see why it dropped off as a priority.
<FromGitter> <dscottboggs_gitlab> apparently LLVM changes their API in breaking ways quite frequently
<FromGitter> <Blacksmoke16> oh well
<FromGitter> <TheOnlyArtz> What's the difference when running code through the CLI and compiling to an executable and just then rinni
<FromGitter> <TheOnlyArtz> just then running the code*
<FromGitter> <dscottboggs_gitlab> there isn't any AFAIK
<FromGitter> <TheOnlyArtz> Oh?
<FromGitter> <dscottboggs_gitlab> `crystal run` just does `crystal build -o{some temp file} && ./{the temp file}` I think
<FromGitter> <dscottboggs_gitlab> i mean, not literally but you get what I mean
<FromGitter> <TheOnlyArtz> So compiling to an executable will take the same time as it takes to start running with the CLI?
<FromGitter> <Blacksmoke16> pretty much
<FromGitter> <dscottboggs_gitlab> Yes, I usually user `crystal build && ./` so that I don't have to compile it again if I don't need to
<FromGitter> <TheOnlyArtz> Oh, and how much time does it take to compile a really large program?
<FromGitter> <TheOnlyArtz> If you have examples for ones it will help
<FromGitter> <Blacksmoke16> `The run command compiles the source file hello_world.cr to a binary executable in a temporary location and immediately executes it.`
<FromGitter> <Blacksmoke16> prob between 1 second and a couple hours? :S
<FromGitter> <Blacksmoke16> i can see how long it takes to compile the compiler if that helps? :p
<FromGitter> <dscottboggs_gitlab> Without the `--build`option most projects compile in ~10 seconds but I'm pretty sure I've heard someone saying they had a huge project that took 60+sec
<FromGitter> <Blacksmoke16> release ^
<FromGitter> <dscottboggs_gitlab> yes
<FromGitter> <dscottboggs_gitlab> haha
<FromGitter> <j8r> i.e amber
<FromGitter> <dscottboggs_gitlab> `--release` takes 90+ seconds on my laptop even on a small project
<FromGitter> <dscottboggs_gitlab> actually what I was thinking of was some kind of ML project @bararchy was talking about but yeah Amber is huge too.
<FromGitter> <TheOnlyArtz> Well big projec
<FromGitter> <TheOnlyArtz> Omg the gitter up on phone is so broken
<FromGitter> <TheOnlyArtz> Well, big projects are a matter of seconds? Without release flag
<FromGitter> <dscottboggs_gitlab> Yeah I've never heard of anything taking more than a minute or two without the release flag
<FromGitter> <Blacksmoke16> compiler takes a while with it :p
<FromGitter> <dscottboggs_gitlab> ooof that's true.
<FromGitter> <dscottboggs_gitlab> compiler is a big boy
<FromGitter> <TheOnlyArtz> With that? Release?
<FromGitter> <Blacksmoke16> yea in release mode
<FromGitter> <TheOnlyArtz> Yep
<FromGitter> <TheOnlyArtz> But it's worth it
<FromGitter> <dscottboggs_gitlab> the bigger issue IMO is RAM usage by the compiler. Even a small project can use 500MB for a moment
<FromGitter> <TheOnlyArtz> For a moment. I don't mind
<FromGitter> <r00ster91> crystal needs incremental compilation
<FromGitter> <TheOnlyArtz> Crystal needs life cycle instead of GC too
<FromGitter> <dscottboggs_gitlab> I agree on all of these points
<FromGitter> <dscottboggs_gitlab> well
<FromGitter> <dscottboggs_gitlab> I could see life cycles being optional. GC doesn't take a ton of resources and it's not a big deal for most projects, but Crystal is already such a great language for low-level code that's still clear. it would be nice to be able to specify pointer lifetimes
<FromGitter> <j8r> life cycle?
<FromGitter> <j8r> by reference counting (ARC) for instance?
<FromGitter> <Blacksmoke16> 1) 5 min to compile compiler in release mode btw
<FromGitter> <dscottboggs_gitlab> @Blacksmoke16 on what device??
<FromGitter> <Blacksmoke16> my desktop
<FromGitter> <dscottboggs_gitlab> @j8r like rust's lifetime annotations. Doing the work of a GC at compile time
rohitpaulk has joined #crystal-lang
<FromGitter> <j8r> There are also disadvantages. I don't know any memory allocation that has all advantages with no drawbacks
<FromGitter> <TheOnlyArtz> Whatproject
<FromGitter> <TheOnlyArtz> What project, @blackbox656_twitter ?
<FromGitter> <Blacksmoke16> you mean me? :p
<FromGitter> <TheOnlyArtz> Omg pinged the wrong one
<FromGitter> <TheOnlyArtz> Yea, the phone client is so annoying
<FromGitter> <Blacksmoke16> the crystal compiler
<FromGitter> <TheOnlyArtz> It took you 5.5 minutes to compile the compiler in release mode?
<FromGitter> <Blacksmoke16> yes
<FromGitter> <TheOnlyArtz> Lmao nice
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cc4aac9e416b84519eed546]
<FromGitter> <TheOnlyArtz> How many lines is the crystal compiler?
<FromGitter> <TheOnlyArtz> And how much time in non release mode?
<FromGitter> <Blacksmoke16> ` 163231 total`
<FromGitter> <TheOnlyArtz> Nice, time with non release?
<FromGitter> <Blacksmoke16> uh let me check
<FromGitter> <Blacksmoke16> like 24 sec
<FromGitter> <dscottboggs_gitlab> @j8r yes the main disadvantages of rust's type system is that it's a pain to use and the syntax is ugly and weird.
<FromGitter> <dscottboggs_gitlab> which is why I was saying using a life cycle annotation system should be optional
<FromGitter> <dscottboggs_gitlab> TBH that could be implemented on top of crystal as it is now with a DSL that wraps `Pointer`s
<FromGitter> <dscottboggs_gitlab> > like 24 sec ⏎ ⏎ you must have a decently fast computer?
<FromGitter> <dscottboggs_gitlab> idk I've never tried compiling crystal
<FromGitter> <Blacksmoke16> i7700k ^
<FromGitter> <dscottboggs_gitlab> jesus
<FromGitter> <dscottboggs_gitlab> yeah.
<FromGitter> <Blacksmoke16> @5ghz and 32gb of ram at @3ghz
<FromGitter> <dscottboggs_gitlab> I bet parallelism doesn't help compile times a lot which is why it's so slow on mine. I've got 2x Xeon 2.66Ghz
<FromGitter> <Blacksmoke16> yea prob single core speed helps a lot
<FromGitter> <dscottboggs_gitlab> 5GHz seems crazy to me
<FromGitter> <Blacksmoke16> just a lil overclock ;P
<FromGitter> <j8r> yes, only the linking can be multithreaded
<FromGitter> <dscottboggs_gitlab> oof
<FromGitter> <Blacksmoke16> boost speed is 4.5 factory
<FromGitter> <j8r> and it's quick
lucasb has quit [Quit: Connection closed for inactivity]
waheedi has joined #crystal-lang
<FromGitter> <Blacksmoke16> but no reason to upgrade for a while
<FromGitter> <dscottboggs_gitlab> that's for sure
<FromGitter> <dscottboggs_gitlab> my only reason to upgrade is like... so that the room its in isn't noticably warmer than the rest of the house
<FromGitter> <dscottboggs_gitlab> lol
<FromGitter> <Blacksmoke16> xD
<FromGitter> <dscottboggs_gitlab> although I could always use more SSDs :P
<FromGitter> <Blacksmoke16> more ram never hurts either
<FromGitter> <Blacksmoke16> was wondering why my pc was running slow a few days ago
<FromGitter> <Blacksmoke16> turns out the git UI client i use had a memory leak in that version
<FromGitter> <j8r> 32 is likely overkill
<FromGitter> <dscottboggs_gitlab> meh, my system came with 24GB and I've never run out so I'm good
<FromGitter> <j8r> 32GB or ram
<FromGitter> <Blacksmoke16> was using all 32gb of physical and was 15 into swap
<FromGitter> <dscottboggs_gitlab> oh fuck
<FromGitter> <j8r> how?
<FromGitter> <dscottboggs_gitlab> memory leaks will eat any amoount of ram
<FromGitter> <Blacksmoke16> Gitkrakken had a memory leak
<FromGitter> <j8r> VMs I guess
<FromGitter> <j8r> Note RAM can be compressed too
<FromGitter> <dscottboggs_gitlab> lol plz don't run VMs on swap
<FromGitter> <dscottboggs_gitlab> *hard drive churning intensifies*
<FromGitter> <j8r> you can also compress your disk @dscottboggs_gitlab
<FromGitter> <Blacksmoke16> yea was pretty rough, just updated to newest version and is fine now
<FromGitter> <j8r> if the HDD is the limiting factor, your system will be faster
<FromGitter> <Blacksmoke16> only reason i have 32 is i had 16 then i ran out and was like screw it
<FromGitter> <Blacksmoke16> back when i was doing dev work while playing games and stufff
DTZUZU has quit [Quit: WeeChat 2.2]
DTZUZU has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
Jenz has joined #crystal-lang
Jenz has quit [Ping timeout: 255 seconds]
waheedi has quit [Quit: waheedi]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
<FromGitter> <malkomalko> is a Set ordered?
<FromGitter> <tenebrousedge> "Set implements a collection of unordered values with no duplicates."
<FromGitter> <malkomalko> ah, I was looking for that in the docs and my eyes must've glanced right over it
<FromGitter> <malkomalko> Thank you
<FromGitter> <tenebrousedge> @malkomalko I'm not entirely sure that this actually means that it is not ordered, but probably it's best to assume that it is not ordered
<FromGitter> <malkomalko> Yah, to be safe I'm going to convert it to an array, thank you
<FromGitter> <tenebrousedge> @malkomalko `Set` is implemented as a `Hash`, and `Hash` is an ordered collection, so `Set` is ordered in some senses, but as you say, the safe option is to use a different data type
<FromGitter> <Blacksmoke16> the current implementation causes it to be ordered, but if that were change there is no promises, so its best to assume its unordered and just happens to be ordered currently
<FromGitter> <malkomalko> ^-- yup, exactly that