RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.24.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
<FromGitter> <Qwerp-Derp> Is there a proposal for placing Crystal in the JVM and CLR?
<RX14> no
<FromGitter> <Qwerp-Derp> I'm guessing doing so wouldn't be a good idea anyway, but I would definitely like to use Crystal in those environments
<RX14> im sure if crystal ever reaches 1.0 there might be some impls
<FromGitter> <Qwerp-Derp> Hmmm, yeah
<FromGitter> <Qwerp-Derp> Should I put an issue into the main repository for this, or would that not be a good idea?
<crystal-gh> [crystal] Sija opened pull request #5657: Make <code> behave more like <pre> in terms of linebreaks (master...fix-docs-code-css) https://git.io/vN9mo
<FromGitter> <bew> I think it's not worth to think ahead about aalll the things we'll be able to do once it reaches 1.0, and let's not clutter the issue tracker with sth that's not even an issue
duane has quit [Ping timeout: 240 seconds]
andrewzah has joined #crystal-lang
andrewzah has quit [Client Quit]
andrewzah has joined #crystal-lang
andrewzah has quit [Client Quit]
andrewzah has joined #crystal-lang
andrewzah has quit [Client Quit]
andrewzah has joined #crystal-lang
andrewzah has quit [Client Quit]
andrewzah has joined #crystal-lang
andrewzah has quit [Client Quit]
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <faustinoaq> > Is there a proposal for placing Crystal in the JVM and CLR? ⏎ ⏎ Check java.cr (https://github.com/ysbaddaden/java.cr) and android.cr (https://github.com/ysbaddaden/android.cr) 😉
<FromGitter> <faustinoaq> @Qwerp-Derp ^
duane has joined #crystal-lang
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #crystal-lang
never has joined #crystal-lang
hightower3 has quit [Ping timeout: 240 seconds]
never has quit [Ping timeout: 256 seconds]
duane has quit [Ping timeout: 240 seconds]
never has joined #crystal-lang
<FromGitter> <elorest> Is there a way call super on a method with a different name? For instance say I've already over written and method. How would I call that method from a different method? ⏎ ⏎ For instance ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a700c10ac509d207d94d874]
<FromGitter> <HCLarsen> super.name maybe?
<FromGitter> <HCLarsen> I'm guessing, I
<FromGitter> <elorest> That calls name on the return value of super.
<FromGitter> <HCLarsen> I'm not certain about that at all.
<FromGitter> <elorest> Obviously my demo code above doesn't make any more sense.
<FromGitter> <HCLarsen> It makes sense. You might just have to rethink your method names.
<travis-ci> crystal-lang/crystal#016a3fc (ci/nightly - Add docker image as nightly artifact): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/335017677
<FromGitter> <elorest> I might but that would be a nightmare, too many things chained together.
<FromGitter> <elorest> There are ways around it but this has to be possible somehow.
<FromGitter> <HCLarsen> Your IDE should make it easy to rename a method.
<FromGitter> <bew> maybe `self.as(A).name` ?
<FromGitter> <aisrael> I use `vim` (tempted to add “you insensitive, clod!” but might go over some people’s heads)
<FromGitter> <bew> no idea if it work though
<FromGitter> <elorest> Vim would be easy to if it was as simple as find and replace.
<FromGitter> <bew> @aisrael vim is life :p
<FromGitter> <elorest> Vim Life!
<FromGitter> <elorest> For life
<FromGitter> <bew> let's not trigger the non-vim guys, did you tried my suggestion?
<FromGitter> <elorest> O
<FromGitter> <HCLarsen> I'm an Atom guy, and find and replace is EASY.
<FromGitter> <elorest> Replace is just as easy in vim.
<FromGitter> <bew> not as easy for in-all-project find&replace though
<FromGitter> <elorest> With Ag and Qdo it is.
<FromGitter> <elorest> At least close.
<FromGitter> <bew> not bad! the search/find pattern still needs to be repeated, and uses different REGEX engines
<FromGitter> <elorest> true... I guess it's just sort of become second nature to me over the years. Still a tiny bit more typing though.
<FromGitter> <elorest> `map <Leader>far ^l"ayt/^v$h"byu:vsp<CR>:Ag "<C-R>a"<CR>:Qdo %s<C-R>bgce \| update<CR>`
<FromGitter> <aisrael> ☝️ Is that some new functionall programming language?
<FromGitter> <bew> lol it's a vim command
<FromGitter> <elorest> I have that leader command that lets my just type my query in as a line in my file (/search/replace/)... (weird in know)
<FromGitter> <HCLarsen> Still easier to read than JavaScript.
<FromGitter> <bew> lol x) @HCLarsen
<FromGitter> <elorest> LOL. Javascript isn't really that hard if they weren't obsessed with accomplishing in 200 lines what they could in 10.
<FromGitter> <elorest> @bew for some reason your suggestion still returns the result of the child classes overloaded method.
<FromGitter> <HCLarsen> I love joking about JavaScript, because it was honestly the hardest language for me to learn. I often joke that I had an easier time learning Assembly Language.
<FromGitter> <bew> hum don't think it's possible then @elorest
<FromGitter> <elorest> Thanks anyway.
<FromGitter> <elorest> @HCLarsen I feel like i've learned Javascript multiple times. But unlike rails or even java best practices, libraries and even syntax change so fast.
<FromGitter> <elorest> Back in 2004 I thought I was pretty good at JS lol.
<FromGitter> <elorest> Then again in like 2013 with Ember.
<FromGitter> <HCLarsen> I only first learned JavaScript a couple of years ago, so I've only had to relearn with ES6. To be fair to the community, ES6 is a SEVERE improvement.
<FromGitter> <elorest> Yeah definitely but I don't know if "The Community" get the credit for that.
<FromGitter> <elorest> That's more like our browser overlords.
<FromGitter> <HCLarsen> Yes. It's ironic that the local JS community here does nothing but condemn OO programming, but ES6 tends to make JS work more like an OO language.
<FromGitter> <elorest> Yeah I work downstairs from a huge Elixir company too.
<FromGitter> <elorest> Its interesting though because they're going on year 3 with Phoenix and they're running into a ton of problems they were convince only Rails had.
<FromGitter> <elorest> New programming languages don't fix code debt introduced by tight deadlines and poor planning.
<FromGitter> <HCLarsen> Yeah, Elixer seems to be popular in the local Ruby community, but I don't see any particular advantage over Rails. I'm putting my eggs in the Crystal basket.
<FromGitter> <elorest> And code written to solve a simpler problem a year ago doesn't always expand well of fit a much more complex problem even when its "functional."
<FromGitter> <elorest> Yeah for me its not nearly fast enough to put up with all the weird syntax. 2.5x faster than ruby to but slower to program in isn't worth it to me.
<FromGitter> <HCLarsen> I really don't see much truth in the argument that functional is better than OO. Many of the points I've heard made in that argument are either questionable, or full out false.
<FromGitter> <aisrael> @HCLarsen Oh, you’re the guy on LinkedIn, too. Yeah, so I’m not counting out FP just yet. I’ve been hearing from folks that they found Elixir easier to learn than Go, even. But we ourselves are picking Crystal.
<FromGitter> <elorest> Functional makes you think about issues in a different way. Back when I was doing C I thought a lot differently than I do now.
<travis-ci> crystal-lang/crystal#53e4587 (ci/nightly - Add docker image as nightly artifact): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/335021360
<FromGitter> <HCLarsen> I'm old school. Learned to code with C and C++ back in 1997. Ruby was my first interpreted language. I've never been very comfortable with running my code in an interpreter, or using duck typing, so Crystal fixes all of that for me.
<FromGitter> <elorest> I'm not saying that's good. But often times with ruby and even crystal a functional solution could be better be people create an initialize objects instead of just calling a simple module function. ⏎ ⏎ Both serve their purpose, but functional only languages in 2018 don't make sense to me.
<never> I really love Haskell though.
<FromGitter> <HCLarsen> The arguments I've heard in favour of Functional Programming relate to memory usage (the claim that OO languages can't use value types), or that you can't do testing in OO.
<never> My only complaint about it is the same as with Rust - I feel incredibly tightly bound.
<FromGitter> <aisrael> (Believe or not am older school than you, then.) But yeah, one thing that turned us off from Elixir is that it doesn’t really do compile-time type checking. OTOH, we have Crystal’s type inference to be thankful for.
<FromGitter> <elorest> Yep.
<FromGitter> <elorest> Well written functional code CAN be more memory efficient than well written OOP in some cases all else being equal.
<FromGitter> <marksiemers> @elorest - Not sure if this is as elegant as you want: https://carc.in/#/r/3h9m
<FromGitter> <marksiemers> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a70149040259f1a33c513f2]
<FromGitter> <marksiemers> But it works for that example
<FromGitter> <HCLarsen> Yes, but the claim I've heard made (in two separate instances) was that functional programming uses value types and OOP uses reference types.
<FromGitter> <elorest> In many cases it isn't though and functional language often times lead to way too many global vars and ENV to store values since instances don't work.
<FromGitter> <elorest> Hmmm. I don't think that that's true accross the board for either. But it's been 12 years since college so what do I know.
<FromGitter> <aisrael> How different is that from “average” Java devs in “average” Java shops using global static instance vars everywhere?
<FromGitter> <HCLarsen> Well, off the top of my head, I can list Objective-C, Swift and Crystal as OO languages that use both.
<FromGitter> <elorest> Because that's just bad practice. In functional it's the only way to make it work ;)
<FromGitter> <elorest> @marksiemers I responded to you in ambe.
<FromGitter> <aisrael> @elorest Not an Elixir expert but I believe you’re supposed to use `GenServer`s and/or actors
<FromGitter> <marksiemers> There are too many times that you need to store state to have a fully FP language meet all your needs. ⏎ In Elixir, you end up storing state by basically spawning a process that just runs in a loop will return certain information as a message.
<FromGitter> <elorest> Still technically storing values on global constant lol.
<FromGitter> <marksiemers> Which is a super hacky way to store state.
<FromGitter> <HCLarsen> Yikes.
<FromGitter> <marksiemers> Erlang has the fault tolerance thing down though, and I think the "stateless" nature of it allows that
<FromGitter> <elorest> Erlang is great for phone switch boards lol.
<FromGitter> <HCLarsen> Apparently Erlang is very popular in the telecom industry, for low level stuff.
<FromGitter> <marksiemers> It is really good for zero downtime, and hot-swappable code deploys
<FromGitter> <marksiemers> Erlang is short for Ericson Language - as in Sony Ericson. It was built by telecom ppl
<FromGitter> <aisrael> That’s the other thing that made us choose Crystal. These days, we use containers and K8s for that.
<FromGitter> <HCLarsen> I hear concurrency is a natural strength of Erlang as well.
<FromGitter> <marksiemers> and I think it runs a huge percentage of the telco world
<FromGitter> <marksiemers> yes it is
<FromGitter> <elorest> Yeah that hotswappable thing seems pretty cool. Wouldn't be that useful for webservers but perhaps websockets could make use of it.
<FromGitter> <marksiemers> the fault tolerance and concurrency go hand-in-hand
<FromGitter> <HCLarsen> Ahhh
<FromGitter> <marksiemers> its just a bunch of nodes - they can be on any machine
<FromGitter> <HCLarsen> I chose Crystal because I want the deployability and efficiency of C, with the beauty of Ruby code.
<FromGitter> <marksiemers> if one goes down, then somewhere in the supervision tree, it will get replaced
<FromGitter> <elorest> In a way we could largely do that with ruby, crystal or a ton of other languages though.
<travis-ci> crystal-lang/crystal#43af1d9 (ci/nightly - Add docker image as nightly artifact): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/335025176
<FromGitter> <elorest> Just spawn a bunch of processes and load balance.
<FromGitter> <aisrael> That’s what am thinking. That’s not a language feature *per se*. Isn’t that just the supervision tree and actor model (which could theoretically be implemented in Crystal)?
<FromGitter> <elorest> In erlang it is a language feature.
<FromGitter> <marksiemers> Erlang has it pretty seamlessly in the language - it does it really well.
<FromGitter> <elorest> But it doesn't necesarily have to be to get the same utility.
<FromGitter> <aisrael> Ahh.
<FromGitter> <marksiemers> I think it may be the only language to get to nine 9's of availability
<FromGitter> <marksiemers> But crystal is faster and so much more fun to work with
<FromGitter> <marksiemers> I mean, Elixir is Erlang in the same way that Crystal is LLVM bytecode
<FromGitter> <elorest> Yeah also it sort of depends on what it is and how many process it can grow too.
<FromGitter> <elorest> You can still DDOS an erlang app.
<FromGitter> <HCLarsen> It's also a matter of hardware, right? I mean, once you get past the number of cores, concurrent processes are just multiplexed through the same cores.
jnyw has quit [Ping timeout: 240 seconds]
never has quit [Remote host closed the connection]
never has joined #crystal-lang
<FromGitter> <marksiemers> At some point, yes hardware matters. The part that Erlang does well is abstracts whether or not processes are running on the same machine or over a network.
<FromGitter> <marksiemers> So in some cases an actual machine can go down, and there will still be zero downtime
<FromGitter> <marksiemers> And the processes are lightweight, not limited to number of processors - like they claim millions of concurrent processes on the same machine. Which does't add to parallel speed, but does offer a lot of backup processes if something goes wrong with any of them
<FromGitter> <marksiemers> And since there is no "state" you don't have to worry about state transfer if a process goes doewn
<travis-ci> crystal-lang/crystal#d5e952f (ci/nightly - Add docker image as nightly artifact): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/335033819
flaviodesousa has joined #crystal-lang
mark_66 has joined #crystal-lang
jnyw has joined #crystal-lang
<FromGitter> <watzon> When defining an abstract class can you define an abstract class variable in the same way you can an abstract method?
<FromGitter> <bew> you can't do abstract class methods (because there is no "instance" to call them on), and there is no such thing as abstract instance variables, why/how would there be abstract class variables?
<FromGitter> <bew> @watzon ^
<FromGitter> <watzon> I guess I'm kinda trying to do an interface in Crystal haha
<FromGitter> <watzon> That's one thing that I feel Crystal is missing. Hope it gets added.
<FromGitter> <bajro17> for what you need interface?
<vegai> for implementing architect astronauts' grand designs? :P
<FromGitter> <alex-lairan> Hi guy's :) ⏎ ⏎ How can I do recursive types? ⏎ ⏎ I've try: `alias MapType = Hash(Activity | MapType, Hash(Signal, Activity))`but it doesn't work :/ ... [https://gitter.im/crystal-lang/crystal?at=5a703b09ce68c3bc742044c1]
<FromGitter> <alex-lairan> Here I want the key can be itself type: https://github.com/ObsidianCrystal/obsidian-activity/blob/master/src/obsidian-activity/circuit.cr#L2
<FromGitter> <bew> well, the type mismatch, there is a `| MapType` missing
<FromGitter> <bew> or mabe just use `MapType.new` in the ctor?
<FromGitter> <alex-lairan> Oh I miss one `MapType` ⏎ ⏎ `alias MapType = Hash(Activity | MapType, Hash(Signal, Activity | MapType))\
<FromGitter> <alex-lairan> But I get the same error :/
<FromGitter> <bew> in the initialize, try to use `@map = MapType.new` instead of `@map : Hash(Activity, Hash(Signal, Activity))`
<FromGitter> <bew> wait
<FromGitter> <bew> where are you using `MapType` ?
Guest54358 has joined #crystal-lang
<Guest54358> Hi!
<FromGitter> <alex-lairan> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a703cc5494bd0f530427b21]
<FromGitter> <alex-lairan> I use MapType inside my Circuit class
<FromGitter> <alex-lairan> Hi Guest54358
<FromGitter> <watzon> What would be the Crystal equivalent of this? ⏎ ⏎ ```def self.hex(str) ⏎ str.unpack("H*").first ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5a703d2de217167e2c1b15ba]
Guest54358 has quit [Quit: WeeChat 1.9.1]
never has quit [Ping timeout: 268 seconds]
hightower3 has joined #crystal-lang
<FromGitter> <watzon> `str.hexbytes.join` maybe?
<FromGitter> <bew> well, from the docs, it should decode the string as hex string (high nibble first)
<FromGitter> <bew> why do you need this?
<FromGitter> <bew> where does that string come from?
<FromGitter> <watzon> I just want to convert a string to its hex representation
<FromGitter> <bew> `"ab".to_slice.hexstring`
<FromGitter> <bew> => `"6162"`
<FromGitter> <bew> like this?
<FromGitter> <watzon> Perfect
<FromGitter> <watzon> Thanks :)
codenoid has joined #crystal-lang
<FromGitter> <bew> @alex-lairan not sure I can help you with the informations you gave, can you try to give a reproducible smaller example, in carc.in or another code sharing site?
<codenoid> helo, how to create global hash ?
<FromGitter> <bew> Yes why?
<codenoid> how
<FromGitter> <bew> I mean, with a constant, of a class variable in a module
<FromGitter> <bew> (Of in a class)
<FromGitter> <bew> Or*
<codenoid> yeah
<codenoid> yay, i dont need redis anymore
<codenoid> * i define constant outside module @bew, :+1:
jnyw has quit [Quit: WeeChat 2.0.1]
<FromGitter> <alex-lairan> @bew https://carc.in/#/r/3hae
never has joined #crystal-lang
never has quit [Remote host closed the connection]
never has joined #crystal-lang
dragonkh has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
never has quit [Ping timeout: 240 seconds]
<FromGitter> <bajro17> is it hash same like in php associative array
<codenoid> yeah, same like python dict too
dragonkh has joined #crystal-lang
hightower2 has joined #crystal-lang
hightower has quit [Ping timeout: 240 seconds]
dragonkh has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
codenoid has quit [Ping timeout: 240 seconds]
codenoid has joined #crystal-lang
duane has joined #crystal-lang
ghostofme has joined #crystal-lang
ghostofme has quit [Client Quit]
codenoid has quit [Ping timeout: 264 seconds]
codenoid has joined #crystal-lang
snsei has joined #crystal-lang
moei has joined #crystal-lang
sz0 has joined #crystal-lang
dragonkh has joined #crystal-lang
qard has joined #crystal-lang
duane has quit [Ping timeout: 248 seconds]
duane has joined #crystal-lang
duane has quit [Ping timeout: 256 seconds]
duane has joined #crystal-lang
dragonkh has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
duane has quit [Ping timeout: 248 seconds]
duane has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
theConstantDefin has joined #crystal-lang
theConstantDefin has quit [Quit: Page closed]
sz0 has quit [Quit: Connection closed for inactivity]
flaviodesousa has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<codenoid> morning
<FromGitter> <ShriekBob> On a random note about a conversation that happened earlier, I quite like the way go does interfaces. The...I don't know how you would describe it...specified duck typing? Like you create the interface, you specify that you take an interface, but you don't have to specify that you implement the interface, you just have to implement it
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
qard has joined #crystal-lang
<greenbigfrog> `def sth(a : String, b : Int32? = nil)` I bet there is a nicer syntax for this I can't think off right now...
<codenoid> it's a sexy syntax for me
<oprypin> ShriekBob, you can do the same in crystal, without even creating an interface :D
<oprypin> or with, by using a module+abstract, but then you do declare it, which is nice
<greenbigfrog> yes, it's sexy and on point, but IIRC there's a even nicer way to write it
<oprypin> greenbigfrog, i dont know what can be nicer
<greenbigfrog> hm. ok
cremes has quit [Quit: cremes]
cremes has joined #crystal-lang
cremes has quit [Quit: cremes]
<FromGitter> <codenoid> ```Unhandled exception on HTTP::Handler ⏎ Invalid Int32: \u003c/div\u003e\n (ArgumentError)``` [https://gitter.im/crystal-lang/crystal?at=5a70b2ac475054191743a561]
<FromGitter> <ShriekBob> Oh I know you can duck type in crystal, like in Ruby, but I'm fond of the idea that you can specify "this function takes a Reader" where "Reader" is any class that implements Read()
<FromGitter> <ShriekBob> Like I said, I've been fiddling with Go, and it's definitely one of the thing I've liked
<FromGitter> <codenoid> how to pass that, i think the problen in `ctx.response.print`
<FromGitter> <ShriekBob> the idea that you can go "oh hey, theres a pattern here, let's define an interface, but hey I also don't have to go back and edit all those classes"
<FromGitter> <codenoid> `Invalid Int32`, wat, i dont write /Cast Int32
<FromGitter> <marksiemers> @ShriekBob - I would hesitate to say "you can duck type in crystal." Even when you let type inference take care of everything and the code looks like ruby, it is still statically typed - it just uses union types. The effect is very similar but to me, "duck typing" means that the method doesn't actually care what type it is, as long as it responds to the correct methods/operators at run-time. ⏎ Type
<FromGitter> ... inference cares at compile-time, and the compiler builds a method to take the specific types that are used in the program.
<FromGitter> <ShriekBob> Sure, that's again, part of the benefit of interfaces though, less union types, it's all a bit more implicit
<FromGitter> <ShriekBob> Given that, I would imagine, the compiler could go "all these implement Read, and there is an interface that defines Read, therefore these are all Readers"
<FromGitter> <marksiemers> Indeed, my thoughts are about semantics more than anything, but when you get into the differences between crystal and ruby - semantics are important.
<FromGitter> <ShriekBob> Either way, I just think it's a neat language feature, defining an interface, but not having to declare you implement it, just implementing it
<FromGitter> <ShriekBob> Sure
<FromGitter> <marksiemers> yeah - the things you can do with the type system and type inference are huge benefits of crystal
<FromGitter> <codenoid> should i report this "bug" (?)
<FromGitter> <ShriekBob> Indeed, it is, but, would inference be clearer if you could actually specify the interface?
<FromGitter> <codenoid> me ?
<FromGitter> <ShriekBob> No, that was @marksiemers
<FromGitter> <ShriekBob> and yeah, I'd repor it @codenoid
<FromGitter> <ShriekBob> even if it's not a bug, someone with more knowledge can check and qualify
<FromGitter> <codenoid> yass
<FromGitter> <codenoid> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a70bb234a6b0dd32b698ba3]
cremes has joined #crystal-lang
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
qard has joined #crystal-lang
qard has quit [Client Quit]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
qard has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
dragonkh has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 246 seconds]
theTypeTyper75 has joined #crystal-lang
<theTypeTyper75> I have a method where I need to specify named arguments. And one of these named arguments is the "length" that i need to specify, it needs to be "UInt32?". So I tried "length: 100". But this doesnt works like at the other named argument. Which just needed to be "String". Not "String?". What should I do at these questionmark-types?
snsei has joined #crystal-lang
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has joined #crystal-lang
illyohs has joined #crystal-lang
<FromGitter> <imonmyown> @theTypeTyper75 is that (https://carc.in/#/r/3hf8) okay for you?
<theTypeTyper75> yes i already tried that.. im getting an overload matches error
<FromGitter> <imonmyown> what is the whole signature then?
codenoid has quit [Ping timeout: 240 seconds]
qard has joined #crystal-lang
codenoid has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
alex`` has quit [Remote host closed the connection]
alex`` has joined #crystal-lang
<oprypin> theTypeTyper75, upvote https://github.com/crystal-lang/crystal/issues/2995 and move on
vivus has joined #crystal-lang
<theTypeTyper75> i did
theTypeTyper75 has quit [Quit: Page closed]
duane has quit [Ping timeout: 248 seconds]
<FromGitter> <bajro17> how to create multidimensional array in crystal?
<FromGitter> <bajro17> I find solution with [[][]]
<FromGitter> <Dillybob1992> :D
<FromGitter> <ShriekBob> Quick question, I assume you don't need to compile the whole compiler to change the crystal command to use a new version of spec?
<FromGitter> <ShriekBob> Also, man, running Crystal Spec on crystal itself is real slow to give output
codenoid has quit [Ping timeout: 264 seconds]
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <bajro17> is it possible to create new array with number of rows and of columns like Array.new(3,3)
snsei has quit [Remote host closed the connection]
qard has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <marksiemers> `array = Array.new(3) { Array(Int32).new(3) }`
<FromGitter> <marksiemers> @bajro17 - I don't think it can be done more concise than using a block.
<FromGitter> <ShriekBob> Hmm...I can't seem to get crystal spec to actually output anything on macos
<FromGitter> <ShriekBob> against the crystal repo
<FromGitter> <ShriekBob> works against my own test projects, but not against a fork of crystal itself
qard has joined #crystal-lang
codenoid has joined #crystal-lang
qard has quit [Client Quit]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 252 seconds]
<oprypin> ShriekBob, try `make spec`. it's special.
<FromGitter> <ShriekBob> thanks :)
<FromGitter> <ShriekBob> While I've got you, I assume said make file describes how to make the crystal binary (if I'm looking to change spec, say...so I can test changes)
<oprypin> ShriekBob, well sure, that's just `make`
<FromGitter> <ShriekBob> Yep, thought so, just wanted to check
<oprypin> and you dont exactly got me unless you ping me
<oprypin> so that was lucky
<FromGitter> <ShriekBob> it was
jnyw has joined #crystal-lang
dragonkh has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<FromGitter> <watzon> Is there a Crystal equivilent to Rust's `std::slice::chunks`? `Enumerable.chunks` doesn't do quite the same thing. http://devdocs.io/rust/std/primitive.slice#method.chunks
<FromGitter> <ShriekBob> Man, the crystal compiler, when it compilers itself, really needs more verbose output. I have no idea if it's compiling, or some setup on my machine has made it hang
<Papierkorb> The crystal compiler is a good UNIX program: It keeps silent if there's nothing to say.
<Papierkorb> If it consumes CPU, it's running
<FromGitter> <ShriekBob> I assume then, that when I run spec, it won't say anything until all tests are complete, then it'll output?
<Papierkorb> No, it's compiling. spec outputs data continously once it's running
<Papierkorb> Depending on your hardware, compiling the test suite can take a considerable amount of time
<FromGitter> <ShriekBob> Cool, good to know, thank you
<Papierkorb> The test lib the compiler uses is the same as you'd use. It'll output green dots for each successful test, and a red F for failed tests. None should fail, a handful will be "pending"
moei has quit [Quit: Leaving...]
<FromGitter> <watzon> What would be a good way to take an array with a number of elements that's divisible by 128 and zip it into 68 element chunks?
<FromGitter> <watzon> Is there a method on enumerable or iterable already that can do this?
<Papierkorb> Enumerable#each_slice ?
<FromGitter> <watzon> That's what I need!
<FromGitter> <watzon> Thanks
codenoid has quit [Ping timeout: 240 seconds]
alex`` has quit [Ping timeout: 252 seconds]
qard has joined #crystal-lang
codenoid has joined #crystal-lang
duane has joined #crystal-lang