<FromGitter>
<absolutejam_gitlab> you can break with a value
<FromGitter>
<dmitryrck> `break` does not work I just tested
<FromGitter>
<absolutejam_gitlab> it doesn't?
<FromGitter>
<absolutejam_gitlab> maybe change it to a `while`
<FromGitter>
<absolutejam_gitlab> or just a `loop`
<FromGitter>
<absolutejam_gitlab> instead of each
<FromGitter>
<dmitryrck> oh, `break` breaks the loop not the block call
<FromGitter>
<absolutejam_gitlab> yeah, you can break with a value
<FromGitter>
<absolutejam_gitlab> and then return that
<FromGitter>
<absolutejam_gitlab> or assign to a variable
<FromGitter>
<dmitryrck> I think he wants not to reach ⏎ `# more code...` if something is false inside that `each`
<FromGitter>
<absolutejam_gitlab> I'm just spitballing here as I don't really know what you wanna do it's too early haha
<FromGitter>
<dmitryrck> it is not too late, 5pm here 😂😂😂
<FromGitter>
<absolutejam_gitlab> 7:00am here
<FromGitter>
<absolutejam_gitlab> Been up since 5:30
<FromGitter>
<renich_gitlab> Good time_of_day
<FromGitter>
<renich_gitlab> https://play.crystal-lang.org/#/r/7gt6 ⏎ ⏎ I need that string to be modified by the upcase and downcase statements. How do I do that?
<FromGitter>
<renich_gitlab> I already tried: `my_string[i] = c.upcase` and stuff. Doesn't work like that.
<FromGitter>
<galvertez> or am i just not seeing the whole picture here??
<FromGitter>
<watzon> Hmm you might be right. Maybe it use to potentially return a nil but then the method logic got changed and someone forgot to change the return type
<FromGitter>
<watzon> Yeah you're definitely right as far as I can tell @galvertez. Maybe open an issue about it?
<FromGitter>
<galvertez> ya that's basically what i was thinking
<FromGitter>
<galvertez> yep will do 👍
<FromGitter>
<galvertez> i haven't looked actually - i might just PR it if i can figure out the proper procedure for compiling/testing etc
<FromGitter>
<galvertez> save the maintainers the headache for something this trivial lol
* FromGitter
* renich_gitlab goes to sleep since it's 02:12 here
absolutejam has joined #crystal-lang
alex`` has quit [Ping timeout: 245 seconds]
devil_tux has quit [Ping timeout: 246 seconds]
hightower2 has joined #crystal-lang
ua has quit [Excess Flood]
ua has joined #crystal-lang
devil_tux has joined #crystal-lang
absolutejam has quit [Ping timeout: 245 seconds]
<FromGitter>
<kimvex> Hi, I have a question. When you run a file in development mode using the “run” command example: crystal run hello_world.cr this saves the file in cache so that the next time you run it, take it from the cache?
<FromGitter>
<kimvex> I ask because I had a problem to be testing and making changes to an endpoint in kemal, and every time I made a change, it was not reflected, if it was not still answers from the previous code that had that endpoint, until I deleted the code and added changes to those same lines and kept responding with the old code information
<FromGitter>
<watzon> @kimvex I've had the same problem before. Yes, crystal run builds the file and caches it, I believe on Linux the Crystal cache is stored at ~/.cache/crystal but I could be wrong. Usually whenever I have a problem that I feel might be cache related I delete that folder.
<FromGitter>
<kimvex> The problem stopped appearing when I started using the "--release" flag next to the "run" command. crystal run hello_world.cr —release
<FromGitter>
<kimvex> Chris Watson Sometimes that causes me problems when I delete that folder, which is why I try to avoid deleting it, but I will try again deleting it to see what happens
<FromGitter>
<watzon> @renich_gitlab the only thing I can really recommend is to look into `String.build` and use that rather than concatenating. It's much faster. Other than that things look pretty good.
absolutejam has joined #crystal-lang
absolutejam has quit [Ping timeout: 245 seconds]
go|dfish has joined #crystal-lang
devil_tux has quit [Ping timeout: 244 seconds]
absolutejam has joined #crystal-lang
absolutejam has quit [Ping timeout: 246 seconds]
devil_tux has joined #crystal-lang
absolutejam has joined #crystal-lang
DTZUZO has quit [Ping timeout: 258 seconds]
absolutejam has quit [Ping timeout: 246 seconds]
absolutejam has joined #crystal-lang
devil_tux has quit [Ping timeout: 244 seconds]
devil_tux has joined #crystal-lang
DTZUZO has joined #crystal-lang
absolutejam has quit [Ping timeout: 272 seconds]
absolutejam has joined #crystal-lang
absolutejam has quit [Ping timeout: 245 seconds]
alex`` has joined #crystal-lang
<FromGitter>
<absolutejam_gitlab> Is there any way to initialize a class like a literal?
<FromGitter>
<absolutejam_gitlab> A la elixir / go struct
<FromGitter>
<absolutejam_gitlab> I could write a macro that iterates over properties perhaps
<FromGitter>
<tenebrousedge> "Hash-like type literal"
<FromGitter>
<absolutejam_gitlab> But that is essentially a named type that incorporates a hash, right?
<FromGitter>
<absolutejam_gitlab> which is great, but has no key validation
<FromGitter>
<tenebrousedge> no, any class with an argless constructor that responds to []
<FromGitter>
<absolutejam_gitlab> An Elixir/Golang struct is essentially a hash with specified keys
<FromGitter>
<j8r> @absolutejam_gitlab Why you *need* that?
<FromGitter>
<absolutejam_gitlab> I don't, I'm just curious if it exists
<FromGitter>
<absolutejam_gitlab> so I could write a class that responds to `[]` and assigns each to each property
<FromGitter>
<j8r> In Crystal, there is one way `MyObject.new(key1: value1, key2: value2)`
<FromGitter>
<j8r> don't get what's wrong
<FromGitter>
<absolutejam_gitlab> That requires `initialize` with the parameters though, right?
<FromGitter>
<absolutejam_gitlab> Or does that work if you don't supply an `initialize`?
<FromGitter>
<j8r> Yes
<FromGitter>
<tenebrousedge> @absolutejam_gitlab looks like you would just have to write `[]`, yes
<FromGitter>
<absolutejam_gitlab> right
<FromGitter>
<j8r> but that's good, you can have private ivars
<FromGitter>
<absolutejam_gitlab> I have no issue with the current way, but writing some other languages, I sometimes appreciate being able to create a 'structure hash' instead of a full-fledged ckass
<FromGitter>
<absolutejam_gitlab> class*
<FromGitter>
<j8r> I know what you are looking for @absolutejam_gitlab , `record`
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
absolutejam has joined #crystal-lang
<FromGitter>
<absolutejam_gitlab> sorry, gitter on my phone is risky business
<FromGitter>
<absolutejam_gitlab> and I still can't use the app 😓
<FromGitter>
<jeromegn> anybody faced this issue trying to deploy lucky with docker: ⏎ ⏎ ```/bin/sh: script/precompile_tasks: not found```
<FromGitter>
<jeromegn> using crystal 1.30.1
<FromGitter>
<jeromegn> lucky 0.17
<FromGitter>
<jeromegn> I tried setting SKIP_LUCKY_TASK_PRECOMPILATION, but that didn't help (to my surprise)
<FromGitter>
<jeromegn> ^ because it just can't find the file, so not that surprising heh
<FromGitter>
<Blacksmoke16> first thought is are you sure you're mounting that file into the container?
alex`` has quit [Ping timeout: 258 seconds]
alex`` has joined #crystal-lang
<FromGitter>
<jeromegn> well this is during the docker image build process, at that point I've only copied the shard.* files. but I also tried with everything copied before the `shards install` step and got the same error.
<FromGitter>
<jeromegn> I wonder if I'm missing some directory structure
<FromGitter>
<jeromegn> it works fine for crystal apps that don't have dependencies with scripts
Raimondi has joined #crystal-lang
MasterdonX has quit [Read error: Connection reset by peer]
MasterdonX has joined #crystal-lang
<FromGitter>
<jeromegn> just tried an earlier shards version and it yields the same results
<FromGitter>
<jeromegn> at this point I might stop being clever and just use a bigger image
<FromGitter>
<tenebrousedge> shaving yaks can be fun, if you have time for it
<FromGitter>
<jeromegn> they're very hairy
<FromGitter>
<absolutejam_gitlab> I didn't realise that you could reassign a variable to a different type
<FromGitter>
<Blacksmoke16> if you dont type the variable, yes
<FromGitter>
<absolutejam_gitlab> ah, so if i explicitly type it, then I cant?
<FromGitter>
<Blacksmoke16> correct
<FromGitter>
<absolutejam_gitlab> makes sense I guess
<FromGitter>
<absolutejam_gitlab> makes a lot of sense 👍
<FromGitter>
<absolutejam_gitlab> I might start using structs more as a default
<FromGitter>
<Blacksmoke16> record ftw
<FromGitter>
<watzon> @andrius ideally don't share icloud screenshots, post the actual code to somthing like hastebin or even just try and make a working example of your issue on https://carc.in
<FromGitter>
<watzon> It makes it a lot easier to help
<FromGitter>
<sam0x17> so I'm about to attempt to make a macro that, when called in a possibly arbitrarily nested block, will (somehow) do the equivalent of calling `next` up the chain of blocks so that all the blocks exit........... what should I call the macro lol?