snsei has quit [Remote host closed the connection]
csk157 has quit [Ping timeout: 248 seconds]
snsei has joined #crystal-lang
DTZUZO has quit [Ping timeout: 268 seconds]
DTZUZO has joined #crystal-lang
vivus has quit [Quit: Leaving]
csk157 has joined #crystal-lang
illyohs has quit [Ping timeout: 268 seconds]
csk157 has quit [Ping timeout: 248 seconds]
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 248 seconds]
dyreshark has joined #crystal-lang
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 268 seconds]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
faustinoaq has joined #crystal-lang
faustinoaq_ has joined #crystal-lang
faustinoaq has quit [Ping timeout: 255 seconds]
snsei_ has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 276 seconds]
faustinoaq has joined #crystal-lang
faustinoaq_ has quit [Ping timeout: 255 seconds]
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Quit: IRC client terminated!]
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
faustinoaq has joined #crystal-lang
csk157 has joined #crystal-lang
snsei has joined #crystal-lang
csk157 has quit [Ping timeout: 260 seconds]
snsei has quit [Ping timeout: 255 seconds]
faustinoaq has quit [Quit: IRC client terminated!]
rohitpaulk has joined #crystal-lang
faustinoaq has joined #crystal-lang
<faustinoaq>
RX14, I like you new profile image XD
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Read error: Connection reset by peer]
ashirase has quit [Ping timeout: 255 seconds]
ashirase has joined #crystal-lang
rohitpaulk has joined #crystal-lang
aroaminggeek has quit [Ping timeout: 255 seconds]
kp666[m] has quit [Ping timeout: 276 seconds]
aroaminggeek has joined #crystal-lang
kp666[m] has joined #crystal-lang
sz0 has joined #crystal-lang
<crystal-gh>
[crystal] ysbaddaden closed pull request #5336: Parser: fix the condition to decide var or call (master...fix/crystal/var-or-call-rule) https://git.io/vbqYe
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
<FromGitter>
<Qwerp-Derp> oprypin: I'm not sure what's happening, but whenever I do `finalize` on a custom `SF::Transformable` class, I get a segfault
<FromGitter>
<Qwerp-Derp> The generated code in `graphics/obj.cr` for `initialize` and `finalize` is different to the ones in `sources.cr`, I'm not sure if that's the problem or not
claudiuinberlin has joined #crystal-lang
snsei has joined #crystal-lang
flaviodesousa has joined #crystal-lang
Papierkorb_ has joined #crystal-lang
<FromGitter>
<bararchy> not sure why, but 60% of all new shards in the last week is "advent of code 2017 in Crystal" XD
<RX14>
faustinoaq, haha me too
<RX14>
thought i'd get into the christmas spirit
alex`` has quit [Ping timeout: 255 seconds]
alex`` has joined #crystal-lang
<FromGitter>
<yxhuvud> The heck. Now I get a linker error on building with --release (and --no-debug). That is a new one. I wonder what has changed since I last looked at this code.
<RX14>
interesting, what's the error?
<FromGitter>
<yxhuvud> a few pages of errors like `/opt/crystal/src/raise.cr:186: undefined reference to `*UInt64@Number:0️⃣UInt64'`, ie internal crystal symbols are not found.
<FromGitter>
<yxhuvud> I'm still on 0.23.1 and not head.
<FromGitter>
<yxhuvud> and now it went away. weeeird.
<FromGitter>
<bararchy> @yxhuvud What LLVM version ?
<FromGitter>
<yxhuvud> I have 3.8 and 4.0 installed. How do I know which is actually used?
<RX14>
crystal -v
<FromGitter>
<yxhuvud> 1) 8.1
<RX14>
8.1?
<RX14>
also you probably just got a corrupted ~/.cache/crystal
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
<FromGitter>
<yxhuvud> Yeah, that would explain it starting to work after I changed some stuff
<FromGitter>
<yxhuvud> @bararchy so it is more than me that is doing advent of code in crystal :D
rohitpaulk has quit [Ping timeout: 260 seconds]
<RX14>
the solution is to do an atomic move from /tmp to ~/.cache/crystal once we know the result is correct
<RX14>
but currently we don't do that
<RX14>
so if you interrupt crystal while it's writing out files it gets corrupted
snsei has quit [Remote host closed the connection]
<Vexatos>
You can write it as all(x -> !is_perl(x) && better(x, "perl"), languages) just fine >_>
<FromGitter>
<unreadable> well, not really, but having to implement method like multiply, get, add and so on feel less productive than *, +, [] and so on..
<Vexatos>
Java is a very sane language
<Vexatos>
You can't do anything weird in it :P
<FromGitter>
<unreadable> the first thing I noticed about java it was that the c++ STL is much easier than the java.util 😄
<FromGitter>
<unreadable> I used to be a fan of codeacademy
<jokke>
yeah it's nice
<FromGitter>
<unreadable> but it's pretty limited
<jokke>
in what way?
vivus has left #crystal-lang ["Leaving"]
<FromGitter>
<unreadable> well, it's just the basic of the basic
<oprypin>
and bad at even that
<FromGitter>
<aroaminggeek> "Crystal: It's not Perl" Corollary: "Perl: at least it's not that abomination they call Perl6"
<FromGitter>
<aroaminggeek> Codecademy is good for getting feet wet in a language. Outside of that online tutorials and by example more useful, IMO
<RX14>
never found it useful for anything
<RX14>
it's 5 minutes of googling the most popular open source project in the language and then staring at a page of code to get a feel for it
<RX14>
sure you can't get started with your first programming language by doing that
<RX14>
but once you know like 2 you can read most programming languages
<RX14>
with a bit of guesswork
<oprypin>
the 5 minutes thing you mentioned is how they set up the course xD
<RX14>
lol
claudiuinberlin has joined #crystal-lang
<FromGitter>
<felipetesc> hello there. I was wondering if anyone of u tried to compile crystal without crystal ... I want to build for windows and the first line of the documentation says: "Install the latest Crystal release. To compile Crystal, you need Crystal :)." Ideas ? (I'm currently using 'On Bash on Ubuntu on Windows') ty
<RX14>
just follow the instructions in the documentation
<RX14>
you don't need to compile crystal
<RX14>
you just need to download the prebuilt package
<FromGitter>
<unreadable> shouldn't LibC take care of the windows part?
<FromGitter>
<unreadable> I mean, for example `std::cout` should do the same job on all the platform
<Papierkorb>
the LibC is platform specific. Some things will just work, other won't
<Papierkorb>
and std::cout is already quite a beefy abstraction layer
<Papierkorb>
Which is what IO is to crystal users
<FromGitter>
<unreadable> Ikr, but each platform should have their LibC version, shouldn't? Or it
<FromGitter>
<unreadable> it's a single lib with macro wrappers?
<Papierkorb>
Sure that's already how it is
<RX14>
std::coult is C++
<RX14>
we can't bind to that
<Papierkorb>
And most platforms we support yet (...all?) are POSIX compliant
<RX14>
the C99 stdlib is really quite tiny
<Papierkorb>
So all of them will be kinda like one another
<RX14>
and windows doesn't conform to posix
<RX14>
it's not easy in the slightest
<Papierkorb>
Windows is neither POSIX nor UNIX, so it'll be drastically different
<Papierkorb>
unreadable, libc isn't just "macro wrappers". It'
<Papierkorb>
It consists of bindings (and enums/structs needed for that)
<Papierkorb>
It's a low-level, platform specific API. The end-user will be able to use File.open("..") et al just like normal. That can't apply to the platform API though.
<FromGitter>
<unreadable> Papier, When I said macro wrappers I was reffering more to this
<Papierkorb>
It doesn't save you from windows not being posix either
<Papierkorb>
And the pendant to #ifdefs in Crystal were by choice not used for libc
<FromGitter>
<unreadable> you got me wrong
<FromGitter>
<unreadable> I know that's c specific, but that was referring to something else
<FromGitter>
<unreadable> but now that I got you on, may you help me with some sfml stuffs?
<Papierkorb>
ask oprypin
<FromGitter>
<unreadable> ah yeah, he's the right person
csk157 has quit [Ping timeout: 248 seconds]
csk157 has joined #crystal-lang
<FromGitter>
<akashdeep-singh> Hey everyone, I've been interested in crystal for a major re-write of a production application for a few weeks. I'd like to know if there's still active work being done on the language. I see that there hasn't been a release in over a year. Could anyone care to share insights? ⏎ Thanks!
<FromGitter>
<drosehn> Well, there were some releases earlier this year, but the official 0.24.<x> release has been pending for a few months now. There's definitely work being done on the "HEAD" branch, but there hasn't been an official release.
<oprypin>
akashdeep-singh, what do you mean no release in over a year. what about Jul 13
snsei has quit [Remote host closed the connection]
<FromGitter>
<drosehn> I'm willing to say that I use crystal for some of my own applications which are in production usage, but I'm reluctant to recommend it for other people. It depends on what your application does. I'm not going to promise anyone that crystal can be used for any and every application they want to write. But for the applications where it can be used, it's a very nice language to use.
<FromGitter>
<drosehn> You should first attempt a few smaller programs in crystal, so you can get a sense of how well it works for the kind of work you're doing.
<aroaminggeek>
^^ very much this. On the other side of the token, crystal is used in several production environments...
<FromGitter>
<unreadable> wth, lost some time debugging some java code to find out that `==` doesn't actually compare values, but refferences.. gg
<FromGitter>
<unreadable> (ノಠ益ಠ)ノ彡┻━┻
merv has joined #crystal-lang
merv has quit [Client Quit]
<FromGitter>
<akashdeep-singh> @FromIRC
<FromGitter>
<akashdeep-singh> My bad. I didn't check the repo. The website makes it seem as if 0.20.0 was the last release.
<FromGitter>
<akashdeep-singh> But I see that there's been 0.23.1 and 0.24.0 after that. This is encouraging. Thanks
<Papierkorb>
unreadable, you should consider reading a book on java. There's plenty high-quality information available on Java for free (and legal at that) on the web
alex`` has quit [Ping timeout: 248 seconds]
<FromGitter>
<unreadable> yep, I will. But now I'm porting some c++ stuffs to java to see if it's better to use java or stick to c++
<oprypin>
are u serious
csk157 has quit [Ping timeout: 260 seconds]
<Vexatos>
Java is a great language
<Vexatos>
But it is very... verbose
<FromGitter>
<unreadable> well, better is not suitable word here
<FromGitter>
<unreadable> more productive fits better
<FromGitter>
<unreadable> c++ stl still leaks some java.util features
<RX14>
java is a great language for getting things done
<RX14>
as long as you're not a java developer
<RX14>
if you use crystal you probably know how to write java properly
<FromGitter>
<unreadable> Crystal is piece of cake comparing to java
<Vexatos>
Java is an extremely easy language to learn since it's very explicit
<RX14>
what? @unreadable
<Vexatos>
Makes programs very large in size, but also easy to read
<Vexatos>
There's a reason it's the most used language worldwide
<FromGitter>
<unreadable> It's much easier use/learn than java
<FromGitter>
<unreadable> I still hate java for it's jvm,
<FromGitter>
<unreadable> they could have done a native compiler, but they didnt
<RX14>
how is crystal easier to learn than java?
<RX14>
that doesn't make sense
<RX14>
we have almost an order of magnitude more syntax and semantics to go with it
<RX14>
we have a type system which is insanely more complex than java's
<RX14>
i just do not agree
<Vexatos>
and the entire point of Java is the JVM :I
<RX14>
also this ^
<Vexatos>
The native version of Java is called C#
<RX14>
native compilation is overrated
<FromGitter>
<unreadable> I don't find java hard eithetr, but things like `==` are not the same for all languages
<Vexatos>
The JVM uses 60MB of memory, sure
<Vexatos>
But that's it
<Vexatos>
the performance overhead is basically nonexistant
<RX14>
if you write java code like crystal code you'll probably get the same memory usage
<FromGitter>
<unreadable> Isn't c# vm based? But support for linux/mac os x for c# lacks a lot
<RX14>
the problem is that "traditional" java code creates lots and lots of objects
<RX14>
@unreadable no it compiles the entire thing in the time it takes to launch the executable
<RX14>
Papierkorb, thats what I said about java's a great language unless you're a java developer
<FromGitter>
<unreadable> Oo, c# compiles directly to machine code?? That's great af man.
<FromGitter>
<unreadable> nvm
<RX14>
no it compiles on the system
<RX14>
you distribute IL
<RX14>
and you need the """jit"""
<Papierkorb>
it can compile natively as speedup
<RX14>
but in reality its just a really shitty compiler built to run in milliseconds
<Vexatos>
Papierkorb, that is people, not Java
<Vexatos>
Not Java's fault that factories exist
<RX14>
exactly my point
<Papierkorb>
Vexatos: A language as a whole is also comprised of its community
<RX14>
if you're strong enough to avidly say no to how java is traditionally writen java's a fantastic language
<oprypin>
what do you mean it's not language's fault
<Papierkorb>
And in fact it is Javas fault, as it can't express it otherwise easily
<oprypin>
that
<Vexatos>
The factoies are java 5 legacy noone bothers to update
<Vexatos>
factories+
<oprypin>
they are still viewed as best practice
<oprypin>
wait nvm i was thinking about builder pattern
<Vexatos>
Depends on who you ask
<RX14>
exactly
<Papierkorb>
Java simply never impressed me. The JVM is interesting. Java is not
<Vexatos>
Nowadays, with lambda functions etc
<Vexatos>
factories are mostly obsolete
<RX14>
java's a terrible language with absolutely amazing tooling
<Vexatos>
Java is really performant and runs on literally every toaster
<RX14>
and it's by far with it just for that
<RX14>
my yubikey neo has a JVM inside
<Papierkorb>
Vexatos: It's really fast, but there's a reason no AAA games are written in it
<Vexatos>
It is great at creating and destroying billions of objects in a short time span
<RX14>
and it's literally more toaster than a toaster
<Papierkorb>
Because it's really fast, but not super fast
<Vexatos>
so you can do really heavy processing with it
<oprypin>
Papierkorb, eh it's really just the GC
<RX14>
Papierkorb, literally minecraft is pretty tripple A at this point
<Vexatos>
Papierkorb, no it's not optimized C or julia fast
<Papierkorb>
RX14: MS rewrote Minecraft in C++
<Vexatos>
but it is very fast for very little effort
<RX14>
and it sucks
<Papierkorb>
Sure, it's by MS, what do you expect
<RX14>
no it sucks because it's in C++
<Vexatos>
Minecraft is a really bad example >-<
<RX14>
mods are the reason why minecraft has lasted so long
<Papierkorb>
Yes, but what does MS care
<FromGitter>
<unreadable> fuk that game man, it was developed when mojang was less than 10
<RX14>
and mods are I would say a heavilly contributing factor to minecraft's success
<Vexatos>
People say "ermahgurd MC in C++ is so much faster" yes it is but not because it's in C++ but because it was rewritten from scratch god dammit
<Papierkorb>
Embrace Extend Extinguish
<FromGitter>
<unreadable> He didn't think about performance when he made it
<Vexatos>
Minecraft gave java a terrible reputation
<Vexatos>
because MC is so badly coded it runs slowly and all
<FromGitter>
<unreadable> minecraft in webgl, /s
<RX14>
and web applets
<Vexatos>
and now many people think java is slow
<Papierkorb>
Not only now
<RX14>
because the game was written in java it is infinitely customizable in practice
<RX14>
thats impossible in C++
<oprypin>
really
<Papierkorb>
Well stuff like SA:MP proves otherwise
<RX14>
ok, impractcical
<Papierkorb>
which is insane, and it actually works
<RX14>
people would mod the MC C++ version if they could
<RX14>
they can't
<oprypin>
they actually just don't care
<RX14>
really?
<RX14>
i'm sure Vexatos would know about that
<Papierkorb>
Hard to tell if most actually use mods
<FromGitter>
<unreadable> oprypin, we need to talk, after this discussion
<oprypin>
im going to bed tho
<FromGitter>
<unreadable> tomorrow
<FromGitter>
<unreadable> posted on the forum as well
<oprypin>
there's a forum now?
<FromGitter>
<unreadable> sfml forum *
<RX14>
Papierkorb, but the youtube channels sure do and they have vastly more reach than people playing minecraft itself
<oprypin>
RX14, all the mod infrastructure is in the real minecraft and the C++ is nowhere near feature parity
<Papierkorb>
RX14: They do, but many of them just tried to do so to say "look I'm totally not a Minecraft lets player!111"
<Papierkorb>
Because like every second youtuber was one at some point
<RX14>
yeah but knowing the community, if it's practical it'll get done
<Vexatos>
Yea it's not really
<Vexatos>
You'd have to look at compiled machine code
<Vexatos>
which is trash
<RX14>
Vexatos being an actual minecraft modder would know
<Vexatos>
compared to JVM bytecode and class files which can be neatly decompiled nowadays
<RX14>
the java decompilation tools are fantastic
<Papierkorb>
If there's interest, it will be done
<Vexatos>
Papierkorb, it would have been done already
<oprypin>
if java minecraft wasn't by far better
<Vexatos>
MCPE has more downloads than the java version ever had
<RX14>
Papierkorb, the ability to just take minecraft, decompile it, and remap it so easily and then maintain those mappings over multiple MC versions
<Papierkorb>
Vexatos: If I was still playing MC, I wouldn't. Not because it's impossible, but Windows only? No thanks
<RX14>
so you don't have to recompile from scratch every version
<RX14>
it's simply the tooling is not there in any shape or form
<Vexatos>
There are also other things
<RX14>
do you really know that much about how minecraft modding works Papierkorb?
<Vexatos>
like, I have a custom classloader loading a certain jar file from a certain directory with a specific environment to make it work inside Minecraft to have proper text to speech in there
<Vexatos>
glhf doing that in C++
<Vexatos>
In less than a trillion lines of code
<Papierkorb>
RX14: Never wrote mods. Sure it's far easier to mod a JVM jar than a machine binary. Not impossible though
<Vexatos>
The "far easier" makes it viable
<RX14>
it's not just far easier, it's easy enough to be practical
<RX14>
and that's my point
<FromGitter>
<unreadable> wait what, you don't even know how easy c++ could be with STL
<RX14>
it was practical enough for the tooling to be there
<Papierkorb>
MC is a quite special case though
<RX14>
minecraft modding itself has fantastic fantastic tooling
<Vexatos>
I can literally create a directory, paste two files, run gradle, and have a dev env set up, two more minutes and I have a mod
<RX14>
literally this
<Vexatos>
I wrote a brand new mod in two hours about a week ago. It's really REALLY painless nowadays
<Papierkorb>
Modding games wasn't invented by MC, and there's plenty done for tons of games. All it takes is one or two people giving documented, easy access to do it
<Vexatos>
yes but no modding scene has nearly the number of people involved
<Papierkorb>
Again, MC is special. It also attracted so many cause it's "lego for nerds"
<Papierkorb>
Guess who attracts that? Coders? Surprise!
<RX14>
it's both
<RX14>
it's a great game and it's because of the mods
<RX14>
i'm not saying MC would have died if it was C++
<RX14>
i'm saying that it wouldn't still be going today
<RX14>
it would have run out of steam
<Papierkorb>
We'll never know if MC would have, or not have, so many mods if it was written in a native-compiled language
<RX14>
there are so many features in minecraft vanilla which were originally mods
<Vexatos>
We can make pretty good assumptions though
<RX14>
like idk
<RX14>
pistons
<RX14>
all of redstone I think
<Papierkorb>
It did help quite a lot that it ran not only on windows, but lin too
<Vexatos>
If I read this correctly there are around 10000 mods on one mod distribution site alone
<Vexatos>
<-- runs linux right now
<Papierkorb>
As does almost everyone here
<Papierkorb>
I wouldn't have played MC at all if it wasn't on Linux.
<Papierkorb>
And what do many programmers use? Not windows