10 Oct 2023 |
Raph | I've only heard of it before gave it a shot (writing very small logic) to me it seems like slightly better react with part of the beauty of svelte | 17:58:37 |
Raph | the components as logic thing is a bit weird tho isn't it? | 17:58:47 |
Raph | like
function MyComponent() {
const [showThing, setShowThing] = createSignal(true);
const todoList = ['item1', 'item2', 'item3'];
const msg = "you've clicked me";
return (
<>
<button onClick={() => setShowThing(!showThing())}>Show</button>
<Show when={showThing()}>
<ul>
<Index each={todoList}>{(todo, i) =>
<li>{todo}</li>
</Index>
</ul>
</Show>
<>
);
} | 18:03:48 |
Raph | * like
function MyComponent() {
const [showThing, setShowThing] = createSignal(true);
const todoList = ['item1', 'item2', 'item3'];
return (
<>
<button onClick={() => setShowThing(!showThing())}>Show</button>
<Show when={showThing()}>
<ul>
<Index each={todoList}>{(todo, i) =>
<li>{todo}</li>
</Index>
</ul>
</Show>
<>
);
} | 18:04:52 |
Raph | * like
function MyComponent() {
const [showThing, setShowThing] = createSignal(true);
const todoList = ['item1', 'item2', 'item3'];
return (
<>
<button onClick={() => setShowThing(!showThing())}>Show</button>
<Show when={showThing()}>
<ul>
<Index each={todoList}>{(todo, i) =>
<li>{todo}</li>
</Index>
</ul>
</Show>
<>
);
} | 18:06:20 |
Raph | maybe I'm biased, but it's just more readable/cleaner in svelte imo
<script>
const msg = "you've clicked me";
let show = true;
</script>
<button on:click={() => show = !show}>Show</button>
{#if show}
<ul>
{#each todos as todo}
<li>{todo}</li>
{/each}
</ul>
{/if} | 18:07:13 |
Raph | but ig rewriting from react to solid would be less work? since I have huge react vibes when doing solid | 18:07:55 |
Raph | * like
function MyComponent() {
const [showThing, setShowThing] = createSignal(true);
const todoList = ['item1', 'item2', 'item3'];
return (
<>
<button onClick={() => setShowThing(!showThing())}>Show</button>
<Show when={showThing()}>
<ul>
<Index each={todoList}>{(todo, i) =>
<li>{todo}</li>
}</Index>
</ul>
</Show>
<>
);
} | 18:08:25 |
Raph | * maybe I'm biased, but it's just more readable/cleaner in svelte imo
<script>
const msg = "you've clicked me";
let show = true;
</script>
<button on:click={() => show = !show}>Show</button>
{#if show}
<ul>
{#each todos as todo}
<li>{todo}</li>
{/each}
</ul>
{/if} | 18:08:58 |
Raph | * maybe I'm biased, but it's just more readable/cleaner in svelte imo
<script>
let show = true;
const todoList = ['item1', 'item2', 'item3'];
</script>
<button on:click={() => show = !show}>Show</button>
{#if show}
<ul>
{#each todos as todo}
<li>{todo}</li>
{/each}
</ul>
{/if} | 18:09:39 |
wiltaylor | Yeah it does feel a bit weird but if you have a large asp.net app it's handy for being able to drop bits in without having to deal with a js build system yet | 21:46:18 |
wiltaylor | * Yeah it does feel a bit weird but if you have a large asp classic app it's handy for being able to drop bits in without having to deal with a js build system yet | 21:51:20 |
Raph | hmm | 22:33:22 |
galacticcolourisation | i have a confession to make | 23:27:47 |
galacticcolourisation | I've never written a single line of code in my life | 23:27:54 |
galacticcolourisation | i dunno what this whole programming thing is about | 23:28:02 |
doctorcringephd | its about telling robots how to love you properly | 23:31:19 |
doctorcringephd | if (horny) {
loveMeLongTime();
} | 23:31:58 |
doctorcringephd | * while (horny) {
loveMeLongTime();
} | 23:32:15 |
galacticcolourisation | lmao | 23:32:17 |
doctorcringephd | for lady in ldies:
sexify(lady) | 23:33:30 |
doctorcringephd | * for lady in ladies:
sexify(lady) | 23:33:39 |
doctorcringephd | while true; do
if ! ${spent}; then
sex
else
break
fi
done | 23:34:27 |
doctorcringephd | * spent=0
while ! ${spent}; do
sex
done | 23:35:20 |
doctorcringephd | class Wil:
def __init__(self):
self.satisfied = False
self.stimulations = 0
def stimulate(self):
stimulations += 1
@property
def is_satisfied(self):
return self.stimulations >= 10
wil = Wil()
while not is_satisfied():
wil.stimulate() | 23:38:56 |
doctorcringephd | * class Wil:
def __init__(self):
self.stimulations = 0
def stimulate(self):
stimulations += 1
@property
def is_satisfied(self):
return self.stimulations >= 10
wil = Wil()
while not is_satisfied():
wil.stimulate() | 23:39:11 |
doctorcringephd | * class Wil:
def __init__(self):
self.stimulations = 0
def stimulate(self):
self.stimulations += 1
@property
def is_satisfied(self):
return self.stimulations >= 10
wil = Wil()
while not is_satisfied():
wil.stimulate() | 23:39:24 |
doctorcringephd | * class Wil:
def __init__(self):
self.stimulations = 0
def stimulate(self):
self.stimulations += 1
@property
def is_satisfied(self):
return self.stimulations >= 10
wil = Wil()
while not wil.is_satisfied():
wil.stimulate() | 23:39:40 |
trueauracoral | wait what | 23:47:48 |
11 Oct 2023 |
doctorcringephd | we all tricked you into thinking "programming" was real. sucker! | 01:03:42 |