Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Web request in lua

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
lolAnonymous
Expert Cheater
Reputation: 1

Joined: 19 Jul 2015
Posts: 154

PostPosted: Sat Mar 04, 2017 10:48 am    Post subject: Web request in lua Reply with quote

Hey guys,
I wanted to ask you how is Lua in sending web requests
in PHP it's curl... I want to create a desktop application which will send web request to my website C# is too slow in sending web req... I wanted to ask u How is Lua... ???any other suggestions??


Thanks In Advance Smile
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25283
Location: The netherlands

PostPosted: Sat Mar 04, 2017 11:15 am    Post subject: Reply with quote

lua on it's own can't, but luasocket or other extention can add it.


also in ce you can use getInternet to get an object for web requests (get, post)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
lolAnonymous
Expert Cheater
Reputation: 1

Joined: 19 Jul 2015
Posts: 154

PostPosted: Sat Mar 04, 2017 11:22 am    Post subject: Reply with quote

Hey Darkbyte thanks for replying...

I am new to Lua so if u can give an example or give me a link where it is defined..

and actually I wanted to ask Is it fast like php or slow like C# ?

Thanks In Advance Smile
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Sat Mar 04, 2017 4:50 pm    Post subject: Reply with quote

lolAnonymous wrote:
Hey Darkbyte thanks for replying...

I am new to Lua so if u can give an example or give me a link where it is defined..

and actually I wanted to ask Is it fast like php or slow like C# ?

Thanks In Advance Smile


Speed is relative to the implementation and how its coded. luasocket is pretty fast and just wraps underlying C code.

As for php being faster than C#, I think you should look into benchmarking data before making that assumption.

For example:
http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=csharpcore&lang2=php

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
lolAnonymous
Expert Cheater
Reputation: 1

Joined: 19 Jul 2015
Posts: 154

PostPosted: Sun Mar 05, 2017 5:10 am    Post subject: Reply with quote

Hey Atom0s,
Thanks for replying. I didn't mean't C# is slow and php is fast :3 I mean't it's slow in sending web request and php is fast in it (I think because it's a server side language )...

My point is : How is Lua in sending web requests ? with Lua I mean its extension etc... with "How" I mean is it fast?

Thanks In Advance Smile
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25283
Location: The netherlands

PostPosted: Sun Mar 05, 2017 5:32 am    Post subject: Reply with quote

the bottleneck is your connection speed, not the code

if c# specifically is slow it's more because of a bad implementation/usage

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Sun Mar 05, 2017 5:24 pm    Post subject: Reply with quote

lolAnonymous wrote:
Hey Atom0s,
Thanks for replying. I didn't mean't C# is slow and php is fast :3 I mean't it's slow in sending web request and php is fast in it (I think because it's a server side language )...

My point is : How is Lua in sending web requests ? with Lua I mean its extension etc... with "How" I mean is it fast?

Thanks In Advance Smile


You are comparing things incorrectly based on how you are wording this.

C# can run on a server just like PHP does and do the exact same things as PHP in various ways, (ASP.NET, WCF, etc.) If you put C# on a server, it will out-perform PHP based on benchmarks already shown. Anyway, that's not really the point of this topic just a side discussion from how you worded things.

The implementation is a matter of who coded it, how well optimized it is, how the language running it handles the given code and your connection speed.

You can read the basics of Luasocket and how its implemented here:
http://w3.impa.br/~diego/software/luasocket/introduction.html

You can review the code here:
https://github.com/diegonehab/luasocket

Luasocket is written in C and is very lightweight wrappers around the 'socket' API. Therefore there is very little overhead inside of the library itself. The only real overhead you will have is from the Lua interpreter going back and forth from the script byte code to the libraries interacting with what you are doing.

Lua's performance is already benchmarked and proven in a ton of cases and is endorsed by major companies such as Blizzard in their triple-A games such as WoW.

The main slowdowns / performance issues you are going to face are in how you code the usage of the socket, your connection speed, and the server handling your requests.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
lolAnonymous
Expert Cheater
Reputation: 1

Joined: 19 Jul 2015
Posts: 154

PostPosted: Sun Mar 05, 2017 11:29 pm    Post subject: Reply with quote

Thanks again for replying atom0s and the for the links Smile

Btw I work in Asp.net too and I will still say that php is much faster than Asp.net ... Php is a very lightweight language and C# is not... I learn't both languages and chose Php for my web application...

In the end, it doesn't matter... Great software and websites are written by great programmers, not the language. You can write equally bad software in PHP or asp.net. Or equally good software...


Thanks Again Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites