<asterite>
The `to_s` doesn't know how you wrote the ASTNode but if i's a call with a block with a single argument, and a call on that argument, it writes it in the compact way :)
<weskinner_work>
I need to read more of the complier :)
<asterite>
weskinner_work: what do you mean with CAN .to_s ?
<jhass>
that it doesn't just generate "<Crystal::Call 0x0123>" I guess
<asterite>
:)
<asterite>
The to_s on AST nodes isn't just for debugging purposes, it's used when you do {{some_node}} inside macros
<jhass>
thought o
<jhass>
*so
<weskinner_work>
ahh
<weskinner_work>
I need to read more about macros :)
<weskinner_work>
I thought they were just find / replace
<jhass>
asterite: that parse call starts an entirely new namespace I guess? I can't wrap a bunch of macro calling code into it to see what's coming out?
<jhass>
Module#to_code would be interesting I guess :P
<asterite>
I guess the repeated zero could work. That, or we leave the memory hog. In what other way we could get that behaviour with such a simple call?
<asterite>
An empty string?
<jhass>
dunno, maybe just raise too
ismaelga has quit [Remote host closed the connection]
<asterite>
ponga: we originally tried to use the same crystal code to implement map and others, but it turns out it's quite hard (maybe impossible?) so instead we interpret those calls
<asterite>
oh, sorry, that was for weskinner_work
<ponga>
asterite: thank you for explaining that but that was for weskinner_work
<ponga>
asterite: its good, i wondered that too
<weskinner_work>
cool!
orliesaurus has left #crystal-lang [#crystal-lang]
<ponga>
weskinner_work: are you at work at the moment
<ponga>
asterite: its not an artificial lang to replace existing ones like ido/esperanto, Alis lang is designed to you could talk to ai chatbot. So im omitting components i see unnecessary
<ponga>
and plus whatever rule that makes a language more difficult without contributing linguistically
<ponga>
actually semantically
vifino has quit [Quit: Who turned this off?! D:<]
<ponga>
now time to completely rework mood pre/suffixes
<ponga>
asterite: do you have a to-do list for crystal ?
<asterite>
ponga: not really, kind of, in my head and what we talk with waj
<asterite>
like, unfinished stuff that still need thought and resolution
<asterite>
but that might be boring, so we do fun stuff and from time to time tackle the hard problems :)
<asterite>
ponga: in japanese isn't there an infinite? like the "ru" form, taberu, iru, etc. (but I think they call it in another way)
wanderer has joined #crystal-lang
<weskinner_work>
is "macro included" special?
<asterite>
weskinner_work: yes
<weskinner_work>
gets called on include?
<asterite>
Yes, it's a macro that's invoken on include at compile time
<asterite>
there you have @type, that's the type of the class/module that includes it
<weskinner_work>
k just wanted to make sure
<jhass>
weskinner_work: we also got macro inherited
<asterite>
>> module Moo; macro included; $a = {{@type.stringify}}; end; class Foo; include Moo; end; $a
<DeBot>
asterite: Syntax error in eval:7: expecting identifier 'end', not 'EOF'
<asterite>
>> module Moo; macro included; $a = {{@type.stringify}}; end; end; class Foo; include Moo; end; $a
<DeBot>
asterite: "Foo"
<jhass>
heh, could just puts there directly :P
<asterite>
module Moo; macro included; $a = {{@type.methods.map(&.name).sort.uniq }}; end; end; class String; include Moo; end; $a
<asterite>
>> module Moo; macro included; $a = {{@type.methods.map(&.name).sort.uniq }}; end; end; class String; include Moo; end; $a
<wanderer>
The website says "Latest entries from our blog:", does this mean that there are more? One can't tell as there doesn't seem to be a navigation
<asterite>
wanderer: they are all, we should change the title
havenwood has quit []
<wanderer>
asterite: ah, ok. yes, it's kinda unclear whether there are more entries or like some external blog with navigation
<asterite>
Not initialized, so you were writing to memory address zero?
<asterite>
weird
<jhass>
weskinner_work: so it's dangerous since initialize doesn't get run ;)
<asterite>
Yes. allocate is a primitive, meaning there's no source code for it
<jhass>
well, there is, somewhere in llvm, no?
<weskinner_work>
why is it useful here?
<wanderer>
asterite: also I see Enumerable#include? got renamed to #includes?. why is that? and why not directly name it like e.g. #has?, i find #include? kinda strange to begin with
<jhass>
weskinner_work: I should probably drop it, I had issue with initializers getting overriden and subclasses no longer accepting the json pull parser and stuff
<jhass>
but changed architecture a bit since
<weskinner_work>
ok so something specific to this setup not a general best practice for a certain situation
<jhass>
yes, definitely not
<asterite>
wanderer: `[1, 2, 3].include?(4)` reads strange, so we decided to rename it to `includes?`… but maybe both should be accepted. But I'm not sure `has?` has the same meaning
<asterite>
Using allocate is never a best practice :)
<asterite>
allocate is reserved for the compiler, but you might want to use it if you feel adventurous
<jhass>
weskinner_work: you can see it sometimes in testsuites in ruby to trick out object initialization to make it faster or skip validations
<jhass>
but I think it's also a bit safer there
<asterite>
It's part of the "three unsafes" (R)
asterite has quit [Quit: Leaving.]
<weskinner_work>
three unsafes?
vifino has joined #crystal-lang
<ponga>
weskinner_work: asterite is gone
<weskinner_work>
ah you're right
<jhass>
he used that term in the past, let me search logs :D
<jhass>
mmh, can no longer find it
<jhass>
Class#allocate, pointers obviously
<jhass>
can't remember the third
<ponga>
i forked crystal and cloned it via github, now time to look for some work!
<ponga>
getting used to git is lot of work
<jhass>
ponga: went through try.github.com?
<ponga>
jhass: thanks i always used sourcetree it'd be good of me to learn CLI git around
<crystal-gh>
[crystal] Exilor opened pull request #464: Added BigInt::cast and #to_i, #to_u... (master...master) http://git.io/pJWK
<weskinner_work>
jhass: I thought "three unsafes" might be some ruby thing. Not sure what asterite meant with the "(R)" suffix
<jhass>
copyrighted
<jhass>
as in a coorporate catch phrase
<ponga>
uh what is -m -am after commit
<ponga>
it doesn't explain
<jhass>
ponga: message
<ponga>
i see
waj1 has quit [Quit: Leaving.]
<jhass>
if you leave it off git will open your $EDITOR instead to let it type you in
<jhass>
the recommended format is to keep the first line below 70 characters and let it summarize the commit, if you want to add more to the message don't use the shortcut, add a blank line after the summary and continue in paragraphs with lines no longer than 80 characters
leafybasil has joined #crystal-lang
<weskinner_work>
jhass: your architecture is quite impressive
<jhass>
somewhat inspired by cinch and the aim to make two libraries out of it in the long run
<jhass>
user tracking is still wonky and doesn't have its right place though
<weskinner_work>
user tracking?
<jhass>
keeping up to date what users are in the channel and which flags they got
<weskinner_work>
ah. well thanks for your help today. will probably have more questions as I read through DeBot :) . Headed out!
<jhass>
you're welcome, have a nice night
weskinner_work has quit [Ping timeout: 250 seconds]
ismaelga has quit [Remote host closed the connection]