It's a long way

New to FreeBASIC? Post your questions here.
cbruce
Posts: 163
Joined: Sep 12, 2007 19:13
Location: Dallas, Texas

Re: It's a long way

Post by cbruce »

.
BasicCoder2, how do we get a message to someone real at Google...

"Hey Google! How about a translator for source code whose variable names, labels, and comments are written in a different language from our native language... (people languages)? You folks must already have an internal tool for this. Come on!... give it up!"

I'm with you totally on the naming (and comments - if any). PLUS... even in English... having 600 variable instances named a,i,p,x,z does me *absolutely* no good at all.
.
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: It's a long way

Post by jj2007 »

St_W wrote:old code often happens to be written with non-english names/labels/comments/etc. making it very hard to read for an international audience.
You would be surprised how many people are not writing for an international audience. Personally, I write English names and comments even in code that definitely will never be seen by another person; it's a habit, I think in English when coding. But I respect people who prefer their native language.
cbruce wrote:even in English... having 600 variable instances named a,i,p,x,z does me *absolutely* no good at all.
Yes, a real nuisance if you need to search for them, or do a find & replace.
Lost Zergling
Posts: 534
Joined: Dec 02, 2011 22:51
Location: France

Re: It's a long way

Post by Lost Zergling »

Found on a french site :
https://www.scriptol.fr/programmation/o ... s-noms.php
https://www.scriptol.fr/programmation/citations.php
https://www.scriptol.fr/programmation/h ... ngages.php
https://www.scriptol.fr/programmation/e ... ateurs.php
https://www.scriptol.fr/programmation/julia.php

Would be nice in FB ? (Ideas, wishes)..
Iterator "in" (or forall myvar in [array]) supporting FB data types ? (if faster than clues access)
Instruction set wich would be dedicated to dynamic compiling ? (pseudo Homoiconicité)
Lost Zergling
Posts: 534
Joined: Dec 02, 2011 22:51
Location: France

Re: It's a long way

Post by Lost Zergling »

I'm looking for some working exemples of network programming with FB.
Can / or how could (wrapper?) libuv (c lib) be used with fb under Linux ? Wich API would be best under Windows ?
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: It's a long way

Post by St_W »

Lost Zergling wrote:I'm looking for some working exemples of network programming with FB.
Can / or how could (wrapper?) libuv (c lib) be used with fb under Linux ? Wich API would be best under Windows ?
Basically any C library can be used with FB. Have a look into the manual for binding creation:
https://freebasic.net/wiki/wikka.php?wa ... ngCreation

If you want to use libuv under Linux it would be the easiest to use that library under Windows too, except you want to write your own abstraction layer :-P
Lost Zergling
Posts: 534
Joined: Dec 02, 2011 22:51
Location: France

Re: It's a long way

Post by Lost Zergling »

Not an abstraction layer. Was wondering if this library could work under Windows, if it is worth. I'm not c programmer, so trying to make a clean binding might be out of my scope and / or require huge time investment. Missing feature : a framework (see marcov post here https://freebasic.net/forum/viewtopic.p ... 53#p253153). Considered solution : a jump seat to an existing framework : parametric toolchain engine with proper network library and an existing abstraction layer (lzle) to drive/store parameters and so on. Problem : long (or very) term project especially because of binding. No test environment, no concrete project. Unreachable ? So far, project state is first idea I wish to submit to the community.
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: It's a long way

Post by St_W »

Maybe you should just have a look at the existing networking libraries for FreeBasic. There are quite some of them, just have a look on this forums. And there are even examples distributed with the compiler.

libuv works on Windows, see https://github.com/libuv/libuv/blob/v1. ... ATFORMS.md
I agree that creating a binding takes some time and general knowledge about C is beneficial. Still, I think it's doable.

btw I don't think that lzle will be used by a lot developers, mainly due to its weird and restrictive licensing (try to use existing licenses) and its unreadable code. So creating a framework around it doesn't make much sense IMHO.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: It's a long way

Post by D.J.Peters »

imple [N]etwork [C]onnection used asynchronous TCP sockets
it's only a include file and works with Linux / Windows 32/64-bit.

viewtopic.php?f=7&t=23421

Joshy
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: It's a long way

Post by TJF »

Lost Zergling wrote:I'm looking for some working exemples of network programming with FB.
Already found nettobac?
Lost Zergling
Posts: 534
Joined: Dec 02, 2011 22:51
Location: France

Re: It's a long way

Post by Lost Zergling »

Thank you to all three of you for helpful information. I'm not sure I can start such a project, but it gives me very serious leads. In any case, it may take time. On code lzle: there is no desire on my part to camouflage the content, the style is unclear, however, I try to improve the readability by some comments. It is necessary to have the implementation in mind to be able to understand it (including for non visible nodes) and the implementation of these is indeed not yet documented. On the license: the code is close enough to the c, and it would annoy me somewhat to see me compete with my own code: if I pass the license Cecill-C standard (or possibly in lgpl family), maybe I can go directly to c. I like the c that could have been my favorite language, but it's still very annoying. This license still allows, it seems to me, a use with a syntax in c without any restriction: it suffices to include in one way or another the code thus translated in FreeBasic itself or as an extension in c binding in which case it compiles itself well in Basic, by definition. So, it's transparent. So yes, it's a weird license, a license "fight" if you want, but study carefully free licenses like those of Node.JS for example: there are quite loaded mentions to include in the binaries. Another important difference concerns the mastery of evolutions: behind it there is a single person and not an organization. In my mind, this license is tantamount to giving up my copyright but in the FreeBasic perimeter only. I do not plan to create another competing language. To reassure me about the risk of competition by the level below and the uplevel declining declensions, maybe I could add an exclusivity clause, but for whose benefit? FB langage ? What I do not want is this lib could benefit same condition to another langage than FB. Tell me. (addendum : condition on the platform is just to prevent it to benefit to a proprietary licence (*) under the hood like a box wich seems me correct). (* ie with a closed system)(perhaps I'm wrong on this point in regard of FB spirit, other hand I had to code it)
Lost Zergling
Posts: 534
Joined: Dec 02, 2011 22:51
Location: France

Re: It's a long way OrAlso ?

Post by Lost Zergling »

@St_W : "Plattform (or virtual) using the software is open & compliant with FreeBasic" => Clause canceled.
No restriction of use when it is used with fbc. Compiled program might be fbc GPLV2 compliant (I'm not expert enough to say if it is yes or not).
@St_W : Instruction OrAlso added in licence terms (https://freebasic.net/forum/viewforum.php?f=1 OrAlso http://users.freebasic-portal.de/stw/builds/)
addendum (sorry) : people having originally some juridic skills (like I do) sometimes having twisted spirit, so I'll make a translation :
1° Licence is NOT a Ceccil-C - Must be compiled using the langage it has been designed for - Use Ceccil-C clauses
OR (at your choice)
2° Can be easily translated into c langage (if or any) : Licence is Freeware => meaning very limited liability
Translation :
Licence is or should be CeCCIL-C, freeware is an additional juridic protection against an extensive interpretation.
Post Reply