ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Crystal 0.22.0 | Fund Crystal's development: | Paste > 3 lines of text to | GH: | Docs: | API: | Logs:
<FromGitter> <mgarciaisaia> Does crystal prevent to write to ro slices, or was it only to model de fact that there are some ro bits of data on your process?
<Papierkorb> the slice will raise if you try to write to a RO slice
<FromGitter> <mgarciaisaia> Nice language 😂
<Papierkorb> ..?
Dreamer3 has joined #crystal-lang
<FromGitter> <sdogruyol> i just discovered something weird
<FromGitter> <sdogruyol> what actually is class Random::MT19937?
<Papierkorb> MT19937 is a mersenne twiester
<FromGitter> <sdogruyol> this is the output of `crystal tool hierarchy src/`
<FromGitter> <sdogruyol> what's that?
<Papierkorb> MT is a popular PRNG algorithm
<FromGitter> <sdogruyol> PRNG?
<FromGitter> <sdogruyol> ah ok
<Papierkorb> Pseudo-random number generator
<FromGitter> <sdogruyol> ugh it's like the biggest class
<FromGitter> <sdogruyol> 1) 5k
<Papierkorb> It's actually a pretty good algorithm
<FromGitter> <sdogruyol> thanks
Guest93089 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alibby has joined #crystal-lang
<FromGitter> <sdogruyol> how hard is it to write Mersenne Twister in Crystal?
<Papierkorb> it's already implemented?
<FromGitter> <sdogruyol> ohhh
<FromGitter> <sdogruyol> i thought it was a c binding at first
<FromGitter> <sdogruyol> thanks
<FromGitter> <sdogruyol> The large state space comes with a performance cost: the 2.5 KiB state buffer will place a load on the memory caches. In 2011, Saito & Matsumoto proposed a version of the Mersenne Twister to address this issue. The tiny version, TinyMT, uses just 127 bits of state space
<Papierkorb> As long it doesn't weaken its strength
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <sdogruyol> just found this
<FromGitter> <sdogruyol> i just found the PR for MT
<FromGitter> <sdogruyol> i really miss @linda_pp
<FromGitter> <sdogruyol> he was very active back in the days
<conner_> Working with databases is so troublesome still :(
<FromGitter> <sdogruyol> like what?
<FromGitter> <sdogruyol> are you using crecto yet?
<conner_> Nope
<conner_> Wow, this looks cool
<conner_> Only seen the ones on awesome-crystal
<FromGitter> <sdogruyol> yeah crecto is the way to go
<FromGitter> <sdogruyol> please do check too
<FromGitter> <sdogruyol> it's a great way to discover & browse all the shards
<FromGitter> <sdogruyol>
<conner_> Cool, cheers
<FromGitter> <sdogruyol> cheers
<FromGitter> <sdogruyol> and for complex queries you can use tren which is like yesql
<conner_> I need to be able to execute queries from strings
<conner_> ORM might be a bit more than I need
<FromGitter> <sdogruyol> i love SQL so :P
<FromGitter> <sdogruyol> but crecto is great
<FromGitter> <fridgerator> @sdogruyol thanks!
<FromGitter> <sdogruyol> keep up the great work :+1:
<FromGitter> <fridgerator> @conner_ if your queries are complex or non-standard sometimes ORM can be inhibiting. Crecto query does support `where` queries with raw strings :
<conner_> Not going to be enough unfortunatel6
<FromGitter> <sdogruyol> wow i didnt know that there's a website
<conner_> @FromtGitter
Raimondii has joined #crystal-lang
<conner_> I'm working on something at work, and the system we currently have is a horribly written PHP script that just works and no more. But I've rewritten in crystal now, and everything is okay so far, but working with their horrible databases is proving challenging with the rigidness of the straight SQL libs at the moment
<FromGitter> <sdogruyol> :D
<FromGitter> <sdogruyol> i know that feeling
<FromGitter> <fridgerator> @sdogruyol yeah I registered a domain and just threw the docs up there
<FromGitter> <sdogruyol> i once had the same experience with an asp app
<FromGitter> <sdogruyol> good luck @conner
<conner_> They pull one of the SQL queries from the database
<FromGitter> <sdogruyol> @fridgerator great
<conner_> Then I have to parse the query and stuff
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
<FromGitter> <sdogruyol> ugh it's doable but yeah
<conner_> Yeh, dealing with this lovely error
<conner_> Debug errors from this lib are horribly
<conner_> *horrible
_whitelogger has joined #crystal-lang
<FromGitter> <drujensen> @conner another option is kemalyst-model. It's not as full featured as cretco but it uses an ORM approach. It's not dependent on Kemalyst and will work with Kemal, Amber or Amethyst.
alibby has quit [Quit: Leaving.]
sz0 has joined #crystal-lang
<FromGitter> <bigDaddyS1oth> Hey mates, you think with where the language is at right now would it be possible to create a video player?
<FromGitter> <gabrielchase> hows everybody liking crystal :))
<FromGitter> <gabrielchase> haven't tried it yet but am really interested haha
<FromGitter> <fridgerator> i love it
<FromGitter> <elorest> I love crystal.
<FromGitter> <gabrielchase> is there a job market in the future :(
<FromGitter> <gabrielchase> cause it really seems like the perfect language to me haha
conner_ has quit []
<FromGitter> <mgarciaisaia> If something seems perfect, take a second look - there probably is something you're not seeing
<FromGitter> <mgarciaisaia> But, apart from that - Crystal rocks hard, yeah!
<FromGitter> <mgarciaisaia> @bigDaddyS1oth what would a video player imply?
<FromGitter> <elorest> Many of us are doing what we can to make sure there are jobs.
<FromGitter> <elorest> Hey what is the meaning of `def fill(with amount)` on the cup? What does `with` mean in this context.
balduin has quit [Ping timeout: 272 seconds]
fenicks has quit [Ping timeout: 264 seconds]
<FromGitter> <schoening> How do you feel about Crystal being created when functional programming is getting 'hyped' and there is a new article every week about 'why oop sucks' ? ⏎ Coz as a web developer I started believing that stuff up until I found crystal.. ⏎ Just looking for opinions and learning stuff. Not trolling. I know this is almost like talking religion for some people :p
<FromGitter> <drujensen> according to DHH’s railsconf talk, it is religion. Functional programming is really trying to address and simplify concurrency. Immutability makes things simple when you have to deal with parallelism because you no longer have shared memory. However, this is not the only way to deal with concurrency issues and throwing out OOP is like throwing out the baby with the bath water IMO.
<FromGitter> <drujensen> Rust has a unique approach with memory ownership model and Crystal is using the Go model of channels. Neither require dropping OOP.
<FromGitter> <drujensen> I think there are certain problems that are best addressed with functional models and others that are better suited for OO. It depends on the problem domain but if you can keep both models in a language, I think you will be happier when you want to isolate some data, inherit some functionality, encapsulate a section of code or duck-type a method. These are all well-known issues and we have well-known
<FromGitter> ... design patterns to address them in the oo world.
<FromGitter> <schoening> I experiment with writing in a functional style in JavaScript but I should really pick up a proper functional language so I can broaden my perspective on this have have some actual insight. ⏎ Currently I just try to minimize state as much as possible and also use "pure" functions when possible.
<FromGitter> <schoening> At least in game development it does 'feel right' to have instances that can act on their own. ⏎ But I have not had a large enough code base to work with to know what would be best for big projects
<FromGitter> <drujensen> Minecraft can be done with pure functions but it would be some fairly nasty code and memory structures. Having a block base class and then a obsidian block that inherits from it and benefits from all the functionality that already exists in that base class is a great example of a problem domain that OO is best suited for.
<FromGitter> <schoening> But then again. Isnt inheritance discouraged?
<FromGitter> <drujensen> not that i’m aware of. As long as all the functionality in the base makes sense for the inherited object.
<FromGitter> <drujensen> if your doing front-end development in javascript like react/redux/flux, then you will want immutable data and pure functions to avoid two concurrent processes modifying the same state and causing all kinds of callbacks to be triggered that refresh who knows what where.
<FromGitter> <mbgardner> Hello, I'm trying to dynamically get a string with a hex escape and an int's hex value, i.e. 255 => "\xFF", but I haven't been able to figure out a way to do it -- the "\x" literal won't compile (invalid hex escape error) -- is there a way to do this w/o having to hardcode a hex map? For reference, I'm trying to create the same basic functionality as Integer#chr in Ruby
<FromGitter> <drujensen> @mbgardner If your trying to get a string, the \ needs to be escaped so `puts "\\xFF”`
<FromGitter> <drujensen> will result in a `\xFF`
<FromGitter> <drujensen> is that what your looking for?
<FromGitter> <mbgardner> No, unfortunately that won't work for my use case, the end result needs to be "\xFF"
<oprypin> mbgardner, how about you just call chr
<FromGitter> <mbgardner> That returns the unicode codepoint, I need the hex value with the \x escape included...I'm interfacing with a telnet API, which is why sending "\\xFF" won't work
<oprypin> mbgardner, what is a "hex value"
<oprypin> mbgardner, seems to me like you're just working with bytes, and so you can just send the 255 directly
bjz has joined #crystal-lang
<FromGitter> <mbgardner> Normally yes, but this use case requires mixing the values in with regular text, so I need to get a string value -- I'll go the hardcoded map route for now -- thanks though, I appreciate the quick help
<FromGitter> <drujensen> can you send individual chars at a time?
<FromGitter> <drujensen> or utf-8 chars?
<oprypin> mbgardner, this is ridiculous and it's too bad that you don't want to resolve the confusion
<oprypin> I would like to see how you currently send strings and then suggest a way to send these special bytes
<oprypin> i think the way "\xff" currently works in crrystal is a bug
<oprypin> "\xff" should be the same as 0xff.chr but instead it produces invalid utf-8
<oprypin> here's how to programmatically produce such a malformed string:, 0xffu8))
<oprypin> of course you shouldn't be producing malformed strings only to turn them into bytes but who am i to stop you
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <mbgardner> Sorry, maybe I'm not explaining my use case well enough? I'm creating a telnet server that needs to be able to communicate with a telnet client using regular text interspersed with telnet commands -- there isn't a good or reliable way, for my use case, to send those to things independently in a way that the client will understand
<oprypin> mbgardner, telnet is a byte-based protocol, you're always sending them bytes.
<oprypin> i am not sure how you are sending strings because there has to be some encoding happening on the fly
<oprypin> and if you're already sending text as bytes, what prevents you from sending control bytes?
<oprypin> so, please share some code where you send a string to telnet
<oprypin> also it probably only supports ascii because utf-8 would be broken by these control bytes
<FromGitter> <mbgardner> Correct, the problem isn't in the transmission, it's in my buffering -- I need to buffer the telnet commands with normal text
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
yogg-saron has joined #crystal-lang
yogg-saron has quit [Client Quit]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <straight-shoota> Has anyone an idea how the stacktrace from an exception seemingly lists incorrect code locations? There is supposedly a `Nil assertion failed` at `0x597800: not_nil! at /opt/crystal/src/ 65:0`. But that line is just ` def to_s(io)`. Another one is at 255:3 in a file that has only 73 lines of code.
bjz has joined #crystal-lang
splitty_ has quit [Ping timeout: 260 seconds]
balduin has joined #crystal-lang
<jokke> hi
<RX14> hi
<oprypin> hi
fenicks has joined #crystal-lang
<jokke> what's the most elegant way to get the inner object of a json with json mapping. My json looks sth like this { "result": { "this": "is what's actually interesting" } }
<jokke> i don't care about the outer object at all
<oprypin> JSON.parse(that)["result"]
<oprypin> oh sorry you mean json mapping
<oprypin> there wasa a way
<jokke> yeah
<RX14> you can set a root key
<jokke> yeah i saw there's the "root" option but it didn't help
<RX14> JSON.mapping(this: {type: String, root: "result"})
<RX14> would be what i'd guess
<jokke> so for that example i would have tried JSON.mapping(this: { type: String, root: :result })
<RX14> and what happened?
<oprypin> should be "result" anyway
<jokke> okay give it as a string, let's see
<jokke> Missing json attribute: price at 0:0
<oprypin> why don't we keep the example json consistent
<jokke> yeah, sorry
<oprypin> jokke, anyway i think it's this
<jokke> wut
<jokke> aaah
<oprypin> as per that example, whch is weird, we get
<jokke> it's switched
<oprypin> hm i wonder if this just happens to work but isnt what you want
<jokke> yeah i just wrapped it with another json mapping...
<jokke> any good message queue implementations for crystal?
<jokke> um not implementations.
<oprypin> jokke, ooh i dont think you need to put this in json mapping, that's the thing! just call this
<jokke> libraries
<FromGitter> <bew> channel?
<oprypin> - with root argument
<jokke> ooooh
<jokke> nice!
<jokke> thanks!
<jokke> oprypin: works like a charm :)
<RX14> I think i'll have a try at isolating the compiler changes for windows
<RX14> and attempt to get appveyor CI building with --prelude=empty
<oprypin> RX14, :o awesome. is it in a buildable state? what's the status, anyway, cuz i haven't been following?
<RX14> i;m not entirely sure on the status
<RX14> but the compiler work must be somewhat done because the stdlib work is going on
<oprypin> oh, so nothing new since Apr 6 single-msqueue
<oprypin> wait, i'm confusing with threading support
<RX14> it's in a fork
<RX14> yes oprypin
<oprypin> is that the fork or manas's own?
<RX14> that PR is from the fork, yes
<RX14> oh...
<RX14> there aren't any compiler changes
<RX14> it's using a hacky way to avoid that by emitting bitcode
<RX14> darnit
<crystal-gh> [crystal] mverzilli closed pull request #4405: Convert MatchData into a struct (master...feature/cr-matchdata-struct)
<crystal-gh> [crystal] mverzilli closed pull request #4408: Add Path#resolve? macro method (master...feature/path-resolve)
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master:
<crystal-gh> crystal/master 0e78159 Chris Hobbs: Prevent None and All members in flags enums (#4395)...
splitty_ has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <bigDaddyS1oth> @mgarciaisaia say like a VLC copy or a video player on a website. I know for a website HTML has a media API that let's you create one, and JavaScript has some libraries that can do that too. Just think it'd be something interesting to do.
<FromGitter> <bew> Here is a tutorial for C, using FFMPEG & SDL, you could start from this and try something... there are already SDL crystal binding, but no FFMPEG binding currently (someone had the idea but he never started... (empty project is here
<FromGitter> <bew> oops the link of the tutorial
<FromGitter> <bew> this is an updated version:
<FromGitter> <bigDaddyS1oth> Hmmm that'd be worth looking at
unshadow has joined #crystal-lang
<oprypin> wait, what's the point of all this?
<FromGitter> <bigDaddyS1oth> To create multimedia software.
<oprypin> gluing together a bunch of libraries for the sake of it isnt my idea of fun
<FromGitter> <bigDaddyS1oth> I mean that's what software is though. ;P
<FromGitter> <bigDaddyS1oth> A bunch of libraries shoved together to make something cool. If Crystal is going to stay "as fast as C" might as well take advantage of that and start making software. Say like creating a media player to add to Arch Linux's AUR repo.
_whitelogger has joined #crystal-lang
unshadow has quit [Quit: leaving]
<crystal-gh> [crystal] jhass opened pull request #4415: Fix IO::Memory#gets_to_end to consume the IO (master...feature/fix_io_memory_gets_to_end)
NIk-- has joined #crystal-lang
<FromGitter> <bigDaddyS1oth> Shoot someone could look into building a library to be able to do stuff with Arduino. They have their own flavor of C on their boards but damn think about having Crystal available on micro computer's.
splitty_ has quit [Read error: Connection reset by peer]
Raimondi has quit [Quit: WeeChat 1.8-dev]
Raimondi has joined #crystal-lang
<FromGitter> <bew> @bigDaddyS1oth I thought about this, but currently don't have time to do some experiments... Also, it would need another stdlib, or only a subset of it, as there is very few memory on thoses boards (dynamic allocation is not encouraged on micro controllers, so Array & Hash might need a little change, even if I'm not sure about that..). Also, the GC might be not needed if there is almost no dynamic allocations, and
<FromGitter> ... objects lifetime could be handled differently...
splitty_ has joined #crystal-lang
<FromGitter> <bew> the micro controller present on Arduino (and other boards too) is an AVR (architecture? I'm not sure what 'AVR' is, and how to name it). As LLVM can now target avr familiy on micro controller, the compilation will work without much trouble I think..
<oprypin> good insight
<FromGitter> <bigDaddyS1oth> Hmm interesting. So basically we'd have to make Crystal more...."barebones" I guess is how you might put it?
<RX14> you'd need a new stadlib basically
<oprypin> but even so, classes become kinda useless and structs are not as good as in C even
<RX14> why are crystal structs not as good?
<RX14> lack of bitfields is the first thing I think
<FromGitter> <straight-shoota> As I understand ist, code that is never reached will not be included in a binary. Wouldn't that mean there is no need for a reduced stdlib?
<FromGitter> <straight-shoota> At least as long as it only about minimal size of the compiled binary.
<RX14> no because the stdlib does stuff before and after your program
<RX14> and that uses the stdlib
<oprypin> RX14, no chained assignment and a general uneasy feel where you never know when a struct may just be copied
<RX14> clearly function programming is the solution :P
<RX14> make everything immutable and there's no problem
<oprypin> that doesn't fly on microcontrollers
<RX14> thats why it was :P
<RX14> oprypin, we have lib structs outside libs now
<oprypin> huh
<RX14> so that would solve that somewhat
<RX14> don't we?
<oprypin> i should know this lol
<oprypin> that feels kinda unfinished and almost nobdy knows about them
<oprypin> so its @[Extern] struct
<RX14> @[Extern]
<oprypin> i'm not sure if they change chained assignment
<oprypin> welp RX14, looks like you broke CrSFML
<RX14> chained assignment is a pain in the arse though
<RX14> :(
<RX14> which enum :P
<oprypin> i really disagree with that removal of All/None, didn't see it until now
<RX14> why?
<oprypin> removes some freedom especially for directly porting some libs
<RX14> well it works in lib structs
<RX14> I don't see the point ouside lib structs though
<oprypin> i dont even use thme
<RX14> huh??
<oprypin> i dont see the point in lib enums but whatever
<oprypin> anyway, what if i want to keep API compability for the name All but add more members
<RX14> you mean ABI compatability?
<RX14> in crystal i don't think it's that much of a deal
<oprypin> no it's both
<FromGitter> <bigDaddyS1oth> @RX14 lol at the functional programming part
<RX14> haskell on microcontrollers lol
<RX14> that would be "fun"
<FromGitter> <bigDaddyS1oth> No it would be "FUN-ctional"
<RX14> nice
<oprypin> in other news, seems like :debug flag is now set without passing any flags
<RX14> yeah
<FromGitter> <bigDaddyS1oth> Oops
<RX14> :debug is meant for "is debug info emitted"
<RX14> and really, I think it should be removed
<RX14> so people can -Ddebug
<oprypin> thats what i was doing and boom now it's always on
<RX14> and that's much clearer that that's a debug flag for debugging source
<RX14> yeah well making your source-level debug coupled with the emission of debug info was too easy
<RX14> I think the solution is just to remove that flag
<RX14> or rename it :debug_symbols
<RX14> that would be my favourite solution
<RX14> if only github's issue search was any good at all for finding issues
<RX14> i remember there was an issue opened
<RX14> I just can't find it
<FromGitter> <bigDaddyS1oth> @RX14 there's a
<FromGitter> <bigDaddyS1oth> @RX14 shit. I meant yea. I've ran into that a bunch of times
<oprypin> i'm basically losing a documented enum member
<RX14> oh
<RX14> i know what it should be
<oprypin> it should be exactly what it is
<RX14> it should be that they can't be assigned a value
<oprypin> other than 0
<oprypin> yes
<RX14> so you should be able to doc them
balduin has quit [Remote host closed the connection]
<RX14> but not change them
<oprypin> sure, would be awesome
<RX14> great
<RX14> pop that on the PR because i'll probably forget...
<oprypin> ok
Anaxagorian_ has joined #crystal-lang
Yxhvd has joined #crystal-lang
cyberarm_ has joined #crystal-lang
splitty_ has quit [Read error: Connection reset by peer]
NIk-- has quit [*.net *.split]
Anaxagorian has quit [*.net *.split]
DeBot_ has quit [*.net *.split]
Yxhuvud has quit [*.net *.split]
TheGillies has quit [*.net *.split]
cyberarm has quit [*.net *.split]
jokke has quit [*.net *.split]
Anaxagorian_ is now known as Anaxagorian
Ven has joined #crystal-lang
Ven is now known as Guest3385
jokke has joined #crystal-lang
<RX14> oprypin, ideally enum values would be documented whether they were specified or not
TheGillies has joined #crystal-lang
<RX14> so you would just put them in with no assign
<RX14> otherwise documenting All members ould kind of be a pain
<oprypin> but if you put None without assign would mean it's None = 1
<RX14> All = 2**n - 1
<RX14> oprypin, i was thinking of changing that
<oprypin> :/
<RX14> None and All would magically get the correct values
<RX14> is that bad design?
<oprypin> i think it is
<oprypin> i think having All is bad design
<oprypin> because it's an API contract, then you may want to add a flag that makes no sense to have under normal circumstances but people are already using All
<oprypin> and being unable to override it makes it worse
<FromGitter> <johnjansen> @RX14 ping me directly when you get a chance
<RX14> I agree
<RX14> @johnjansen why?
<FromGitter> <johnjansen> i was going to see if you were interested in a bit of work in your free time ;-)
<RX14> if I had any free time :)
<FromGitter> <johnjansen> haha, yeah, i thought that might be the case
<FromGitter> <johnjansen> you are still studying though, right?
<FromGitter> <bigDaddyS1oth> Hey I was curious if there would be any other code camps in the future? A lot of you know a lot more about programming than I do, and the school I'm at is only a 2 year community college and they don't teach enough about programming (and I have to learn Java as part of my degree. Woooo...). So for me it'd be worth attending.
<oprypin> bigDaddyS1oth, i wouldn't expect it in the nearest year
<oprypin> but it's just speculation
<FromGitter> <bigDaddyS1oth> Oh no yea. I can understand that.
<Papierkorb> bigDaddyS1oth, Really, just stick around (here or wherever you like), and most importantly (imho): Do a project solving something that's annoying you. No school teaches you what you'll actually do, much can only be learned from experience
Guest3385 has quit [Ping timeout: 240 seconds]
Ven_ has joined #crystal-lang
<FromGitter> <bigDaddyS1oth> Yea I wanna look into getting some Ruby Gems translated to Crystal
<FromGitter> <bigDaddyS1oth> Like sass-rails coffee-rails jquery-rails
<FromGitter> <bigDaddyS1oth> No for rails, obviously. :P for kemal and kemalyst
<oprypin> make an empty repository @ ask for money
<FromGitter> <sdogruyol> lol
<Papierkorb> I was already wondering if I was the only one wishing for pattern matching
Dreamer3 has quit [Quit: Leaving...]
<oprypin> seems like it would fit in well
<Papierkorb> that and recursive/complex destructuring
<oprypin> on the other hand, also seems good for post-1.0 development
Dreamer3 has joined #crystal-lang
<oprypin> except here the brackets make sense
<oprypin> and the () brackets used in crystal's destructuring don't
<Papierkorb> Rust also does it nicely
<Papierkorb> () is probably a ruby-ism
<oprypin> but it also doesnt really make sense in ruby
<oprypin> why does it seem blindly copied from python (where it does make total sense)
<FromGitter> <bigDaddyS1oth> What the () for restructuring?
<FromGitter> <bigDaddyS1oth> Sorry restructuring?
<FromGitter> <bigDaddyS1oth> Fuck
<oprypin> i think that was in function calls, right?
<Papierkorb> ..?
<FromGitter> <bigDaddyS1oth> I'm on mobile so this dumb phone keeps auto correcting.
<oprypin> I clearly remember round brackets being used somewhere for destructuring but i can't remember where now
<oprypin> bigDaddyS1oth, disable auto correct..
<Papierkorb> tuples in block arguments
<oprypin> riight, that one
<oprypin> doesnt make sense
<Papierkorb> I don't care if it's () or {}, I just wanna be able to use it everywhere
<oprypin> i think changing that to {} would set a good precedent
<oprypin> then namedtuple unpacking can be implemented, or even hash unpacking
<FromGitter> <bigDaddyS1oth> You use () in Ruby for like when you make new objects and function arguments.
<Papierkorb> oprypin: object unpacking
<oprypin> well.. that's more debatable
<oprypin> asdf[:dfg] is just more annoying than asdf.dfg that's why i wanted unpacking there
<FromGitter> <bigDaddyS1oth> In python it's for methods and...tuples, if I remember right. Like len() or print()
<FromGitter> <bigDaddyS1oth> And know...tuples. :P
NIk-- has joined #crystal-lang
Ven_ has quit [Ping timeout: 268 seconds]
DeBot has joined #crystal-lang
Ven has joined #crystal-lang
Ven is now known as Guest28311
<FromGitter> <johnjansen> anyone ever tried crystal for arduino in any way?
Guest28311 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RX14> it should theoretically be possible @johnjansen
<RX14> but it would require a lot of effort to go from being a toy project to be actually usable on arduino
<RX14> I really want to atttempt to make the stdlib less interdependant
<RX14> so you could for example require String without requiring the entire stdlib
<RX14> but currently the stdlib just isn't designed that way
<RX14> without a GC/LibC/stack unwinding impl it's like you have to start from scratch
<FromGitter> <johnjansen> thanks @RX14, one day maybe … crystal would be awesome for that kind of thing
<RX14> yeah i believe it has potential as a compiler
<RX14> the stdlib is really the issue here
<RX14> defining a clean boundary between the stdlib and the compiler would also help
<RX14> however that bounday is currently not well-defined
<RX14> and you end up having to stub a lot out to even start writing an alternate stdlib
<RX14> hopefully that's something we can improve
<RX14> I dopn't *think* it would be something locked down at 1.0
<jhass> well, tbh. I'm not sure it's really optimal when it comes to binary sizes either, given the approach to calling methods with different types is to just copy them
<Papierkorb> the stdlib is too entangled right now
<RX14> jhass, yeah that too
<RX14> yeah binary size is a big issue
<RX14> (for arduino)
<RX14> the little ARM chips looks a lot more promising iirc
<RX14> i'm not sure how much their typical progmem is
<FromGitter> <johnjansen> its a fun idea that may not be practical
<RX14> well there's been an OS in crystal
<RX14> if you have enough free time anything's possible :P
<Papierkorb> I counted three RX14
<RX14> all dead though (iirc)
<Papierkorb> yep
<RX14> I had fun helping with the most active one though
<RX14> that was fun times
bjz has joined #crystal-lang
ben has left #crystal-lang [#crystal-lang]
Anaxagorian has quit []
Raimondii has joined #crystal-lang
minus has quit [Ping timeout: 268 seconds]
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
minus has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
<Papierkorb> Mh when I write tests for it, I could publish the jsonrpc stuff as shard. It's not even complete overkill. How unusual.
NIk-- has quit [Quit: Textual IRC Client:]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Renich has quit [Quit: Renich]