Verified Commit e1d11313 authored by Bernd Paysan's avatar Bernd Paysan
Browse files

36c3 presentation update

parent 0c84eaf1
Loading
Loading
Loading
Loading
+223 −349
Original line number Diff line number Diff line
@@ -30,151 +30,7 @@ require minos2/font-style.fs
44e update-size#

require minos2/text-style.fs

Variable slides[]
Variable slide#

0 Value n2-img
0 Value m2-img
0 Value $q-img

3 Constant n/m-switch
8 Constant m/$-switch

: >slides ( o -- ) slides[] >stack ;

glue ' new static-a with-allocater Constant glue-left
glue ' new static-a with-allocater Constant glue-right

: glue0 ( -- ) 0e fdup
    [ glue-left  .hglue-c ]L df!
    [ glue-right .hglue-c ]L df! ;
: trans-frame ( o -- )
    >o transp# to frame-color o> ;
: solid-frame ( o -- )
    >o white# to frame-color o> ;
: !slides ( nprev n -- )
    44e update-size# update-glue
    over slide# !
    slides[] $[] @ /flip drop
    slides[] $[] @ /flop drop glue0 ;
: fade-img ( r0..1 img1 img2 -- ) >r >r
    [ whitish x-color 1e f+ ] Fliteral fover f-
    r> >o to frame-color parent-w .parent-w /flop drop o>
    [ whitish x-color ] Fliteral f+
    r> >o to frame-color parent-w .parent-w /flop drop o> ;
: anim!slides ( r0..1 n -- )
    slides[] $[] @ /flop drop
    fdup fnegate dpy-w @ fm* glue-left  .hglue-c df!
    -1e f+       dpy-w @ fm* glue-right .hglue-c df! ;

: prev-anim ( n r0..1 -- )
    dup 0<= IF  drop fdrop  EXIT  THEN
    fdup 1e f>= IF  fdrop
	dup 1- swap !slides +sync +resize  EXIT
    THEN
    1e fswap f-
    1- sin-t anim!slides +sync +resize ;

: next-anim ( n r0..1 -- )
    dup slides[] $[]# 1- u>= IF  drop fdrop  EXIT  THEN
    fdup 1e f>= IF  fdrop
	dup 1+ swap !slides +sync +resize  EXIT
    THEN
    1+ sin-t anim!slides +sync +resize ;

1e FValue slide-time%

: prev-slide ( -- )
    slide-time% anims[] $@len IF  anim-end .2e f*  THEN
    slide# @ ['] prev-anim >animate ;
: next-slide ( -- )
    slide-time% anims[] $@len IF  anim-end .2e f*  THEN
    slide# @ ['] next-anim >animate ;

: slide-frame ( glue color -- o )
    font-size# 70% f* }}frame ;
: vp-frame ( color -- o ) \ drop $FFFFFFFF
    color, glue*wh slide-frame dup .button3 simple[] ;
: -25%b >o current-font-size% -25% f* to border o o> ;

box-actor class
    \ sfvalue: s-x
    \ sfvalue: s-y
    \ sfvalue: last-x
    \ sfvalue: last-t
    \ sfvalue: speed
end-class slide-actor

0 Value scroll<<

:noname ( axis dir -- ) nip
    0< IF  prev-slide  ELSE  next-slide  THEN ; slide-actor is scrolled
:noname ( rx ry b n -- )  dup 1 and 0= IF
	over $180 and IF  4 to scroll<<  THEN
	over $08 scroll<< lshift and IF  prev-slide  2drop fdrop fdrop  EXIT  THEN
	over $10 scroll<< lshift and IF  next-slide  2drop fdrop fdrop  EXIT  THEN
	over -$2 and 0= IF
	    fover caller-w >o x f- w f/ o>
	    fdup 0.1e f< IF  fdrop  2drop fdrop fdrop  prev-slide  EXIT
	    ELSE  0.9e f> IF  2drop fdrop fdrop  next-slide  EXIT  THEN  THEN
	THEN  THEN
    [ box-actor :: clicked ] +sync +resize ; slide-actor is clicked
