Language:
switch to room list switch to menu My folders
Go to page: First ... 11 12 13 14 [15] 16 17 18 19 ... Last
[#] Tue Mar 10 2015 08:31:56 EDT from dothebart @ Uncensored

Subject: Re: (no subject)

[Reply] [ReplyQuoted] [Headers] [Print]

hm, whew. that were a bunch of realy broken sentences.

However, probably many will have similar problems; thank god our unittests turned them up once they were working reliably.



[#] Thu Mar 12 2015 18:29:21 EDT from TaMeR @ Uncensored to room_Programming@uncensored.citadel.org

Subject: Does this guy have a point?

[Reply] [ReplyQuoted] [Headers] [Print]

I am a hobby programmer and would like some professional opinion.
I been programming in Go (golang) lately.
And came across following article and was wondering if the guy has a point.

http://dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/

I been considering switching to Julia language for a while, but have
been to lazy.
Kinda looking for a reason I guess.

[#] Fri Mar 13 2015 06:23:08 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Professionally?

I avoid languages that aren't commonly used. Not because I'm an elitist (I love playing with other languages), but because anything I write that needs to be maintained in a language that isn't especially well known requires either finding someone who knows that language (pin in a haystack), or training someone to learn that language (which isn't necessarily hard, but that is time wasted that could have been spent on writing code).

I don't think either go or Julia are particularly well known languages, even though I know go has been around for years, and I expect Julia is, too.

Scholastically?

I can't really render a proper opinion, as I haven't investigated both languages well. I remember looking at Go, and thinking it seemed pretty neat. I probably wouldn't use the assembler within it, preferring instead to use its more smalltalk-like nature to do stuff... but mostly, I found it interesting as it looked like it should be easy to embed it into other programs. That seemed attractive to me, as a sort of pseudo-smalltalk-within-another-program kind of thing.

[#] Fri Mar 13 2015 08:10:17 EDT from dothebart @ Uncensored

Subject: Re: Does this guy have a point?

[Reply] [ReplyQuoted] [Headers] [Print]

He's most probably right on the NIH-syndrome.

I don't think its neccessary to develop ones own assembler nowadays - with all the problems arising as the author points out.

ArangoDB uses the go-implemented etcd as cluster registry; it always caries these weird dependencies which makes the result seem like an alien on those sytem.

I personaly prefer solid c or c++ implemented stuff. whatever scripting language you want to use - java/javascript/python/perl whatever, you'll find language bindings or can create your own using swig.



[#] Fri Mar 13 2015 21:16:30 EDT from TaMeR @ Uncensored to room_Programming@uncensored.citadel.org

Subject: Re: Does this guy have a point?

[Reply] [ReplyQuoted] [Headers] [Print]

As a hobby programmer my main object is is that programming needs to be fun.
I tried C many, many years ago and it wasn't fun !
I don't know anything about C++
I like Haskell. I tried learning it 3 times but it is over my head.
Since I do mostly websites, I usually program my frond end in
Javascript. But even in javascript I have a different style then most.
Here is a sample:

'use strict'
if(typeof $ != 'object') var $ = {};

$.logger = {};
$.logger.original = console.log;
$.logger.On = function(){
window.console.log = $.logger.original;
};
$.logger.Off = function(){
window.console.log = function(){};
};

Go is my backend/server side language, however it bothers me that Go is
tied to Google.

I know PHP but I am really sick of it.
I have tried Ruby, it's simple enough but too stiff.

So my next upper runner is Julia. But Julia is still very new, and not
really designed for my purposes. Although there are some guys extending
Julia and even WebSocket is available.

I have tried Python, and that is really what I should use.
It is plenty fast.
It's flexible, which I like.
It doesn't compile :(

Need to make a decision.

[#] Sat Mar 14 2015 10:32:25 EDT from dothebart @ Uncensored

Subject: Re: Does this guy have a point?

[Reply] [ReplyQuoted] [Headers] [Print]

 

Fri Mar 13 2015 21:16:30 EDTfrom TaMeR @ Uncensored Subject: Re: Does this guy have a point?
As a hobby programmer my main object is is that programming needs to be fun.
I tried C many, many years ago and it wasn't fun !
 
Try c with templating engines - we have that in webcit, its nice!
Valgrind makes c-hacking a breeze ;-) nice libraries also ease stuff a lot.
I think webcit enables you to easily write clean, maintainable and slink code.
give it a try ;-)

I don't know anything about C++
I like Haskell. I tried learning it 3 times but it is over my head.
Since I do mostly websites, I usually program my frond end in
Javascript. But even in javascript I have a different style then most.
Here is a sample:

'use strict'
if(typeof $ != 'object') var $ = {};

$.logger = {};
$.logger.original = console.log;
$.logger.On = function(){
window.console.log = $.logger.original;
};
$.logger.Off = function(){
window.console.log = function(){};
};
 
Js, one of the languages here to stay... going to become nicer with ES6, and maybe we're going to plug it into citserver. Tried io.js or node so far?

Go is my backend/server side language, however it bothers me that Go is
tied to Google.

I know PHP but I am really sick of it.
I have tried Ruby, it's simple enough but too stiff.

So my next upper runner is Julia. But Julia is still very new, and not
really designed for my purposes. Although there are some guys extending
Julia and even WebSocket is available.

I have tried Python, and that is really what I should use.
It is plenty fast.
It's flexible, which I like.
It doesn't compile :(
 
you know cython?


Need to make a decision.

 



[#] Sat Mar 14 2015 15:45:29 EDT from TaMeR @ Uncensored to room_Programming@uncensored.citadel.org

Subject: Re: Does this guy have a point?

[Reply] [ReplyQuoted] [Headers] [Print]

On 03/14/2015 04:32 PM, dothebart wrote:

Try c with templating engines - we have that in webcit, its nice!
Which templating engines do you use?
Webcit nice?

I think webcit enables you to easily write clean, maintainable and slink
code.
Are you talking about citadel webcit?

[#] Sun Mar 15 2015 08:47:20 EDT from dothebart @ Uncensored

Subject: Re: Does this guy have a point?

[Reply] [ReplyQuoted] [Headers] [Print]

 

Sat Mar 14 2015 15:45:29 EDT from TaMeR @ Uncensored Subject: Re: Does this guy have a point?
On 03/14/2015 04:32 PM, dothebart wrote:

Try c with templating engines - we have that in webcit, its nice!
Which templating engines do you use?
Webcit nice?

I think webcit enables you to easily write clean, maintainable and slink
code.
Are you talking about citadel webcit?

Yes, citadel webcit.

It lives inside subst.c, simple client code can be found i.e. in who.c + static/t/who.html plus static/t/who/*



[#] Sun Mar 15 2015 20:36:06 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


I find C++ to be a rather fun language with which to program... but I'm probably a sick puppy. Well, also, I've been using it long enough, I suppose, that it feels more natural to me than it does for some folks. I do things with it that sorta make it look easy to use, perhaps.

I sorta feel like C leaves you exposed to a lot of security problems unless you're extremely meticulous with it. I get that some folks want to have a good idea what the underlying assembly will look like, so they might prefer c to c++, but that's never seemed so important to me, for the sort of work I've done.

Using an abstract data type with C probably helps... where you sort of work with C as it it had classes. I think the gtk+ toolkit shows a decent example of that.

JavaScript looks rather fun, what I've done with it in browsers. It has that feel like a fast-and-loose C/C++ that you can get away with some crazy stuff. I suppose that's one of the advantages of a scripting language.

Python felt kind of natural to me, although I don't think I ever quite wrapped my mind around some oddnesses related to how it imports libraries you may have made with it (and interdependencies with other libraries). I recall having some problems with that, although now that I'm more experienced, it might not be as much trouble for me.

But then, I guess I like to think about software in terms of manipulating objects rather than writing functions.

[#] Mon Mar 16 2015 05:49:49 EDT from TaMeR @ Uncensored to room_Programming@uncensored.citadel.org

Subject: Re: (no subject)

[Reply] [ReplyQuoted] [Headers] [Print]

On 03/16/2015 02:36 AM, fleeb wrote:

But then, I guess I like to think about software in terms of manipulating
objects rather than writing functions.



Well how do you manipulate objects? With functions right?
Even if you call them methods or what ever, they are still functions.

Why not think of the DOM as your objects?

Although most people program Javascript functional. Javascript isn't
really function based, everything even functions are objects.

Javascript is probably the post flexible programming language.
If you stop looking at the main stream, you can adapt a style that fits you.
At first glance my code doesn't even look like Javascript.

Example, following code imports script and css files.

'use strict'
if(typeof $ != 'object') var $ = {};

$.src = {};
$.src.css = function (name, path){
$.src._path = (path) ? path : '/css/';
$.src._ext = 'css';
$.src.array(name);
}
$.src.js = function (name, path){
$.src._path = (path) ? path : '/js/';
$.src._ext = 'js';
$.src.array(name);
}
$.src.async = function (){
$.src._boolean = 'async';
}
$.src.defer = function (){
$.src._boolean = 'defer';
}
$.src.array = function(name){
if(Object.prototype.toString.call(name) == '[object Array]'){
for (var i = 0, l = name.length; i < l; i++) {
$.src.file(name[i]);
}
}else{
$.src.file(name);
}
$.src._path = undefined;
$.src._ext = undefined;
$.src._boolean = undefined;
}
$.src.domain = function (list){
if($.src._d) return $.src._d;
for (var i = 0, l = list.length; i < l; i++) {
if(window.location.hostname.indexOf(list[i]) > -1) {
$.src._d = list[i];
return $.src._d;
}
}
}
$.src.file = function (name){
var s;
var link = 'http://static.' + $.src.domain() +
$.src._path + name + '.' + $.src._ext;
if($.src._ext == 'js'){
s = document.createElement('script');
s.setAttribute('src', link);
s.setAttribute('type', 'text/javascript');
if($.src._boolean){
s.setAttribute($.src._boolean, $.src._boolean);
}
}else if($.src._ext == 'css'){
s = document.createElement('link');
s.setAttribute('href', link);
s.setAttribute('rel', 'stylesheet');
s.setAttribute('type', 'text/css');
}else{
console.log('import failed');
return;
}
if($.src._boolean == 'defer'){
document.onreadystatechange = function () {
if (document.readyState == "complete") {
document.body.appendChild(s);
}
};
}else{
document.head.appendChild(s);
}
}

[#] Mon Mar 16 2015 15:34:46 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Yeah, of course you have to call functions to do anything. But it's more about how you approach solving a given problem.

Do you look a problem and say something like, "I can call this function, then this one, then this," as a sort of series of instructions towards achieving a goal?

Or do you instead look at the problem and try to figure out the components of the problem... I'm using a network to communicat with an HTTP server that will poot out an XML file that holds information about a person, and I want that person's eye color to be given to this object so it'll know the response to give to this other thing over here. That's usually how I look at a system, at least one of any appreciable size, and I normally model my software along those lines.

There's nothing wrong with either approach. It's ridiculous to think about objects and modeling systems and shit when you just need some down-n-dirty thing done rather quickly and you already know the steps it takes to do it. But if you know you're working with a system that's going to grow to something of appreciable size, maintaining that quick little Python script you tossed together when the boss was breathing down your neck is gonna drive you insane.

[#] Tue Mar 17 2015 13:05:17 EDT from IGnatius T Foobar @ Uncensored

Subject: Re: Does this guy have a point?

[Reply] [ReplyQuoted] [Headers] [Print]


I think webcit enables you to easily write clean, maintainable and slink
code.
Are you talking about citadel webcit?

Yes, citadel webcit.

It lives inside subst.c, simple client code can be found i.e. in who.c + static/t/who.html plus static/t/who/*



I don't know about that ... it seemed like a good idea at the time but the more it evolves, the more hackish it seems.  It works for us but it really does stretch out the time it takes to complete any given task.  If I were starting over today I wouldn't do it that way.



[#] Mon Apr 06 2015 13:32:17 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Just had an interesting philosophical argument related to C/C++ that I thought I'd share.

Is this a simple data type, or complex:

int a[13];

I want to say that an array of primitives is simple, but... I could argue that it isn't simple as well. What do you think?

[#] Mon Apr 06 2015 15:17:33 EDT from LoanShark @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


It's a *composite* data type. An array of primitives is not a primitive any more!

[#] Mon Apr 06 2015 15:19:04 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Any more?

[#] Mon Apr 06 2015 15:20:43 EDT from LoanShark @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


"Anymore". That's a composite *word*...

[#] Mon Apr 06 2015 15:23:00 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


I mean... you'd think a composite is composed of different data types, like a struct or class with int/long in it or the like.

But then, if you have a struct with int/int in it, from the machine code's perspective, it's an array of 2 ints, while from a language perspective it's a struct with two ints.

Just making it an array of any type is a composite, regardless of how you don't mix the types.. or even if you use a primative? Can it only be 'simple' if it is strictly a primative?

[#] Mon Apr 06 2015 15:23:18 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Heh... composite word...

[#] Mon Apr 06 2015 17:05:23 EDT from LoanShark @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


"Just making it an array of any type is a composite" yes, because a primitive is the lowest-level construct. If you have more than one of 'em, it ain't that anymore.

[#] Mon Apr 06 2015 17:07:42 EDT from LoanShark @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Go to page: First ... 11 12 13 14 [15] 16 17 18 19 ... Last