Home | Zones | Log in | Register

i still want to still want to be a copy of a better programming topic

programming

Nobody
 ⬇︎ 
Page 1 of /1

why did no one make this zone

Zone Founder

i need to add syntax highlighting now that this came out https://github.com/alecthomas/chroma

code test

func (t *Thread) Bump(ctx context.Context, userID string) error {
	table := dynamoTable(ctx, "Threads")
	return table.Update("Zone", t.Zone).Range("ID", t.ID).
		Set("LastPost", time.Now().UTC()).
		Add("Posts", 1).
		AddStringsToSet("Posters", userID).
		AddStringsToSet("Subscribers", userID).
		Value(t)
}
Edited by Tiko at 2018-06-30 18:55:452018-06-30 18:55

hmm quotes get fucked up “test”

afff " "
''

fixed quotes :3

From: Tiko at 2017-09-23 05:49:18
i need to add syntax highlighting now that this came out https://github.com/alecthomas/chroma

code test

func (t *Thread) Bump(ctx context.Context, userID string) error {
  table := dynamoTable(ctx, "Threads")
  return table.Update("Zone", t.Zone).Range("ID", t.ID).
      Set("LastPost", time.Now().UTC()).
      Add("Posts", 1).
      AddStringsToSet("Posters", userID).
      AddStringsToSet("Subscribers", userID).
      Value(t)
}

eti needs this feature
can’t read blocks of colorless garbage

Zone Founder

From: Tiko at 2017-09-23 13:26:48
fixed quotes :3

good work

From: Kelladros at 2017-10-04 23:19:33

From: Tiko at 2017-09-23 13:26:48
fixed quotes :3

good work

Muy Mas Mucho

From: Tiko at 2017-09-23 05:49:18
i need to add syntax highlighting now that this came out https://github.com/alecthomas/chroma

code test

func (t *Thread) Bump(ctx context.Context, userID string) error {
  table := dynamoTable(ctx, "Threads")
  return table.Update("Zone", t.Zone).Range("ID", t.ID).
      Set("LastPost", time.Now().UTC()).
      Add("Posts", 1).
      AddStringsToSet("Posters", userID).
      AddStringsToSet("Subscribers", userID).
      Value(t)
}

looks colorless to me

## i have added color~

* it gets fucked up in spoiler tags but i'll fix later
* you gotta do it like GitHub where u specify the language
bird on skateboard