:noname ( ekey -- )
    case
	k-up      of  prev-slide  endof
	k-down    of  next-slide  endof
	k-prior   of  prev-slide  endof
	k-next    of  next-slide  endof
	k-volup   of  prev-slide  endof
	k-voldown of  next-slide  endof
	s-k3      of  1e ambient% sf!
	    Ambient 1 ambient% opengl:glUniform1fv  +sync endof
	k-f3      of  ambient% sf@ 0.1e f+ 1e fmin  ambient% sf!
	    Ambient 1 ambient% opengl:glUniform1fv  +sync endof
	k-f4      of  ambient% sf@ 0.1e f- 0e fmax  ambient% sf!
	    Ambient 1 ambient% opengl:glUniform1fv  +sync endof
	s-k5      of  1e saturate% sf!
	    Saturate 1 saturate% opengl:glUniform1fv  +sync endof
	k-f5      of  saturate% sf@ 0.1e f+ 3e fmin saturate% sf!
	    Saturate 1 saturate% opengl:glUniform1fv  +sync endof
	k-f6      of  saturate% sf@ 0.1e f- 0e fmax saturate% sf!
	    Saturate 1 saturate% opengl:glUniform1fv  +sync endof
	k-f1      of  top-widget ..widget  endof
	[ box-actor :: ekeyed ]  EXIT
    endcase +sync +resize ; slide-actor to ekeyed
\ :noname ( $xy b -- )  dup 1 > IF
\ 	[ box-actor :: touchdown ] EXIT
\     THEN  drop
\     xy@ to s-y to s-x ftime to last-t
\     true to grab-move? ; slide-actor is touchdown
\ :noname ( $xy b -- ) dup 1 > IF
\ 	[ box-actor :: touchmove ] EXIT
\     THEN  drop xy@ fdrop
\     ftime last-t fover to last-t f- \ delta-t
\     last-x fover to last-x f-       \ delta-x
\     fswap f/ caller-w .w f/ to speed
\     last-x s-x f- caller-w .w f/ fdup f0< IF \ to the right
\ 	1e f+ slide# @ prev-anim
\     ELSE \ to the left
\ 	slide# @ next-anim
\     THEN ; slide-actor is touchmove
:noname ( $xy b -- ) 2dup [ box-actor :: touchmove ] drop
    xy@ dpy-h @ s>f fswap f- dpy-h @ 2/ fm/ lightpos-xyz sfloat+ sf!
    dpy-w @ s>f f- dpy-w @ 2/ fm/ lightpos-xyz sf!
    3.0e lightpos-xyz 2 sfloats + sf!
    LightPos 1 lightpos-xyz opengl:glUniform3fv  +sync ; slide-actor is touchmove
\ :noname ( $xy b -- )  dup 1 > IF
\ 	[ box-actor :: touchup ] EXIT
\     THEN  2drop
\     slide# @ 1e next-anim
\     false to grab-move? ; slide-actor is touchup

: slide[] ( o -- o )
    >o slide-actor new to act o act >o to caller-w o> o o> ;

glue-left  >o 1glue vglue-c glue! 1glue dglue-c glue! o>
glue-right >o 1glue vglue-c glue! 1glue dglue-c glue! o>
require minos2/presentation-support.fs

tex: net2o-logo
tex: 36c3-logo
@@ -195,39 +51,34 @@ tex: 36c3-logo
    }}v >o font-size# f2/ to border o o>
    to baseline# ;

: pres-frame ( color -- o1 o2 ) \ drop $FFFFFFFF
    color, glue*wh slide-frame dup .button1 simple[] ;

$FFFFBBFF text-color: redish

$10 stack: vp-tops

' }}i18n-text is }}text'

