Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Golang

Name: Anonymous 2011-12-22 19:52

How does /prague/ feel about Go?

Name: Anonymous 2011-12-22 20:03

package main

import (
    "fmt"
    "math"
)

func main() {
    fmt.Printf("Now you have %g problems.",
        math.Nextafter(2, 3))
}


http://tour.golang.org/#5

Name: Anonymous 2011-12-22 20:15

>>1

Did you mean: gaylang

Name: Anonymous 2011-12-22 21:57

Google dun goofed.

Name: Anonymous 2011-12-23 1:04

Not lisp and has no generics. Why should I care?

Name: Anonymous 2011-12-23 1:14

go's interfaces are pretty nice.

Name: Anonymous 2011-12-23 1:19

I disagree. Look at this:

(defun list-index (obj lst)
  (if (null lst)
      nil
      (if (eql (car lst) obj)
      0
      (let ((z (list-index obj (cdr lst))))
        (and z (+ z 1))))))

Name: Anonymous 2011-12-23 1:53

>>7
Lisp is shit and you are a faggot.

Name: Anonymous 2011-12-23 3:05

>>8

Shit is faggot and you are a lisp.

Name: Anonymous 2011-12-23 3:19

It's a nice language. I hope it replaces C++ and Java, as well as Python for bigger applications.

Name: Anonymous 2011-12-23 6:39

Go is gay

Name: Anonymous 2011-12-23 6:46

>>11
Your gay.

Name: Anonymous 2011-12-23 7:32

>>12
Witch my gay?

Name: Anonymous 2011-12-23 13:21

Name: Anonymous 2011-12-23 13:44

>>10
replaces python
ಠ_ಠ

Name: Anonymous 2011-12-23 13:46

>>14
The Go code in that article is rather pathetically written (if not outright invalid), examples are trivial (and Go does it better in all of them), and it compares Go to Algol, of all languages.
Go troll somewhere else.

Name: Anonymous 2011-12-23 13:47

>>15
For bigger applications. For example, think of Deluge. It's written in Python and rather slow. Since Go is about as easy to write as Python, has a nice standard library, targets networking and concurrency and is faster (after all, it compiles to native code), wouldn't it be a good choice for such applications?

Name: Anonymous 2011-12-23 14:38

Python is shit, but at least it's mainstream shit.

Name: Anonymous 2011-12-23 16:58

mainscream is the only common selling point of shit languages it seems.

Name: Anonymous 2011-12-23 17:09

>>17
ಠ_ಥ

Name: Anonymous 2011-12-23 17:16

Name: Anonymous 2011-12-23 17:20

Let's use MicrosoftTM InternetTM ExplorerTM, because it's  the most used MAINSTREAM browser!

Name: Anonymous 2011-12-23 18:23

>>16
The point is Algol is a more consistent language. I'd be using Go right now if it had a respectable degree of consistency (and a few semantic changes.) But the Go team decided that "convention" was the order of the day, ruining any chance they had at making a decent language.

>>17
targets networking and concurrency and is faster (after all, it compiles to native code)
It's one of the slowest such languages to target native code. I'm going to plug rust here, because it's done better on all fronts. It has silly problems too, but they're few and far between, not to mention the developers actually recognize the problem areas as problematic.

Name: Anonymous 2011-12-24 0:11

Google being evil by stealing Francis McCabe's name and replacing it with mediocre shit.

Name: Anonymous 2011-12-24 2:01

>>14
It's no question that Algol, Pascal, and Smalltalk are better than C, Sepples, and Java.

Name: Anonymous 2011-12-24 12:34

>>14

Wow Go's union types suck.

Name: Anonymous 2011-12-26 21:07

My Review of Go Language:
Pros:
*Brings time-tested 1960s Algol functionality to the modern era
*Adds quirks and irregularities to ensure that programmers and documentation writers retain their jobs should it become popular
*Wastes disk space with a brain-dead linker, which would be a boon to RAM and disk manufactures
*Allows nested functions, just like Lisp, Algol, Pascal, Perl, and JavaScript did since the 50s/60s/70s/80s/90s, respectively
*Threads and channels are built-in (really the only interesting feature of Go, a version of "C plus channels and nested functions" or "Pascal plus channels" would have been better)
*Multiple assignment, like Perl and other languages

Cons:
*1MB for Hello World
*Non-standard syntax for C/C++/Java programmers (types after variable names, funky array and pointer syntax)
*Runs on less platforms than C# (with Mono)
*Startup code takes forever (run it in a debugger and see how many superfluous operations are done before the thing actually runs main())
*Linker is shit, you get the whole runtime even if you just use one function
*Might as well use C, C++, or Pascal and get faster, more portable applications
*Might as well use Perl, Python, or Ruby and get easier to write, more portable applications

