profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/TotallyGamerJet/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

TotallyGamerJet/goco 1

Golang bindings to the Cocoa Framework

TotallyGamerJet/JBrowser 1

JBrowser is a pure java based browser using swing.

TotallyGamerJet/cxgo 0

Another tool for transpiling C to Go.

TotallyGamerJet/glow 0

Go binding generator for OpenGL

TotallyGamerJet/gopher-os 0

A proof of concept OS kernel written in Go

TotallyGamerJet/gtds 0

Graphics That Don't Suck For Go

TotallyGamerJet/gwl 0

GWL is a crossplatform window and input api written in Go inspired by glfw

startedmathetake/gasm

started time in 3 days

fork TotallyGamerJet/cxgo

Another tool for transpiling C to Go.

fork in 7 days

push eventTotallyGamerJet/cxgo

TotallyGamerJet

commit sha 0435ecdd98ac0ddd1fdf23fc6417b520fcb781d8

update parser (#17) * update parser This probably shouldn't be merged until #16 has a solution but this can be used for testing. This is an update by a minor version so it shouldn't break anything. * new commit

view details

TotallyGamerJet

commit sha eae71b6fa2d36b51e7cfa4ab8e39e1d46a2ae4ac

Merge branch 'gotranspile:main' into main

view details

push time in 7 days

issue commentgotranspile/cxgo

assigning string to [] of custom type fails

Go doesn't allow conversion from string to byte arrays. It only allows string to byte slices. And slices can't be converted into arrays until 1.17 drops. I can only think of one possible way to get it to work which would be a copy:

var vendor [15]MYubyte
copy(vendor[:], []MYubyte("Robert Winkler"))

The benefit of this method is that it's clear and compatible with many versions of Go.

TotallyGamerJet

comment created time in 7 days

pull request commentgotranspile/cxgo

update parser

@dennwc It now passes! Now how do you want to go about closing #16? If you tell me what you want the code to look like and generally what files to change I can add that commit too.

TotallyGamerJet

comment created time in 8 days

push eventTotallyGamerJet/cxgo

TotallyGamerJet

commit sha a425edc8ca42fae802553cbf1cab4626e56fbf22

new commit

view details

push time in 8 days

issue commentgotranspile/cxgo

Goto forbidden by Go

Solving the structured control flow problem once and for all is a good article for anyone wanting to solve this issue

dennwc

comment created time in 11 days

pull request commentgotranspile/cxgo

update parser

Was this test passing before? It appears to be broken in CC at (*InitializerList).checkStruct in check.go

TotallyGamerJet

comment created time in 12 days

PR opened gotranspile/cxgo

update parser

This probably shouldn't be merged until #16 has a solution but this can be used for testing. This is an update by a minor version so it shouldn't break anything.

+9 -8

0 comment

2 changed files

pr created time in 12 days

push eventTotallyGamerJet/cxgo

TotallyGamerJet

commit sha 054d5452f4b39acd5da26751a0bced0d7f82f9b0

update parser This probably shouldn't be merged until #16 has a solution but this can be used for testing. This is an update by a minor version so it shouldn't break anything.

view details

push time in 12 days

fork TotallyGamerJet/cxgo

Another tool for transpiling C to Go.

fork in 12 days

push eventTotallyGamerJet/cxgo

TotallyGamerJet

commit sha ac402145f7554f84f011ea06b38a29816a5850c0

RAND_MAX (#15) Add RAND_MAX to sdlib. Solves #14

view details

TotallyGamerJet

commit sha 82960b167d2e6520dc4c59ee77b97ea2fa2772e2

Merge branch 'gotranspile:main' into main

view details

push time in 12 days

push eventTotallyGamerJet/cxgo

TotallyGamerJet

commit sha 989b0332e5a11e110c589efed4454ba758ef5d27

update parser version this probably shouldn't be merged until #16 has a solution. But also, I don't think it breaks anything because its a minor change

view details

push time in 12 days

issue commentgotranspile/cxgo

assigning string to [] of custom type fails

@dennwc with this commit the code now generates. However, it generates invalid code. This is what I'm getting:

package main

import (
	"github.com/gotranspile/cxgo/runtime/libc"
	"os"
)

func main() {
	type MYubyte uint8
	var vendor [15]MYubyte = ([15]MYubyte)(libc.CString("Robert Winkler"))
	_ = vendor
	os.Exit(0)
}

The error is Cannot convert an expression of the type '*byte' to the type '[15]MYubyte'. I'm not sure what the proper translation is in order to find a fix. I know go 1.17 has a function unsafe.Slice(ptr, size) that could be used but that isn't out yet.

TotallyGamerJet

comment created time in 12 days

issue commentgotranspile/cxgo

assigning string to [] of custom type fails

So I've created an issue. It appears the issue lies in the fact that uint8_t is defined as unsigned __int8 which the parser doesn't recognize as being able to assign a string to it.

TotallyGamerJet

comment created time in 15 days

issue openedgotranspile/cxgo

assigning string to [] of custom type fails

#include <stdint.h>
int main() {
	typedef uint8_t  MYubyte;
	MYubyte vendor[] = "Robert Winkler";
	return 0;
}

This code compiles under gcc but it doesn't in cxgo. I get this error: Error: parsing failed: test.c:4:21: initializer for an object that has aggregate or union type shall be a brace-enclosed list of initializers for the elements or named members: array of MYubyte

created time in 16 days

issue commentgotranspile/cxgo

RAND_MAX missing

I think a new issue should be created for generating constants in headers so I’m going to close this issue

TotallyGamerJet

comment created time in 16 days

issue closedgotranspile/cxgo

RAND_MAX missing

One of the c projects I am trying to convert uses RAND_MAX found in stdlib.h. I added it to the header in libs/stdlib.go and a go constant in runtime/libc/rand.go. I wondered if there is a way to make the header define equal to the go constant? This way future changes don't require two places to be updated.

closed time in 16 days

TotallyGamerJet

push eventTotallyGamerJet/cxgo

TotallyGamerJet

commit sha e291d49c1a7273d1ba7b24257c9aade19907f308

Update stdlib.go

view details

push time in 17 days

push eventTotallyGamerJet/cxgo

TotallyGamerJet

commit sha 2ee4230c861bcd61a91ad9821fb9ef930d4219b4

changes

view details

push time in 17 days

PR opened gotranspile/cxgo

RAND_MAX

Solves #14.

I did the -1 because from my understanding of the spec RAND_MAX should be able to be returned from rand(). rand.Intn though only works as (0,N) and not the c spec (0,RAND_MAX].

+10 -4

0 comment

2 changed files

pr created time in 17 days

push eventTotallyGamerJet/cxgo

TotallyGamerJet

commit sha af3cda8e281137ebcfbfeea6a479135bb6dd4a69

RAND_MAX Solves #14

view details

push time in 17 days

issue openedgotranspile/cxgo

RAND_MAX missing

One of the c projects I am trying to convert uses RAND_MAX found in stdlib.h. I added it to the header in libs/stdlib.go and a go constant in runtime/libc/rand.go. I wondered if there is a way to make the header define equal to the go constant? This way future changes don't require two places to be updated.

created time in 18 days

fork TotallyGamerJet/cxgo

Another tool for transpiling C to Go.

fork in 18 days

issue openedgotranspile/cxgo

cast to void produces wrong code

the following c code:

int a = 0;
(void)a;

should produce:

var a int = 0
_ = a

instead, it produces:

var a int = 0
a 

which doesn't compile in go because the variable is evaluated but not used

created time in 19 days

issue commentgotranspile/cxgo

Support static specifier

static variables should be able to be implemented with closures. For example: int fun() { static int count = 0; count++; return count; } can be implemented as:

var fun = _Static_fun()

func _Static_fun() func() int {
	var count int
	return func() int {
		count++
		return count
	}
}

This should be easy to implement because all that must be done is move all static variables to the top and create the closure with the rest of the code.

dennwc

comment created time in 19 days

startedgotranspile/cxgo

started time in 19 days

startedzauonlok/renderer

started time in 2 months

startedrswinkle/PortableGL

started time in 2 months

startedgen2brain/goiv

started time in 2 months