{{
    {{ glue-left }}glue
    {{
	glue-left @ }}glue
	
	\ page 0
	{{
	    $FFFFFF00 pres-frame
	    $FFFFFF00 dup pres-frame
	    ' redish >body f@ ' dark-blue >body f!
	    $00CCCCFF dup text-emoji-color, ' blackish >body f!

	    tex: cloudcalypse
	    \ 1 ms
	    ' cloudcalypse "cloudcalypse-16-9.jpg" 2e 3e f/ }}image-file drop /center
	    {{
		{{
		    glue*l }}glue \ ) $CCDDDD3F color, 4e }}frame dup .button1
		    glue*l }}glue
		    l" CloudCalypse 2" /title
		    l" Social network with net2o" /subtitle
		    glue*2 }}glue	
		    l" Bernd Paysan" /author
		    l" 36c3 Leipzig, Open Infrastructure Orbit, #wefixthenet" /location
		    {{
			glue*l }}glue \ ) $CCDDDD3F color, 4e }}frame dup .button1
			glue*l }}glue
			{{
			    glue*l }}glue \ ) $CCDDDD3F color, 4e }}frame dup .button1
			    glue*l }}glue
			    \tiny l" Photo: Ralph W. Lambrecht" }}text' /right \normal
			}}v box[]
		    }}z box[]
@@ -239,7 +90,7 @@ $10 stack: vp-tops
	\ page 1
	{{
	    ' whitish >body f@ ' blackish >body f!
    $000000FF pres-frame
	    $000000FF dup pres-frame
	    {{
		l" Motivation" /title
		glue*l }}glue \ ) $CCDDDD3F color, 4e }}frame dup .button1
@@ -252,7 +103,7 @@ $10 stack: vp-tops
	
	\ page 2
	{{
    $3F0000FF pres-frame
	    $3F0000FF dup pres-frame
	    {{
		l" 6 Years after Snowden" /title
		l" What changed?" \\
@@ -263,6 +114,7 @@ $10 stack: vp-tops
		    l"   Germany: Providers have to hand out passwords" "🤦🤦" e\\
		    l"   Germany: online search of cloud data" "🤦🤦🤦" e\\
		    l"   Backdoors still wanted (“reasonable encryption”)" "🤦🤦🤦🤦" e\\
		    l"   Terrorism/Child Porn/Protection of Minors rotated as reasons" "🤦🤦🤦🤦🤦" e\\
		}}v box[]
		\skip
		l" Progress" /subsection
@@ -276,7 +128,7 @@ $10 stack: vp-tops
	
	\ page 3
	{{
    $3F0000FF pres-frame
	    $3F0000FF dup pres-frame
	    {{
		l" Permanent Record" /title
		l" On social networks" /subsection
@@ -285,7 +137,8 @@ $10 stack: vp-tops
		\skip
		l" That new product was Us." p\\
		l" Our attention, our activities, our locations, our desires—everything about us that we revealed, knowingly or not, was being surveilled and sold in secret, so as to delay the inevitable feeling of violation that is, for most of us, coming only now. And this surveillance would go on to be actively encouraged, and even funded by an army of governments greedy for the vast volume of intelligence they would gain." p\\
	\regular
		\regular \skip
		l" Edward Snowden" }}text' /right
		glue*l }}glue \ ) $CCDDDD3F 4e }}frame dup .button1
	    }}v box[] >o o Value snowden-page2 font-size# to border o o>
	}}z box[] /flip dup >slides
