<hightower2>
marksiemers: no luck on my side either
snsei has quit [Remote host closed the connection]
<hightower2>
Is there a way to define some code that will be executed during initialize, but without having to actually do 'def initialize' and then forcing subclasses to call 'super'? Esentially, I'm looking for something like specifying "@var = ..." at class level, but something that would work for code, not just instance vars.
snsei has joined #crystal-lang
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
<hightower2>
marksiemers: note my comment "something that would work for code, not just instance vars"
<hightower2>
Is it possible to call a captured block using block.call(), but have it work equivalent to 'with self yield'?
snsei has quit [Remote host closed the connection]
ashirase has quit [Ping timeout: 248 seconds]
hightower3 has joined #crystal-lang
ashirase has joined #crystal-lang
hightower2 has quit [Ping timeout: 248 seconds]
dhk has quit [Quit: Leaving]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 250 seconds]
mbarbar has quit [Ping timeout: 256 seconds]
lacour has quit [Quit: Leaving]
vikaton has joined #crystal-lang
DTZUZU has quit [Quit: WeeChat 1.9]
<FromGitter>
<marksiemers> I'm not sure about that. Is it possible to provide a code sample - something that isn't working but shows what you want to do?
<FromGitter>
<jwaldrip> Anyone having issues building for release in travis?
DTZUZU has joined #crystal-lang
DTZUZU has quit [Client Quit]
faustinoaq has quit [Ping timeout: 248 seconds]
DTZUZU has joined #crystal-lang
<FromGitter>
<Yive> is it possible to have an if statement with unless? as in `if var == 32 unless var2 == 64` for example
<FromGitter>
<Yive> thank you, that worked perfectly. Though I ended up just going with a different method all together
faustinoaq has joined #crystal-lang
DTZUZO has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 272 seconds]
alex`` has joined #crystal-lang
alex`` has quit [Client Quit]
illyohs has quit [Ping timeout: 260 seconds]
alex`` has joined #crystal-lang
csk157_1 has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
DTZUZO has quit [Ping timeout: 248 seconds]
<FromGitter>
<rumenzu> Morning everyone
<faustinoaq>
Morning, 2:00 AM here :-)
<FromGitter>
<rumenzu> I just wanted to say I defended my PhD two days ago with software written in Crystal <3<3
<faustinoaq>
Excellent, congrats!
<faustinoaq>
I'm still an undergraduate student :D
<FromGitter>
<rumenzu> Thanks a lot!
<FromGitter>
<rumenzu> Where R u studying ?
<Yxhuvud>
rumenzu: Congrats! What was your topic?
<FromGitter>
<rumenzu> theory of modeling and simulation, the goal was to formalize multi-agent systems
<FromGitter>
<rumenzu> and thank you!
<faustinoaq>
@rumenzu I'm from Panama, I'm studying, Computer Science in University of Panama, but in next years (2019-2020) I want to take some grade, maybe a Phd in some foreign university, What country do you recommend? I was thinking on Japan or Canada :-)
<Yxhuvud>
multi agent in a discrete or continous time?
<FromGitter>
<rumenzu> @yxhuvud continuous time
<Yxhuvud>
cool
<FromGitter>
<rumenzu> @faustinoaq unfortunately I have no experience outside France so I can't recommend anything. But I think it will depends mostly on the topic you choose
<FromGitter>
<bew> hightower2: if you still haven't found, when you capture a block, you need to specify it's type (at least the args type). And no you can't have a block that can be captured and `with .. yield`ed, as with..yield work only for a non-captured block.
claudiuinberlin has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 272 seconds]
rohitpaulk has joined #crystal-lang
mbarbar has joined #crystal-lang
vikaton has quit [Quit: Connection closed for inactivity]
<hightower3>
faustinoaq, hehe, was just buying something from pragprog and after entering recipient data and clicking Next, ran into unprocessed page: PP.update_checkout_content("\n<div class=\"row checkout-box\" id=\"my_details\"><div ...
<hightower3>
So can't continue :)
<faustinoaq>
XD
<FromGitter>
<imonmyown> @hightower3 I'm sure support will be willing to help
DTZUZO has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 256 seconds]
rohitpaulk has joined #crystal-lang
<RX14>
So it seems more likely 0.24.1 will be released this week
<FromGitter>
<bew> 🎉
<RX14>
Can't promise anything but I've had a chat with the Manas guys and they're working on it
<FromGitter>
<sdogruyol> @RX14 awesome
<FromGitter>
<sdogruyol> did we get your Windows PR in for 0.24.1?
<FromGitter>
<yxhuvud> nice! I hope it is out before advent of code have an exercise where I need a queue, the array improvements will be nice to get
<FromGitter>
<sdogruyol> Wow, @mverzilli just tagged 0.24.1 🎉
<FromGitter>
<yxhuvud> \o/
<FromGitter>
<rumenzu> @yxhuvud yes, more tree-based event sets will be implemented (probably pairing heap and fibonacci heap) but this is not a priority, as the multi-list based schedulers (calendar queue and ladder queue) are quite efficient
rohitpaulk has joined #crystal-lang
hightower3 has quit [Ping timeout: 260 seconds]
<foxxx0>
hm
<foxxx0>
what is the crystal equivalent of ruby's Array(Int32)#reduce(:+)?
<foxxx0>
i just want the sum of all array elements
<FromGitter>
<bew> `Array#sum`?
<foxxx0>
oh
<foxxx0>
must have missed that in the docs
<FromGitter>
<yxhuvud> `reduce {|a, b| a + b}` will also work.
<foxxx0>
but i bet #sum is more efficient
<FromGitter>
<yxhuvud> I doubt it. I'd actually bet they are totally equivalent.
<RX14>
yup
<RX14>
llvm in release mode should optimize those to be the same
<FromGitter>
<bew> looking at the code, sum is a reduce in the end ^^
rohitpaulk has quit [Ping timeout: 264 seconds]
jop_ has joined #crystal-lang
jop_ has quit [Client Quit]
alex`` has joined #crystal-lang
<FromGitter>
<paulcsmith> 1) 24.1 was tagged but I thought 0.24 wasn’t even out yet? Or maybe I am misunderstanding the release process?
<RX14>
0.24.0 is a prerelease
<RX14>
its been out fo a month
<RX14>
but its a prerelease
<FromGitter>
<paulcsmith> Sorry I meant “out” as in normal release by ore release. But I just saw your comment on 0.24.1 and I agree getting it out would be great to reduce confusion 👍
rohitpaulk has joined #crystal-lang
<FromGitter>
<yxhuvud> the confusion is due to the version comparison at some stage doesn't or didn't support 0.24.rc1
<FromGitter>
<mjago> Is there anything in the standard library for sizing strings containing `combining accents’?
<crystal-gh>
[crystal] RX14 closed pull request #4955: Remove markdown, use markd shard in compiler (master...refactor-markdown) https://git.io/v510l
<jokke>
because libzmq which is correctly included by crystal uses libsodium. libsodium isn't added by crystal to the linker flags and if i add it manually it is before -lzmq on the command line and as such gets loaded after zmq which then can't find any symbols from the lib
<RX14>
so
<RX14>
thats what pkg-config solves
<jokke>
how?
<jokke>
i'm telling you adding -static to --link-flags doesn't work
<jokke>
i tried to make it work for hours
<RX14>
pkg-config solves library dependencies
<jokke>
yeah i thought so too
<RX14>
so if it doesn't work then either you don't have pkg-config installed
<jsn->
seems like a bug, why would a macro make the compiler lose the ability to infer that the instance var is always initialized
<jokke>
jsn-: well the check for initialization is probably run before macros are evaluated
<jokke>
you could just initialize with defaults before calling the macro but that'd be a pretty ugly workaround
<jsn->
https://play.crystal-lang.org/#/r/38l7 -- this one is especially funny, it says it can't infer the type from "@b = 1" and immediately recommends to use "@b = 1" to avoid that
<jsn->
jokke, but macro expansion errors, if there any, are triggered before the type inference error
<jokke>
:)
<faustinoaq>
jsn- Take a look https://carc.in/#/r/38ld Not the best way to solve it, but works :)
<Papierkorb>
And that has nothing to do with "blockchain", that's just using the markets API
<FromGitter>
<unreadable> this should do the trick
alex`` has joined #crystal-lang
p0p0pr37 has joined #crystal-lang
p0p0pr37 has joined #crystal-lang
<FromGitter>
<sdzyba> does anyone know when to expect 0.24.1 on https://dist.crystal-lang.org repos? ⏎ I hope 0.24.0 was skipped there since it's a "prerelease", not because repos aren't maintained anymore.
<RX14>
0.24.1 has been tagged, not released
<RX14>
we know what we're going to release
<RX14>
we havent released it yet
<RX14>
it'll release once we have packages built and everything is ready
<FromGitter>
<sdzyba> I see, thanks
<FromGitter>
<unreadable> hey RX14, what's going on with windows support? It'll be implemented the same way rust does it?
<FromGitter>
<unreadable> it also has crystal pupligns oO
faustinoaq has quit [Ping timeout: 256 seconds]
<RX14>
>better than vim
tilpner has quit [*.net *.split]
yopp has quit [*.net *.split]
<RX14>
thats your opinion
tilpner has joined #crystal-lang
yopp has joined #crystal-lang
<FromGitter>
<unreadable> yeah, for sure and I've arguments on that, but that's not the point
<Papierkorb>
"X > Y" "That's your opinion" "That's not the point" wat
handicutsman has quit [Ping timeout: 240 seconds]
handicraftsman has joined #crystal-lang
<Yxhuvud>
signs I am not running 0.24 yet: I just won a second on my AoC solution by extracting 3 hash lookups to a variable.
<FromGitter>
<bew> @unreadable neovim can have crystal plugin too
<FromGitter>
<unreadable> ikr
<FromGitter>
<bew> but micro seems great though ;)
<FromGitter>
<paulcsmith> Punchcards FTW. Who needs all of those fancy "plugins" and "syntax highlighting"
<RX14>
Yxhuvud, hashes in 0.24.1 are slower I think lol
<Yxhuvud>
With numbers too? Really? Not having conflicts all the time shoudl be noticable.
<Yxhuvud>
for strings or whatever I could see it
<RX14>
oh idk about numbers
<Yxhuvud>
look at the nice distribution graph for numbers in funny falcons PR.
<Yxhuvud>
that ysbaddaden did
<RX14>
doesnt halp if your hashing algorithm is 2000 times slower
<Yxhuvud>
depends on how many entries there is in your hash table, and how many cache misses you get by going though the linked list of collisions
<Papierkorb>
RX14: the new algo is that much slower?
<Papierkorb>
Thought it wasn't that bad Oo
<RX14>
probably not
<FromGitter>
<bew> Yxhuvud did you bench in release mode?
<RX14>
i'm pulling numbers from nowhere
<RX14>
it's very unlikely to be that bad
<RX14>
but
<Yxhuvud>
bew: yes.
<RX14>
its defiitely more expensive
mini_me44 has joined #crystal-lang
<Papierkorb>
thought someone benched that in the PR, but can't remember
<Yxhuvud>
for numbers, it is a few more instructions, but not that many.
<Yxhuvud>
@bew: without optimization the difference is like 17 to 13s, or something like that.
<Yxhuvud>
instead of 5 to 3.5
<FromGitter>
<sdzyba> RX14 you mentioned once that if someone would hire you to work fulltime on Crystal you will accept that offer. ⏎ ⏎ 1) do you receive something from current monthly Crystal funding through bountysource? (sorry if that's too private question) ⏎ 2) if not, didn't you think about some similar kind of fundraising for you (and maybe other core team members) to work on Crystal?
<Yxhuvud>
but of course, it is quite possible that it always will be faster to break it out (or to put everything in an array instead, it is only numbers up to 200 or so)
<RX14>
@sdzyba 1) no 2) no
<RX14>
well i guess i thought about it
<RX14>
but I really can't be bothred
mini_me44 has quit [Quit: Page closed]
vivus has joined #crystal-lang
alex`` has quit [Quit: WeeChat 1.9.1]
baweaver is now known as lemur
lemur is now known as baweaver
Kug3lis has quit [Quit: Ping timeout (120 seconds)]