Conclusion:
Go is shit.

Name: Anonymous 2011-12-27 1:10

>>16
ANY language being compared to Algol would be an honor. Several of the CS VIP of the 60s participated in it (LISP guy, FORTRAN guy, EWD), BNF notation originated for Algol alone, it just so happens to be useful elsewhere, Knuth devised algorithms just for Algol. All languages other than COBOL and FORTRAN in use right now have features that descend directly from any of the Algols, even bash (Bourne was on the 68 committee). Algol was the state of the art, and compared to a lot of the languages in vogue on TIOBE right now it still is.

It fell into over-design though, even after they had to leave out a bunch of stuff, the language was very extensible, had at least 5 standard encoding representations (book form - yes the language has an ``MS Word'' mode, ASCII-like, and various non-ASCII forms), standard support for keywords in multiple human languages, it had something like 8 kinds of ``nothing'' values.

Name: Anonymous 2011-12-27 1:49

>>28
even bash

yeah, the

if
  ...
fi

case
  ...
esac


stuff looked familiar

Name: Anonymous 2011-12-27 1:50

>>28
it had something like 8 kinds of ``nothing'' values.

that sounds insane.

Name: Anonymous 2011-12-27 1:56

>>30

I can't even think of 8 different nothing english words

null nil empty undefined...nothing...aaand that's all I got.

Name: Anonymous 2011-12-27 4:29

With the loss of pointer arithmetic, the notational convenience of using pointers for iteration is gone, and I still haven't figured out how to get it back. Quickly looking at the stdlib sources seems to indicate that there isn't one.

Name: Anonymous 2011-12-27 6:03

>>31
null nil empty undefined nothing void zero none

Name: Anonymous 2011-12-27 9:01

>>33
Nigger

Name: Anonymous 2011-12-27 13:15

The Golan Heights Programming Language

Name: Anonymous 2011-12-27 18:38

>>27
*1MB for Hello World
Statically compile a C hello world program and it'll be about 1.5 MB (GCC 4.6.1 on x86 32bit; gcc -O0 -static $source). And just try the same with a C++ hello world...

Name: Anonymous 2011-12-27 18:59

>>36

[ Tue Dec 27 06:57:54 ]
[ @ ~/host/prog/he ] $ cat h.c
#include <stdio.h>

void main()
{
    puts("Hello World\n");
}
[ Tue Dec 27 06:58:03 ]
[ @ ~/host/prog/he ] $ gcc -O0 -static h.c
[ Tue Dec 27 06:58:07 ]
[ @ ~/host/prog/he ] $ ls -s -h
total 669K
669K a.out   512 h.c



try again

Name: Anonymous 2011-12-30 9:48

this guy thinks GO could have been better

http://www.cowlark.com/2009-11-15-go/

Nice article IMO.

Name: Anonymous 2011-12-30 10:33

>>36,37


[~]-> cat h.c            
#include <stdio.h>

void main(void){
                printf("Hello, World!\n");
}
[~]-> gcc -static h.c -o h
[~]-> strip -s h
[~]-> upx -9 h
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2010
UPX 3.07        Markus Oberhumer, Laszlo Molnar & John Reiser   Sep 08th 2010

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
    736336 ->    289848   39.36%  linux/ElfAMD   h                            

Packed 1 file.
[~]-> ls -sh h
288K h


You should always strip and pack your executables. Especially if you statically link them.

Name: Anonymous 2011-12-30 11:00

