<FromGitter>
<mardab> Just looking for a way to have rapid prototyping w/o the high-level burden of Java/Ruby/C#, is Crystal the solution to that?
<FromGitter>
<johnjansen> it does pretty well once you have your head in it
<FromGitter>
<johnjansen> very good IMO for microservices etc
<FromGitter>
<mardab> I won a book about microservices
<FromGitter>
<johnjansen> what kind of architecture are you prototyping
<FromGitter>
<johnjansen> won?
<FromGitter>
<mardab> On a AWS-sponsored presentation
<FromGitter>
<johnjansen> oh ok
<FromGitter>
<johnjansen> well anyway … what is your specific need
<FromGitter>
<mardab> Quickly implementing new features to a modular non-server project
<FromGitter>
<johnjansen> non-server?
<FromGitter>
<johnjansen> do you mean a desktop app
<FromGitter>
<johnjansen> or a cli app
<FromGitter>
<mardab> Whenever there is a hint on anything server-side i get a lot of bs talk about lambdas, containers and node, that is why i downright deny it
<FromGitter>
<mardab> So yes, a desktop app
<FromGitter>
<johnjansen> ok, so what is your intended interface
<FromGitter>
<mardab> GUI via C libraries
<FromGitter>
<johnjansen> ok cool, so in that case the answer is a decided maybe …
<FromGitter>
<johnjansen> from personal experience, the language is lovely and the results are great, but im frequently having to implement my own version of something that hasnt yet made it into the crystal ecosystem …
<FromGitter>
<johnjansen> if you know you have a specific need (PDF generation for example) you could look for that and see what you find
<FromGitter>
<johnjansen> if its all very specific to you, then you may not need alot of external libraries, or you may decide to wrap a C lib
<FromGitter>
<johnjansen> im also not sure of the state of windows support … is thats a requirement it would pay to ask again tomorrow morning
<FromGitter>
<mardab> F Windows, to be honest
<FromGitter>
<mardab> Any kind on dev there is a nightmare
<FromGitter>
<mardab> And after getting literally cornered after making runtime hell, their solution was to just make a linux layer anew
<FromGitter>
<mardab> As if that would solve all the problems
snsei has joined #crystal-lang
aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aroaminggeek has joined #crystal-lang
<faustinoaq>
@johnjansen, I really want to see windows support, Some people in this community have been able to cross compile object files and generate executable files
<FromGitter>
<johnjansen> thanks @faustinoaq i was just offering up something to someone else … the day i have to work on windows i will retire
<faustinoaq>
Ok, 😆 BTW, I did some hello_worlds.exe using virtualbox and visual studio c++ tools
<FromGitter>
<johnjansen> you are a better man than I
<FromGitter>
<MrSorcus> Oh, no. I'm wrong. Package is latest.
claudiuinberlin has joined #crystal-lang
l0ra has quit [Remote host closed the connection]
l0ra has joined #crystal-lang
l0ra has quit [Remote host closed the connection]
snsei has joined #crystal-lang
l0ra has joined #crystal-lang
rohitpaulk has joined #crystal-lang
l0ra has quit [Remote host closed the connection]
l0ra has joined #crystal-lang
l0ra has quit [Ping timeout: 260 seconds]
l0ra has joined #crystal-lang
l0ra has quit [Remote host closed the connection]
snsei has quit [Remote host closed the connection]
l0ra has joined #crystal-lang
l0ra has quit [Remote host closed the connection]
rohitpaulk has quit [Ping timeout: 248 seconds]
l0ra has joined #crystal-lang
l0ra has quit [Remote host closed the connection]
l0ra has joined #crystal-lang
l0ra has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
ome has quit [Quit: Connection closed for inactivity]
<faustinoaq>
Hi, Does somebody know something about common computer specs for mining cryptocoins? I'm thinking on use a Intel Xeon?
<Papierkorb>
lawl
<Papierkorb>
CPUs to mine? Is this 2009?
<Papierkorb>
It's not like information on this is abundant
<Papierkorb>
faustinoaq: First and foremost, the point is not specs, it's whats most profitable. Energy isn't cheap, and you're trading energy for cryptocoins.
<Papierkorb>
Bitcoin mining is already taking a huge toll on the total energy bill of the planet. it's insane.
<faustinoaq>
<@Papierkorb> Yeah, I don't want to become rich, I just want to experiment with it. I tried to buy it but so much scam on Internet.
<Papierkorb>
There are plenty of professional market places to buy.
<Papierkorb>
If you want to play with it technologically, then simply use a local coin testnet
<Papierkorb>
Bitcoin e.g. allows to do that for regression tests
<Papierkorb>
Obviously, you get "local regression testnet coins" out of that, not 'real' BTC.
<faustinoaq>
Oh, Yeah, I read something about that, I even saw some tutorials about creating your own cryptocoin
<Papierkorb>
there are plenty clickbait articles on that, yes
<Papierkorb>
What do you actually want to study?
<Papierkorb>
How they work? How to do market analysis?
<faustinoaq>
How they work, is the developer side, right?
<Papierkorb>
Mining that stuff just to understand them isn't the way to go. You mine them to make a profit.
<faustinoaq>
Oh, I see
<Papierkorb>
You may not realize that especially BTC, but also for many many other crypto coins, they're about real hard money at this point
<Papierkorb>
Sure you can run a CPU miner today for BTC
<Papierkorb>
maybe you mine a block. Statistically speaking, this will take 40'000 years
<Papierkorb>
So even if you wanted to mine to make a profit, if you don't have the specialized hardware, you don't mine BTC anymore. And of course it may not even be profitable at all where you live due to the cost of energy in the first place
<FromGitter>
<extremety1989> the username_exist is 1
<FromGitter>
<extremety1989> why i got the block executed anyway ?
<faustinoaq>
<@Papierkorb> Oh, 40000 years, Well, ethereum and others looks very interesting too, they even have a contract oriented programming language.
<Papierkorb>
Oh yeah and they constantly mess that up
<Papierkorb>
Understanding them is simple, you really just need to invest lots of time of reading up on them. Information is abundant.
<Papierkorb>
The issue is that you shouldn't *publicly* build one yourself. All hard problems of IT come together and have a party.
<FromGitter>
<extremety1989> guys why does block with if username_exist == 0 executes ? if even the varible user_exist is 1 not 0
<Papierkorb>
Distributed networks, hard security on top of that. How do you trust if you can't trust anyone?
<Papierkorb>
faustinoaq: In fact, Ethereum is a fail security-wise. They, or a popular eth oriented products, constantly mess up. And with such a mess-up, hundreds of millions of ETH gets lost or stolen (Making it hundreds-of-million USD)
<faustinoaq>
<@Papierkorb> Very interesting Thank you for your comments! Do you think cryptocoins could replace euro, dollars, etc in the future?, maybe on 2050?
<Papierkorb>
What, technically you mean?
<Papierkorb>
Can they? Sure
<Papierkorb>
Will they as we define them? Nah
<Papierkorb>
Check up on `Ripple`, and what it is
<Papierkorb>
If cryptocoins will be used by governments in the future, systems like that will be it
<Papierkorb>
if you want to replace current currencies, then you'll need to replicate the current benefits a state actor gains out of the current fiat system
hightower2 has joined #crystal-lang
<faustinoaq>
Ok, Thank you for sharing that info! I'm reading about Ripple and looks very interesting
astronav_ has joined #crystal-lang
astronav_ is now known as astronavt_
<oprypin>
faustinoaq, here's my view on bitcoin. buying is extremely high risk, high reward. mining is like playing a lottery. joining a mining group - might as well just buy at that point.
<jhass>
by now the lottery is a better chance than mining unless you throw considerable amounts of money at some ASICs
<jhass>
and electricity
<Papierkorb>
Mining *is* literally a lottery
<Papierkorb>
A calculatable one at that
rohitpaulk has quit [Ping timeout: 260 seconds]
l0ra has joined #crystal-lang
<FromGitter>
<codenoid> morning
ShalokShalom has joined #crystal-lang
astronavt_ is now known as astronavt
l0ra has quit [Remote host closed the connection]
alex`` has quit [Quit: WeeChat 1.9.1]
l0ra has joined #crystal-lang
astronavt has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
snsei has joined #crystal-lang
l0ra has quit [Remote host closed the connection]
astronavt has joined #crystal-lang
<FromGitter>
<russolsen_twitter> I have a question about how types and type aliases in particular work. If I define a union type that includes a recursive array, like this: ⏎ ⏎ ``` ⏎ Everything works as I expect``` [https://gitter.im/crystal-lang/crystal?at=5a1ae36affa3e37919c07d26]
<Papierkorb>
man it's annoying how gitter allows for editing and even removing messages
<FromGitter>
<russolsen_twitter> I have a (possibly dumb) question about how types and aliaes ⏎ work. If I have the following code, all is well. ⏎ (Note the recursive use of Thing in the alias) ⏎ ⏎ ```code paste, see link``` ... [https://gitter.im/crystal-lang/crystal?at=5a1ae43fdf09362e67556ab1]
<oprypin>
@russolsen_twitter, `z = (["foo", :bar] of Thing).as(Thing)` should work
<oprypin>
also the annotations you're writing like `x : Thing` are meaningless
<Papierkorb>
Wondering where people pick this up
<FromGitter>
<russolsen_twitter> @oprypin Thanks the "of Thing/as Thing" thing did the trick.
<oprypin>
Papierkorb, ikr
<oprypin>
haskell has something like this
<FromGitter>
<russolsen_twitter> But I don't think x : Thing is meaningless in the sense that it has no effect.
<oprypin>
i think it's just an automatic type assertion
<Papierkorb>
it is meaningless in the sense that even for the reader, it has no value
<oprypin>
what I mean is that if your source code contains `x : Thing` and it works, it will also definitely work without it
<Papierkorb>
If it's not plain obvious what type(s) your variable has it's an issue with your code
<FromGitter>
<russolsen_twitter> I'm not sure I would write that sort of thing in real code, but it is helpful when you are trying to work out how types and declarations work.
<Papierkorb>
if it's non-obvious what you want, that's the issue
<FromGitter>
<russolsen_twitter> Sure.
<Papierkorb>
writing stuff like `string : String` holds no value
<Papierkorb>
Neither does `first_name : String` if it was a string in all other places already
<Papierkorb>
Type restrictions (!) in Crystal are for guidance first, and for code correctness second. This is in contrast to e.g. C++.
<Papierkorb>
Sure for security-related code, typing everything makes sense. Outside of that, public APIs should be typed as far as possible (Though please prefer using a good-enough restriction strategy, like Enumerable(String) instead of Array(String) if you just want it to be #each-able)
<Papierkorb>
Type method arguments in Public APIs (or prefer it there over untyped), method results can also be typed. Private APIs usually don't benefit from it as much.
<Papierkorb>
Do that and that case simply never happens in real world code
<FromGitter>
<russolsen_twitter> Yes I agree. But my interest at the moment is how the type system works, in which case these kind of annotations are helpful.
sailorswift has joined #crystal-lang
sailorswift has quit [Remote host closed the connection]
vivus has joined #crystal-lang
l0ra has joined #crystal-lang
alex`` has joined #crystal-lang
backpack has joined #crystal-lang
derek-away has quit [Quit: ZNC 1.6.5+deb1~bpo8+1 - http://znc.in]
rohitpaulk has quit [Ping timeout: 248 seconds]
daemonwrangler has joined #crystal-lang
astronavt has quit [Remote host closed the connection]
daemonwrangler has quit [Client Quit]
daemonwrangler has joined #crystal-lang
l0ra has quit [Remote host closed the connection]
l0ra has joined #crystal-lang
l0ra has quit [Remote host closed the connection]
daemonwrangler has quit [Ping timeout: 248 seconds]
daemonwrangler has joined #crystal-lang
sz0 has joined #crystal-lang
daemonwrangler has quit [Ping timeout: 248 seconds]
daemonwrangler has joined #crystal-lang
l0ra has joined #crystal-lang
<FromGitter>
<bew> Is there an easy way to extract 41 & 2 integers from the string `"41.2"` without using regex?
<FromGitter>
<bew> and without un-necessary heap alloc like with #split
faustinoaq has quit [Quit: IRC client terminated!]
<oprypin>
MrSorcus, who the hell knows what mysteries lie in javascript
<oprypin>
if you provide a crystal-only example maybe someone can see then
<oprypin>
also kemal would drastically reduce the boilerplate
astronavt has joined #crystal-lang
<FromGitter>
<unreadable> guys I think I've redescovered the joy of working with c++ again, currently deveoping a GUI library with shaders and stuff and I find it really easy to write simple and nice API with c++
<FromGitter>
<unreadable> developers make the language looks ugly not the language itself
<FromGitter>
<extremety1989> it is just beacause crystal is beautiful
<FromGitter>
<extremety1989> c++ is to much boiler plate =(
<FromGitter>
<unreadable> I'm waiting for crystal to get stable before really digging into it
<FromGitter>
<extremety1989> @unreadable crystal is not stable ?
<oprypin>
well you'll be waiting a long time
<FromGitter>
<extremety1989> @FromIRC why that ?
<FromGitter>
<extremety1989> there are some companies using crystal in production