```python
if
elif
else

Edited by imgay at 2018-07-03 22:38:462018-07-03 22:38

u gotta do the end ticks too

bird on skateboard
if
elif
else

nice

bird on skateboard
func amIGay() bool { return true }
Muy Mas Mucho

nice

Shark Cat

i should post about programming more

bird on skateboard

post the source code to this blue sight in snippets

Shark Cat

ok i’ll start with some of the ‘worst’ code
i decided to not use any js frameworks or dependencies so..
the emoji picker is dynamically generated JS dom manipulation
later on i learned about the <template> tag which i should use instead

function makeEmojiSelector(id) {
	var frag = document.createDocumentFragment();

	var select = document.createElement("select");
	select.onchange = addEmoji.bind(null, id);
	select.id = "emoji-picker-" + id;

	var topVal = document.createElement("option");
	topVal.value = "";
	topVal.textContent = "Add Emoji";
	select.appendChild(topVal);

	var options = [];
	{{range $i, $emoji := $.Zone.EmojisOrDefault}}
		options[{{$i}}] = document.createElement("option");
		options[{{$i}}].textContent = "{{$emoji}}";
		options[{{$i}}].value = "{{$emoji}}";
		select.appendChild(options[{{$i}}]);
	{{end}}

	var cancelVal = document.createElement("option");
	cancelVal.value = "";
	cancelVal.textContent = "Nevermind";
	select.appendChild(cancelVal);

	frag.appendChild(select);
	document.getElementById("emoji-selector-" + id).appendChild(frag);
}
Edited by Tiko at 2019-05-13 23:26:002019-05-13 23:26
bird on skateboard

From: Tiko at 2019-05-13 22:40:33
i should post about programming more

same


select * from links where is_current

Edited by mrtrip at 2019-05-13 23:28:322019-05-13 23:28

From: mrtrip at 2019-05-13 23:27:53


select * from links where is_back.is_current

0 rows

bird on skateboard

dynamic post quote updates when

it happens just not in quotes ;(

bird on skateboard

i should make quotes fancier
i have them just straight up be markdown because i hadn’t figured out how to make custom stuff yet but i got videos and stuff with a custom tag now

bird on skateboard

> From: [Tiko](/thread/1?filter=tiko) at [2019-05-13 23:29:50](/thread/1#msg-25) > i should make quotes fancier > i have them just straight up be markdown because i hadn't figured out how to make custom stuff yet but i got videos and stuff with a custom tag now

From: Tiko at 2019-05-13 23:29:50
i should make quotes fancier
i have them just straight up be markdown because i hadn’t figured out how to make custom stuff yet but i got videos and stuff with a custom tag now

testing quotes

Shark Cat

From: Pook Cat at 2019-05-13 23:42:50

From: Tiko at 2019-05-13 23:29:50
i should make quotes fancier
i have them just straight up be markdown because i hadn’t figured out how to make custom stuff yet but i got videos and stuff with a custom tag now

i’m gay

Shark Cat

From: Tiko at 2018-06-30 19:08:58

## i have added color~

* it gets fucked up in spoiler tags but i'll fix later
* you gotta do it like GitHub where u specify the language

Page stretcher though

From: Tiko at 2017-09-23 05:49:18
i need to add syntax highlighting now that this came out https://github.com/alecthomas/chroma

code test

func (t *Thread) Bump(ctx context.Context, userID string) error {
  table := dynamoTable(ctx, "Threads")
  return table.Update("Zone", t.Zone).Range("ID", t.ID).
      Set("LastPost", time.Now().UTC()).
      Add("Posts", 1).
      AddStringsToSet("Posters", userID).
      AddStringsToSet("Subscribers", userID).
      Value(t)
}

this is beautiful and better than ETI

From: phaedrus at 2019-05-13 13:07:42

func amIGay() bool { return true }

From: mg++ at 2020-01-22 12:38:55

From: Tiko at 2017-09-23 05:49:18
i need to add syntax highlighting now that this came out https://github.com/alecthomas/chroma

code test

func (t *Thread) Bump(ctx context.Context, userID string) error {
    table := dynamoTable(ctx, "Threads")
    return table.Update("Zone", t.Zone).Range("ID", t.ID).
        Set("LastPost", time.Now().UTC()).
        Add("Posts", 1).
        AddStringsToSet("Posters", userID).
        AddStringsToSet("Subscribers", userID).
        Value(t)
}

this is beautiful and better than ETI

yeah it’d be nice of ETI had it o well

code looks surprisingly ok even with dark mode theme
kewl

Screen Shot 2020-01-22 at 23.58.54.png

Edited by Tiko at 2020-01-22 14:59:192020-01-22 14:59

how do you get cool colors

do you have to use that magic language

Shark Cat
bool checkGay() {
  return true;
}
Shark Cat

u gotta specify the programming language after the ticks
like
```go

Edited by Tiko at 2020-01-22 19:27:432020-01-22 19:27
bool checkGay() {
  return true;
}
int getNiceNum() {
  return 69;
}
Shark Cat

From: Pook Cat at 2020-01-23 07:42:47

int getNiceNum() {
  return 69;
}

nice


SELECT

    count(1)

FROM

    [programming].[thread].[zone]

WHERE

    user = 'mrtrip'


LIMIT 69

.

Sexy dragon nerd boy

i switched the custom styles page to use <input type=color> and got rid of the one external JS dependency the ‘zone had
yay

From: Tiko at 2020-04-10 23:13:41
i switched the custom styles page to use <input type=color> and got rid of the one external JS dependency the ‘zone had
yay

independence at last

Reply:
To reply to this thread, please join this community.
Pages: 1
1 person is reading this thread now.
Thread List | ↑ Top