>>39`
UPX 3.0[b]7[/b]

Name: Anonymous 2011-12-30 16:31

>>39
I tried stripping Go programs on Windows. "Not a valid Win32 executable." However, strip works fine with programs compiled with gcc.

Name: Anonymous 2011-12-30 16:59

>> 1-41
bloated libc
LOL

Name: Anonymous 2011-12-30 17:52

>>44
nice dubs bro

Name: Anonymous 2011-12-30 17:58

Considering they have Rob Pike and Ken Thompson on board, I'm surprised they decided to adopt shitCase.

Name: Anonymous 2011-12-30 18:20

>>42
I'd rather have a single bloated libc on my system than a bloated libgo that gets included in every executable even if you only use one function. FreeBASIC has a statically linked runtime library including a 300 KB graphics package, but only links in the functions you actually use. Go's linker is full retard.

Name: Anonymous 2012-01-01 9:02

>>45

why would they do it this way? surely there must be a reason

Name: Anonymous 2012-01-01 9:17

Name: Anonymous 2012-01-01 9:33

>>47
Both Go and Dart are shit.

Name: Anonymous 2012-01-01 10:25

>>48
But Dart is lesser shit than JS, while Go is worse shit than See, Seeples, Dee.

Name: Anonymous 2012-01-01 10:33

Sister DeeDee is magic.

Name: Anonymous 2012-01-01 13:33

>>49

would not the "best" alternative to javascript be an open VM that web developers could use any sort of language on?

Name: Anonymous 2012-01-01 13:41

>>47
btw that post sucks

tl;dr: "people are complaining about go without spending a lot of time programming in it"

Name: Anonymous 2012-01-01 13:54

>>51
You know what would be best? Having gentle BDSM sex with Fluttershy. But in Real World we can't reach our most wanted desires.

Real World does not provide VM, web browser have nothing but Javascript. That's why Dart will be able to live quite long. And if the day of Great-VM-that-will-be-supported-by-at-least-FF-and-chrome will come, then it will shine. Coffeescript will shine also. Right now they are just working rather that waiting for Saviour VM.

Name: Anonymous 2012-01-01 14:21

>>53

people at firefox and webkit have come together to quickly implement things before (eg webgl), so i don't think it is impossible. just very difficult, possibly for political reasons.

Name: Anonymous 2012-01-01 16:17

SEPPLES

Name: Anonymous 2012-01-01 19:14

Cry more

Name: Anonymous 2012-01-01 19:30

>>51
>an open VM that web developers could use any sort of language on
Something like the JVM?

Name: Anonymous 2012-01-01 19:57

The first and last time I checked out Dart's website was with Opera. If they can't be assed to white list my browser I don't see why I should bother to try out their own 2011 flavor of VBScript.

Name: Anonymous 2012-01-01 20:53

>>57

right, like how people use the JVM as a host for other languages (clojure, scala, etc)

basically that, except a JSVM that runs javascript and lets us implement other languages on the VM

Name: Anonymous 2012-01-01 21:03

>>59
Why not just use a macro processor or translator that converts the source language into JavaScript?

Name: Anonymous 2012-01-01 23:43

>>57
Except its startup time is not acceptable. So more like AVM2.

Name: Anonymous 2012-01-02 9:17

>>14
I want to hear more about those "incestuous unions".
Sounds hot.

Name: Anonymous 2012-01-02 22:25

Algol 68 allows spaces in variable names and lets people use real mathematical symbols and keywords in multiple languages while still allowing representational variants for 4-, 5-, 6-, 7- and 8-bit character encodings. Go can't. Algol is used on Russian and American space craft. Go isn't. Algol has a consistent syntax good enough for the creators of Pascal, Ada, BCPL (which begat C), Simula, and Smalltalk to copy. Go uses a poor copy of C's syntax, as if C were patented and they couldn't use it. Being designed for multiprocessor systems and not limited microcomputers, Algol 68 allows parallel clauses and semaphores. Go has channels, which could be simulated in Algol using standard parallel constructs. Algol has statement expressions and nested functions like Perl and JavaScript, but unlike C (except GCC and other nonstandard variants). Go does too. So what? Go is supposed to be higher-level than C and was designed with JavaScript in mind. One can easily conclude that Go is shit, but I won't take it that far. I'd place it somewhere between a joke esolang and "something someone on /prog/ invented on a bored weekend."

Name: Anonymous 2012-06-19 20:09

My Little Gony: Google is Magic

Name: Anonymous 2012-06-20 0:44

FUKS

The Forced Use Of K&R Style

``It's important to put the opening brace of a construct such as an if statement on the same line as the if; however, if you don't, there are situations that may not compile or may give the wrong result. The language forces the brace style to some extent.''

Name: Anonymous 2012-06-20 0:50

>>65

From an interview with Ken Thompson:

"To be perfectly honest, Rob [Pike] and I would get annoyed having to look at code written in other peoples brace styles, so we forced it in the design.  We wanted to force people to stop using camelcase too, but we figured no one would use the language and just stick with Java."

Name: Anonymous 2012-06-20 1:56

>>63
Algol is shit compared to Lisp, which itself is shit parenthesized.

Name: Anonymous 2012-06-20 10:31

>>49

Yes dart is great. They actually do typechecking and then let it fail by design:

"Unsound" is a spooky-sounding word. All it means, though, is that the type checker lets through some programs that at runtime turn out to fail with an error related to a value's type, such as cow.oink() throwing NoSuchMethodException. Really, this is normal.

Nowadays this seems to be normal. That is just great.

Name: Anonymous 2012-06-20 10:42

And what does this mean:


In both cases, you don't necessarily have to add types to the bodies of methods or functions. Users of the library get value from type signatures, even if they are not 100% accurate.

I can get value from type signatures, even if they are not accurate?

Name: Anonymous 2012-06-20 19:23

>>67
Lisp and Algol, are built around a kernel that seems as natural as a branch of mathematics. - Metamagical Themas, Douglas Hofstadter

Don't change these.
Name: Email:
Entire Thread Thread List