@@ -293,7 +146,7 @@ $10 stack: vp-tops
	
	\ page 4
	{{
    $200020FF pres-frame
	    $200020FF dup pres-frame
	    {{
		l" net2o in a nutshell" /title
		l" net2o consists of the following 6 layers (implemented bottom up):" \\
@@ -319,7 +172,7 @@ $10 stack: vp-tops
	
\ page 5
	{{
    $200020FF pres-frame
	    $200020FF dup pres-frame
	    {{
		l" Social Networks in net2o" /title
		vt{{
@@ -338,7 +191,7 @@ $10 stack: vp-tops

	\ page 6
	{{
    $202000FF pres-frame
	    $202000FF dup pres-frame
	    {{
		l" Last year’s things still to do" /title
		vt{{
@@ -357,27 +210,63 @@ $10 stack: vp-tops

\ page 7
	{{
    $200030FF pres-frame
	    $200030FF dup pres-frame
	    {{
		l" New Challenges found" /title
	l" This is an exploration of what’s actually needed" /subsection
		l" This endeaver is an exploration of what’s actually needed" /subsection
		vt{{
	    l" • " l" Hackers need a night mode (color theme)" b\\
	    l" • " l" Some JPEGs don't have thumbnails" b\\
	    l" • " l" Protocol to provide “who has what” with privacy in mind" b\\
		    l" • " l" Hackers need a night mode (color theme)" b\\
		    l" • " l" Some JPEGs don't have thumbnails (use epeg?)" b\\
		    l" • " l" Protocol to provide “who has what” with privacy in mind (✅½)" b\\
		    l" • " l" Comfortable ID cloning (see IETF MEDUP task group)" b\\
		    l" • " l" Permissions for DVCS updates/posting&comment submission" b\\
		    l" • " l" Likes/+1s/etc.: only the last one (per user) counts" b\\
	    l" • " l" Closed group chats" b\\
		    l" • " l" Closed group chats" b\\
		    l" • " l" Permissions for moderators" b\\
	    l" • " l" Shareable directory of collections/groups" b\\
		    l" • " l" Shareable list of collections/groups" b\\
		    l" • " l" What about port 53/80/443–only networks?" b\\
		}}vt
	    }}v box[] >bdr
	}}z box[] /flip dup >slides
	\ page 8
	{{
	    $200030FF dup pres-frame
	    {{
		l" Protocol to provide “who has what”" /title
		vt{{
		    l" ❓ " l" Original plan: keep hashes in DHT" b\\
		    l" ➡ " l" Query reveals who wants what" b\\
		    l" ❓ " l" Original solution: Encrypt hashes" b\\
		    l" ➡ " l" Query reveals who wants/has the same thing" b\\
		    l" ❓ " l" Onion routing within DHT?" b\\
		    l" ➡ " l" Complex, slow" b\\
		    \skip
		    l" ➡ " l" Better keep “who has what” within the chat log structure" b\\
		    l" ➡ " l" “who” is device.pubkey" b\\
		}}vt
	    }}v box[] >bdr
	}}z box[] /flip dup >slides	
	\ page 9
	{{
	    $200030FF dup pres-frame
	    {{
		l" Comfortable ID cloning" /title
		l" solve the multi–device problem" /subsection
		vt{{
		    l" ❓ " l" Copy your secret+public keys" b\\
		    l" ➡ " l" You need authorized remote file access" b\\
		    l" ❓ " l" Establish authorization with net2o itself" b\\
		    l" ➡ " l" Scan a color–QR–code" b\\
		    l" ➡ " l" Send an invitation packet back" b\\
		    l" ➡ " l" Get a confirmation color–QR–Signature" b\\
		    l" ➡ " l" Do a zero–knowledge proof of “has the password”" b\\
		    l" ➡ " l" Send the keys over via that net2o connection" b\\
		}}vt
	    }}v box[] >bdr
	}}z box[] /flip dup >slides	

	\ page 12
	{{
    $000000FF pres-frame
	    $000000FF dup pres-frame
	    {{
		l" The non–technical problems" /title
		vt{{
@@ -390,7 +279,7 @@ $10 stack: vp-tops
	
	\ page 13
	{{
    $000000FF pres-frame
	    $000000FF dup pres-frame
	    {{
		l" Literatur & Links" /title \small
		vt{{
@@ -417,7 +306,7 @@ $10 stack: vp-tops
	' }}text is }}text'
	
	\ end
glue-right }}glue
	glue-right @ }}glue
    }}h box[]
    36c3-img drop net2o-img drop  logo-img2
}}z slide[]
@@ -425,12 +314,6 @@ to top-widget

also opengl

: !widgets ( -- )
    set-fullscreen-hint 1 set-compose-hint
    top-widget .htop-resize
    vp-tops get-stack 0 ?DO  .vp-top  LOOP
    1e ambient% sf! set-uniforms ;

[IFDEF] writeout-en
    lsids ' .lsids s" ef2018/en" r/w create-file throw
    dup >r outfile-execute r> close-file throw
@@ -438,15 +321,6 @@ also opengl

previous

also [IFDEF] android android [THEN]

: presentation ( -- )
    1config
    [IFDEF] hidestatus hidekb hidestatus [THEN]
    !widgets widgets-loop ;

previous

script? [IF]
    next-arg s" time" str= [IF]  +db time( \ ) [THEN]
    presentation bye