»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! 🦋 Set by Zoffix on 25 May 2018. |
|||
00:08
w_richard_w joined
00:09
raynold joined
|
|||
Kaiepi | when you retrn a prmoise from an async function the return values not a promise right? | 00:22 | |
meaning like | |||
00:23
markoong left
|
|||
Kaiepi | m: sub foo { Promise.start({ 1 }) }; sub bar(Promise $b --> Int) { bar(foo: 1) } | 00:23 | |
camelia | ( no output ) | ||
Juerd | Kaiepi: Er, several things are wrong with that line. You're never calling any of the functions, and you're calling bar with an invocant while it's a regular sub. | 00:25 | |
Kaiepi | yeah ik i fucked up that | ||
lemme write an example at works | 00:26 | ||
Juerd | Well, the latter doesn't actually happen because it's in the definition of bar, which is never called. | ||
I don't understand your question either | |||
I think it's missing at least a verb. | |||
lookatme | :) | 00:27 | |
Kaiepi | yeah probably | 00:28 | |
ok so the quesiton is | |||
in node functions return promises | 00:29 | ||
except async functions, who return the awaited result | |||
so when i return a promise from an async function, does that also resolve the promise? | |||
raschipi | There's no "async functions". | 00:30 | |
Kaiepi | ohhhh right | ||
i forgot about that | |||
lookatme | what's async function | ||
Kaiepi | good riddance tbh | ||
timotimo | lookatme: a function you're allowed to use "await" in | ||
Kaiepi | async functions in node nad python lock you ino using await and async only there | 00:31 | |
raschipi | wut? | ||
Kaiepi | yeah | ||
end result: async function spaghetti | 00:32 | ||
being able to use async stuff however you please is a godsend after fighting with node's ideas of async stuff | 00:33 | ||
lookatme | m: sub foo { Promise.start({ 1 }) }; sub bar(Promise $b --> Int) { await bar(foo) }; say bar; | 00:34 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Calling bar() will never work with declared signature (Promise $b --> Int) at <tmp>:1 ------> 3ise $b --> Int) { await bar(foo) }; say 7⏏5bar; |
||
lookatme | :) oh I am foolish | ||
00:35
ohmysummmer joined
|
|||
lookatme | m: sub foo { Promise.start({ 1 }) }; sub bar(Promise $b --> Int) { await $b; }; say bar foo; | 00:35 | |
camelia | 1 | ||
00:42
ohmysummmer left
00:47
lizmat left
|
|||
b2gills | There's a syntactic shortcut for `Promise.start({…})`, and it is `start` | 01:02 | |
m: sub foo { start 1 }; sub bar(Promise $b --> Int) { await $b; }; say bar foo; | |||
camelia | WARNINGS for <tmp>: 1 Useless use of constant integer 1 in sink context (line 1) |
||
Kaiepi | one thing i love about promises in perl 6 is how they're threaded | 01:04 | |
b2gills | m: sub foo { my $ = start 1 }; sub bar(Promise $b --> Int) { await $b; }; say bar foo; # the above shouldn't have warned | ||
camelia | 1 | ||
Kaiepi | still have flashbacks of hunting down obscure race conditions form node's event leep | ||
plus mutexes for when all else fails | 01:05 | ||
b2gills | If you create a Promise by calling .new, they are not threaded | ||
Kaiepi | i was usuing Promise.start | ||
actually wait i've been using it where single threaded work would be what i need | 01:07 | ||
b2gills | There is never a reason to use Promise.start, just use start | ||
Kaiepi | do they differ or is it just a style thing? | ||
b2gills | m: sub f () { start sleep(1), 42 }; say await f(); say now - $*INIT-INSTANT | 01:08 | |
camelia | (Nil 42) 1.0720169 |
||
timotimo | i'd like to advocate against conflating promises with the tasks they represent | 01:09 | |
Kaiepi | wdym? | ||
timotimo | well, "Promise.start" really just gives you a promise object that will at one point be kept or broken by some piece of code scheduled on a scheduler | 01:11 | |
Kaiepi | yeah | ||
timotimo | that's like saying "run this array for me, please" when you call a function that pushes values into the array | ||
the magic isn't the array, the magic is the function that does something to it | |||
Kaiepi | i'm aware | 01:12 | |
b2gills | m: sub start ( &c ) { my $p = Promise.new; $*SCHEDULER.cue({ $p.keep( c() ) }); $p }; say await start( { sleep 1; 42 }) | ||
camelia | 42 | ||
Kaiepi | my minn's still suck on how node handles promises | 01:13 | |
which tbf isn't the most well designed way of dealing with async the way it was handled | 01:14 | ||
Zoffix | What's a better designed way? | 01:15 | |
Kaiepi | perl6's ;) | ||
Zoffix | Ah :) | ||
Kaiepi | node's leads to endless promise chains and async/await spagehetti | ||
timotimo | but async/await is supposed to get you away from chains and such? | 01:16 | |
i have yet to try what node offers, fwiw | |||
Kaiepi | yes and now | ||
async functions tend to force you to use other async functions since there's no way to await a promise outside them | 01:17 | ||
timotimo | oh, that was the whole topic of the conversation above, wasn't it | ||
Kaiepi | the point is yeah timitimu | ||
honesly node isn't *awful*, but it does have a lot of quirds | 01:19 | ||
s/quar(d)s/quar\1ks/ | |||
01:20
comborico1611 left
|
|||
Kaiepi | node let's you make linked lists | 01:20 | |
the caveat is you need to hack around with classes until you end up with something the npm might praise | 01:22 | ||
raschipi | Why would that be any different in Perl 6? | ||
Kaiepi | because what you do is you overwrite the prototype of three classes so they end up becoming chained together | 01:23 | |
along with some constructor fuckery | 01:24 | ||
it's normally stuff that's heavily discourages practive, but hey js has linked lists | |||
raschipi | That doesn't sound pleasant. | ||
And "classes" are hashes, isn't it? | 01:25 | ||
timotimo | sorry, i don't understand :) | ||
Kaiepi | classes are functions in a dress | ||
timotimo | yeah, it's a cool concept to use closures for that purpose | ||
raschipi | Perl 5 is that way, using one thing as another, and TimToady explicitly rejected it for Perl 6. | 01:26 | |
Zoffix | yey, modafuka... I got logs mapper working | 01:35 | |
Kaiepi | i need to learn perl 5 at some point | 01:36 | |
Zoffix | Check it out. What does this commit point to? github.com/perl6/doc/commit/792e1f...5d543513e4 | ||
irclog.perlgeek.de/perl6/2018-05-23#i_16195729 eh? | |||
irc.perl6.party/perl6/2018-05-23#i_16195729 then this is it | |||
raschipi | Zoffix++ | 01:37 | |
🎉🎉🎉 | 01:38 | ||
Kaiepi | do supplies work sort of like event emitters? | 01:39 | |
i've worked channels and promises, but i was a little confused reading about them | 01:40 | ||
raschipi | A Supply is like a Seq, but you don't know when the values wwill come. | 01:45 | |
Zoffix | In fact, if you add 69.164.222.157 irclog.perlgeek.de to /etc/hosts and then add browser exception for the cert, simply clicking on the links will lead to right place: irclog.perlgeek.de/perl6/2018-05-23#i_16195729 | 01:47 | |
01:55
MasterDuke_ joined
01:57
MasterDuke left
01:59
MasterDuke_ is now known as MasterDuke
02:01
wamba left
|
|||
Kaiepi | how do they differ from channels raschipi ? | 02:09 | |
raschipi | In a Supply, everyone listening will get a notification. In a Channel, just one of the readers will get the message. | 02:11 | |
Zoffix | New blog post: "How To Make Old #perl6 IRC Log Links Work": rakudo.party/post/How-To-Make-Old-...Links-Work | 02:13 | |
Kaiepi | ok i think i understand now | 02:14 | |
thanks | |||
02:29
hythm_ joined
02:39
uzl left
02:45
Zoffix left
03:00
Xliff joined
03:05
MasterDuke left
03:06
hythm_ left
03:18
MasterDuke joined
03:29
raschipi left
03:47
eliasr left
04:05
molaf joined
04:12
kurahaupo_ joined
04:13
kurahaupo left,
kurahaupo_ left,
kurahaupo joined
|
|||
buggable | New CPAN upload: Magento-0.0.2.tar.gz by SACOMO modules.perl6.org/dist/Magento:cpan:SACOMO | 04:34 | |
04:38
Xliff left
04:43
[Sno] left
04:50
molaf left
04:52
|oLa| joined
04:57
curan joined
05:05
espadrine left
05:10
ufobat_ joined
05:17
epony left
05:21
jmerelo joined
05:28
robertle left
05:29
domidumont joined
05:34
epony joined
05:36
domidumont left
05:37
domidumont joined
05:46
[Sno] joined
|
|||
Geth | doc/master: 4 commits pushed by (JJ Merelo)++ | 05:51 | |
jmerelo | squashable6: status | 05:54 | |
squashable6 | jmerelo, Next SQUASHathon in 29 days and ≈4 hours (2018-07-07 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
05:58
Kaiepi left
05:59
lizmat joined
06:04
Kaiepi joined
06:08
mcmillhj joined
06:11
kurahaupo left
06:12
lizmat left
06:13
mcmillhj left
06:17
xtreak joined
06:18
domidumont left
06:23
Xliff joined,
kurahaupo joined
|
|||
Xliff | \o | 06:23 | |
yoleaux | 30 May 2018 05:31Z <moritz> Xliff: you might be interested in the cro HTTP client: cro.services/docs/intro/http-client | ||
Kaiepi | i never had to use grammars for anything up to now and damn | 06:28 | |
never thought i'd parse an entire protocol with regeex | 06:29 | ||
moritz | it's more than just regex :-) | 06:30 | |
06:35
robertle joined
06:38
HaraldJoerg joined
06:42
darutoko joined
07:12
Xliff left
07:32
wamba joined
07:36
zakharyas joined,
mephinet left,
mephinet joined
07:47
zakharyas left,
zakharyas joined
07:48
scimon joined
07:53
dakkar joined
07:56
psychoslave joined
08:02
wamba left
08:17
lizmat joined
08:23
xtreak left
08:24
xtreak joined
08:28
xtreak left
08:30
domidumont joined
08:37
epony left
|
|||
lookatme | Is the macro feature available now ? | 08:44 | |
08:45
xtreak joined
|
|||
moritz | not really | 08:48 | |
lookatme | oh, do you know what's the plan ? | 08:51 | |
moritz, :) | |||
gfldex | .seen masak | 08:52 | |
yoleaux | I saw masak 5 Jun 2018 12:48Z in #perl6: <masak> to be honest this feels much better | ||
gfldex | lookatme: I don't know what the plan is but I can tell you it is hatched here: github.com/masak/007/ | 08:54 | |
lookatme | hmm, I know this project | ||
thanks anyway | |||
Geth | doc/master: 4 commits pushed by (JJ Merelo)++ | 08:57 | |
09:00
rindolf joined
09:01
zakharyas left
|
|||
AlexDaniel | Zoffix++ | 09:05 | |
awesome temporary solution | 09:06 | ||
09:08
sftp joined
09:09
mcmillhj joined,
xtreak left
09:13
mcmillhj left
09:33
eliasr joined
09:37
xtreak joined,
w_richard_w left
09:52
jkramer left
09:57
llfourn left
10:03
wamba joined,
zakharyas joined
10:07
parv joined
10:08
parv left
10:44
epony joined
10:54
Kaiepi left
10:59
zakharyas left
11:00
sacomo joined
11:14
lizmat left
11:17
lizmat joined
|
|||
jmerelo | This is an issue that has arisen a couple of times in StackOverflow stackoverflow.com/questions/507231...-in-perl-6 | 11:28 | |
Is there no way to declare an CArray with a particular size? I have seen you can allocate after declaring it, but not when declaring... | 11:37 | ||
11:40
raschipi joined
11:50
itaipu joined
12:06
Hor|zon left
12:07
jkramer joined
|
|||
jkramer | m: constant %foo = asd => 123, yxc => 456; | 12:08 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Type check failed in constant declaration of %foo; expected Associative but got List (List) at <tmp>:1 ------> 3constant %foo = asd => 123, yxc => 4567⏏5; expecting any of: pos… |
||
jkramer | m: my %foo = asd => 123, yxc => 456; | ||
camelia | ( no output ) | ||
12:08
mcmillhj joined
|
|||
jkramer | Why doesn't this assignment work with constant? | 12:08 | |
12:08
shlomif joined
12:09
rindolf left
12:10
mahafyi joined
12:11
Zoffix joined
|
|||
Zoffix | AlexDaniel: what do you mean by temporary? What's the permanent solution, given the original logged data isn't available? | 12:11 | |
12:12
shlomif is now known as rindolf
|
|||
Zoffix | jkramer: it will in a month, but for now you need to explicitly give it a Hash | 12:12 | |
El_Che | Zoffix: do you intend to offer a solution for the historical data or for future logs? Some people expressed reservations about the second | ||
Zoffix | m: constant %foo = %(asd => 123, yxc => 456); dd %foo | ||
camelia | Hash % = {:asd(123), :yxc(456)} | ||
Zoffix | El_Che: we already have a solution for future logs. It was in place for 13 years | 12:13 | |
colabti.org/irclogger/irclogger_log...06-07#l245 | |||
El_Che | i heard for the first time here | 12:15 | |
12:15
n1ge left
|
|||
Zoffix | Which is how my mapper is able to map virtually all #perl6 log links | 12:18 | |
El_Che | great job | ||
12:23
APic joined
|
|||
raschipi | The channel will continue to be public and logged throught colabti, that isn't supposed to change. | 12:27 | |
El_Che | public and logging are not related at all | 12:28 | |
raschipi | Right, that's why I specified both. And being public means logged in practice, because someone will log it. Being a "logged" channel means that the logs are published. | 12:29 | |
jkramer | Zoffix: Thanks | 12:34 | |
12:35
n1ge joined
|
|||
El_Che | raschipi: that does not makes any sense to me | 12:35 | |
raschipi | Sorry, I probably can't explain myself very well. | 12:36 | |
12:36
Kaiepi joined,
n1ge left
|
|||
El_Che | you can log and publish private channels | 12:36 | |
or mine the information | |||
12:36
n1ge joined
|
|||
El_Che | and you can have public interactions without begin logged/filmed/etc | 12:37 | |
they public and monitoring can be combined, but one does not depend on the other | |||
mahafyi | hello. I have some questions that are probably off topic. I would like to start using a database with some scripts. since i have to choose a database, i see strong recommendations for postgresql over mysql (mariadb in debian). there is no specific application just exploring it. Also, whatever be the DB, i am starting from scratch, so feel free to recommend your choice :).i would like to end... | 12:41 | |
...up building a web application at some point. | 12:42 | ||
El_Che | mahafyi: make your app db agnostic? | 12:43 | |
mahafyi | El_Che : ok. Heh, I am first of all trying to 'get' sql injection which seems to be a wide spread mistake. Can you point me to some example where i can see what a DB agnostic application looks like? | 12:45 | |
El_Che | mahafyi: whatever uses this and don't use db specific features should do: github.com/perl6/DBIish | 12:46 | |
Zoffix | mahafyi: PostgreSQL is the best. There's a much better module to interface with it than DBIish: modules.perl6.org/dist/DB::Pg:cpan:CTILMES | 12:48 | |
jast | to avoid SQL injection, never just include variables inside your query | 12:49 | |
12:49
xtreak left
|
|||
jast | well-designed DB libraries (almost all of them nowadays) allow you to put placeholders in your query and pass the values for those as separate parameters | 12:50 | |
and then the library will automatically protect you from SQL injection | |||
raschipi | "confirm SSL cert exception, because I couldn't figure out how to make it work with proper SSL" Zoffix, it will never work, that's the king of thing SSL is supposed to make impossible in the first place. | ||
Just turn SSL off, better than adding exceptions, which is not recommended. | 12:51 | ||
El_Che | are you recommending to turn ssl off? | ||
if the lib does not support ssl it's better not to use it | 12:52 | ||
it's 2018 | |||
it was bad advise in 1994 | |||
Zoffix | mahafyi: and don't bend over backwards for "db agnostic". In my experience, if you have such a drastic change that you're forced to change the type of database is very rare and changing a few lines of db code will be a drop in the bucket compared to all the other things you'll likely be forced to do | ||
raschipi | Yes I am recommending turning TLS off, because it's part of best practices. | ||
El_Che | Zoffix: mahafyi: it depends where your app is supposed to run | 12:53 | |
Zoffix | I can't turn it off, because the URLs are https:// URLs | ||
raschipi | Using self-signed or invalid certs is worse than turning TLS off. | ||
El_Che | if it's a personale app for your vps it does not matter | ||
jast | agreed, DB agnostic code is really only worth it for software you're writing for the greatest common denominator (stuff random people will install in random environments) | ||
El_Che | if other people have to run it it does. A lot of places, pick 1 db and offer a high available setup for the devs | ||
jast | if you control the environment, pick a good DB and use its features :) | ||
12:53
xtreak joined
|
|||
El_Che | (where I work we have mysql and oracle) | 12:54 | |
you can run your own db, but you'll be playing dba on tv during its lifetime | |||
mahafyi | Zoffix : El_Che: jast: very good, postgres it is... does the DB::Pg connect over TLS also when db server is remote? | 12:55 | |
El_Che | and I agree about posgresql, but having other people doing the admin job trumps that | ||
mahafyi: if you want to learn about dbs, Zoffix advice makes sense as it's less abstraction | 12:56 | ||
jast | from an admin POV I don't like opening DB ports to the public, I tend to tunnel through an encrypted VPN and use unencrypted DB traffic inside that | ||
mahafyi | right , seeing that will start from select * from table where column = $var, lol. | 12:57 | |
jast | but of course TLS easily beats nothing :) | ||
El_Che | tls helps against the enemy inside the walls :) | ||
mahafyi | jast: oh ok, that i see is a good way | ||
Zoffix | mahafyi: you got SQL injection right there :) What if $var has `''; drop table` in it? | ||
El_Che | you'll have smaller backups? | 12:58 | |
jast | a.k.a. the gitlab database compression technique :) | ||
mahafyi | Zoffix : what did jast mean by using a placeholder ? can you please show how it works for a simple query to start with? | 12:59 | |
Zoffix | mahafyi: it'd be `'select * from table where column = $1', $var` The `$1` is a placeholder and the module will automatically perform all the required quoting of data in the $var, so there's no injection | ||
mahafyi | maybe i should read up first ... | ||
jast | the classic placeholder is '?' (in some libraries), so you're not tempted to think it's a standard variable expansion | ||
pseudocode example: query("select * from foo where name = ?", $name) | 13:00 | ||
Zoffix | mahafyi: that's with DB::Pg module. DBIish uses `?` symbol | ||
for placeholders | |||
jast | and the lib will make '$name' safe and insert it where the placeholder was | ||
mahafyi | ah ok great learning. i suppose all of this is available to read, but getting perl6 example direct is much better | 13:01 | |
jast | sure, there are more articles about this than you can read in a lifetime ;) | ||
most of them saying the same things over and over, of course | |||
we're on the internet after all | 13:02 | ||
Zoffix | mahafyi: here's an example with DBIish module: | ||
mahafyi: github.com/perl6/alerts/blob/maste...m6#L34-L40 | |||
mahafyi | Zoffix : ty | ||
Zoffix | mahafyi: notice the place where'd you normally place values just have ? ? ? in them. And the actual values are given in the next statement. | ||
13:02
zakharyas joined
|
|||
mahafyi | yes, i see that , i mean, i get the syntax. | 13:03 | |
last question (for some time at least, heh), why is the .prepare desirable as oppsed to just running the query (based on the doc in DB:Pg) | 13:04 | ||
jmerelo | mahafyi: you save some time on SQL interpretation. | ||
mahafyi: might be important in complicated queries. | |||
Zoffix | mahafyi: actually, if you're just learning DBs and making small programs for yourself, I have an alternate suggestion: SQLite. Alas, I'm not aware of DB::Pg-quality Perl 6 module for it, so you'd be using DBIish | ||
13:05
jmerelo left
|
|||
Zoffix | mahafyi: it's not really desired in that code. It's just DBIish has a godawful interface (or docs, if I missed an easier way to do it) | 13:05 | |
jnthn has been happily using DB::Pg in production...seems pretty solid as well as a nice API :) | |||
mahafyi | Thanks. i will try Postgres itself | 13:06 | |
Zoffix & | 13:07 | ||
13:07
Zoffix left
|
|||
jast | the main reason to do a prepare is if you're going to reuse the query (even with different values for the parameters) multiple times during the lifetime of the program, because it saves the database a lot of query parsing and optimizing | 13:09 | |
(but you have to make sure to prepare it once, rather than re-preparing it each time, otherwise you don't actually win anything) | 13:10 | ||
AlexDaniel | Zoffix: well, if irc logging is illegal, then colabti will go down also. If it's not, then we can bring the original website back up. So in my mind current redirection is temporary | 13:16 | |
but I'm assuming that the logs were not deleted, which I hope is the case… | |||
I have a backup of pretty much the whole thing though | 13:17 | ||
13:19
raschipi left
13:20
curan left
13:21
ufobat_ left,
raschipi joined
|
|||
raschipi | Not using TLS is recommended over using invalid or self-signed certificates. And offers the same level of protection. | 13:26 | |
jast | except if you have a way to verify the certificate independently | 13:27 | |
mahafyi | to run a html page, we use a webserver - example apache. is there a tutorial for how to run perl6 scripts via browser? is there a web server for serving a perl6 output or we have to use apache , ngnix etc? | 13:28 | |
13:29
skids joined
|
|||
Juerd | raschipi: TLS with a self signed certificate provides much, much better protection than using the same protocol with clear text transfers. | 13:29 | |
raschipi: However, in order to verify that the protection is at all valid, you'd need to check the fingerprint of the certificate. | 13:30 | ||
mahafyi | instead of trying something from the cli (using debian), i thought i can try to open in browser itself. | ||
Juerd | raschipi: And once you're pinning the fingerprint, it offers *superior* protection compared to regular CA signed certificates. | ||
13:30
Zoffix joined
|
|||
jast | wasn't there a way to record your fingerprint in DNS these days? | 13:31 | |
raschipi | Right, using it like PGP does work, but that's very different from asking users to add exceptions. | ||
Zoffix | AlexDaniel: it's not illegal and moritz doesn't want to deal with any potential claims and legal fees. So neither of your alternatives will occur. | ||
raschipi | jast: DANE | ||
Juerd | raschipi: Even with exceptions it's slightly better than ditching TLS altogether | ||
raschipi | It's not because it teraches users to ignore warnings.And with a self-signed certificate, anyone can sign an equivalent certificate and intercept it. | 13:32 | |
AlexDaniel | Zoffix: but then someone else can host it, right? | ||
jast | now I just need to enable DNSSEC in my zones :) | ||
raschipi | teaches* | ||
Juerd | raschipi: Because even having to add a new exception when there's a new certificate because of MITM, that does slightly increase the chance of the MITM being noticed. And of course, the effort that one has to put into MITM or wiretapping is increased much just by having encryption, even if no verification is used. | ||
Zoffix | mahafyi: check out Cro cro.services/ it has a built-in server | 13:33 | |
mahafyi | Zoffix ; thanks | ||
Juerd | raschipi: It definitely depends on the use case, and the kind of user. | ||
raschipi | Noty for normal users, they will just repeat the procedure. For someone who actually understands TLS, sure, but not the case here. | ||
Juerd | raschipi: But with regular nerds as the target audience, opportunistic encryption is better than no encryption. | 13:34 | |
Zoffix | AlexDaniel: "it" is what? Someone else's logs? Moritz doesn't want to give the data from the perlgeek logs | ||
13:34
scimon left
|
|||
raschipi | No, regular nerds have no change of getting it right, I know plenty of them. | 13:34 | |
Juerd | TBH, I think it's wrong for browsers to favor unencrypted over badly encrypted. | ||
jast | not nerdy enough | ||
"no true scotsman" fallacy deployed | |||
13:34
scimon joined
|
|||
Juerd | I'd be fine with them being treated the same if unencrypted got the same big warnigs. | 13:34 | |
jast | vendors are planning that AFAIK | 13:35 | |
AlexDaniel | Zoffix: interesting. Well, I have the data, but I wonder if it can be used… | ||
jast | but honestly I'd find that way too annoying | ||
*personally* I don't mind visiting unencrypted websites for a wide range of purposes | 13:36 | ||
raschipi | Your argument is that the average nerd knows how to check fingerprints and pin certificates. While in my experience the vast majority don't even know how to check SSL/TLS versions and block unsecure options. | ||
Zoffix | mahafyi: and you can then setup apache to reverse-proxy to your app; to whatever port it's running on. Just google for how to do it. Here's a sample of config file for port 80 that has a thing for certbot that'd enable forced-SSH and autogen the config for SSL port : gist.github.com/zoffixznet/4f2a284...096ef54a3b | ||
mahafyi | Zoffix , thanks | 13:37 | |
raschipi | Anyway, if I can be a curmudgeon for a second, please do not teach users to ignore TLS warnings! | ||
Juerd | I'll never teach anyone that | 13:38 | |
AlexDaniel | only up to 2018-04-28 though | ||
Zoffix | raschipi: I'll just ignore your warning. | 13:39 | |
or request, I mean | |||
raschipi | Please do, it's a case of tragedy of the commons after all. | ||
Zoffix | It's more of a case of letting people think for themselves. You're not the King of Internet to tell people what they should do with TLS warnings. | 13:40 | |
raschipi | I'm certainly not, but I can ask for it. | ||
Juerd | If I'm going through the trouble of self signing a certificate, I'll also take some time to instruct users to check the fingerprint. But just going with letsencrypt is much easier. | ||
Zoffix: Then who is? | 13:41 | ||
jast | sure, but telling people that it's a great idea to ignore TLS warnings is basically disinformation | ||
Zoffix | It's not a self-signed cert. The cert is for 6lang.party. I can't get a cert for irclog.perlgeek.de, because I don't own that domain, duh | ||
jast: which isn't what I'm telling people | |||
Juerd | You don't have to own the domain. You only have to successfully mitm it until the certificate is awarded to you. | ||
jast | yeah, I wasn't trying to imply that you were | ||
skids | The warnings presented need to be reworded to be less technical so nontech users understand the stakes. They need to be (re)written by nontechnical users until they get something they like that technical users can approve of. | ||
Juerd | skids: +1 | 13:42 | |
jast | the average person doesn't read the warning in the first place | ||
Juerd | skids: And they should include the damn fingerprints so there's some chance of them being checked | ||
Zoffix | Nor are my instructions for average persons. | ||
jast | case in point: average person tries to use the copier. copier says "hardware fault detected, please contact tech support ASAP". average person mashes "OK" button. | ||
Zoffix | Why am I even in this discussion? Don't like my instructions, write your own. | 13:43 | |
Juerd | skids: I once called my bank, the tax office, and my municipality, to try and verify their certificates. None could transfer me to anyone who understood what a certificate fingerprint was. | ||
Zoffix | Nerds. | ||
13:43
Zoffix left
|
|||
Juerd | Did they just call people in a programming language channel "nerds"? How rude. | 13:43 | |
:D | |||
jast | rudeness is healthy. ;) | ||
13:45
xtreak left
|
|||
raschipi | Any, it was just a PSA, anyone should do what they think is best. | 13:45 | |
jast | no that's wrong, do what you think is worst :P | 13:46 | |
Juerd | I might, but only because worst is Dutch for sausage. | 13:47 | |
jast | boerenmetworst | ||
Juerd | worst case => worst kaas => sausage cheese | 13:48 | |
skids | Zoffix: I meant such instructions in general. I actually have no idea what in particular is being taled about here :-) | 13:49 | |
13:50
itaipu left
|
|||
Juerd | skids: Zoffix left | 13:50 | |
jast | same here... but Zoffix left | ||
13:50
itaipu joined
|
|||
El_Che | Zoffix never really leaves | 13:51 | |
Juerd | El_Che: What does that mean? | ||
El_Che | that his bots ping him | ||
and he joins when desired | |||
Juerd | Oh. Not much point in parting then | ||
Or perhaps just for displaying some drama | 13:52 | ||
13:52
kaare_ joined
|
|||
El_Che | I am an screen+irssi guy, but whatever works for him :) | 13:52 | |
Juerd | I used to run irssi but the da^W^Wweechat had cookies. | ||
skids | No he just leaves routinely. He's entitled to his workflow preferences. | ||
Juerd | I see | 13:53 | |
jast | tmux+irssi > screen+irssi. tools war go! :) | ||
Juerd | jast: tmux doesn't do everything screen does, and I can't be bothered to learn to work with both | ||
jast: But I do know that screen is abandonware (as confirmed irl by one of its authors) | 13:54 | ||
jast | good to know (the latter, I already knew the former) | ||
tmux fits my use cases better so I've phased out screen for myself | |||
Juerd | Had a hard question and he said he wouldn't answer because screen was considered abandonware anyway. But then I showed hem the antique terminal and the hacks we had applied and he did help me with hacking the remaining things. :) | 13:55 | |
jast | that's pretty nice of him | ||
Juerd | Couldn't do the same stuff with the antique terminal with tmux :D | 13:56 | |
skids | .oO(good terminal code is becoming a lost art form) |
13:59 | |
14:00
raynold left
|
|||
El_Che | does tmux fix the horrible edit mode in screen (aka I can't use pgup to scroll back output)? | 14:07 | |
14:09
wamba left
14:11
markoong joined
|
|||
jast | you have to press the hotkey once first | 14:11 | |
AFAIK the problem is that scrolling is a thing handled by your own terminal (emulator) | |||
so your normal scroll function can't scroll a virtual terminal inside your terminal | |||
El_Che | same as screen then | 14:12 | |
(there goes my switching use cae) | |||
case | |||
jast | in fact it doesn't even make sense if you consider that many terminal emulators combine pgup/dn scrolling with a scroll bar | ||
to even address this at all someone would have to invent a terminal scrolling protocol. maybe someone has already done so, I have no idea. :) | 14:13 | ||
14:13
zakharyas left,
zakharyas joined
|
|||
Juerd | It exists but only program to terminal: a program can instruct the terminal to scroll a part of the screen efficiently | 14:14 | |
That's way too limited to implement a scroll bar :D | 14:15 | ||
jast | yeah, that's the extent of what I'm aware off | ||
(also, basic language is failing me. too warm here etc.) | |||
El_Che | jast: are you an AI needed more fans? | 14:16 | |
jast | I am classified as a regular human being, your assumption is incorrect | 14:17 | |
I am typing this with my human fingers | |||
El_Che | sorry to have hurt your human emotions | 14:18 | |
raschipi | As human as Mark Zuckerberg, in fact. | ||
El_Che | data was one of the most human character in star trek :) | ||
jast | you can deinstantiate your failure by making me the overlord of your^Wmy fellow humans | 14:19 | |
14:20
mahafyi left
|
|||
El_Che | jast: I voted for the other guy | 14:20 | |
14:21
mahafyi joined
14:34
itaipu left
14:36
scovit joined
14:39
kurahaupo left
14:40
kurahaupo joined
14:48
troys joined
14:56
Schepeers left
14:59
Schepeers joined
15:09
robertle left
15:14
raiph joined
15:15
wamba joined
15:18
n1ge left
15:19
n1ge joined
15:20
kurahaupo_ joined
15:21
kurahaupo left
15:22
kurahaupo_ left,
kurahaupo joined
15:26
kurahaupo left,
kurahaupo joined
15:30
jmerelo joined
15:34
domidumont left
15:41
Luc__ joined,
n1ge left,
n1ge joined
15:42
mcmillhj left,
Luc__ left,
mcmillhj joined
15:46
psychoslave left
15:47
mcmillhj left
15:49
Schepeers left
15:51
Schepeers joined
16:29
mcmillhj joined
16:32
scimon left
|
|||
buggable | New CPAN upload: IConv-0.0.2.tar.gz by ALOREN modules.perl6.org/dist/IConv:cpan:ALOREN | 16:34 | |
16:40
hlafarge joined
16:42
dakkar left
16:45
molaf joined
16:47
hlafarge left,
stee3 joined
16:50
stee left
16:52
stee joined
16:55
stee3 left
16:58
raiph left
17:04
robertle joined
17:06
zakharyas left,
zakharyas joined
17:26
Khisanth left
17:30
domidumont joined
17:37
[Sno] left
17:40
Khisanth joined
17:57
Tison joined
18:02
espadrine joined
18:04
zakharyas left
|
|||
Kaiepi | does perl let you use grammars within other grammars? | 18:06 | |
timotimo | you can either use a rule from another grammar like a regular rule by putting <Grammar::Name::rule>, or you can use other grammar stuff inside code blocks, just make sure $/ is writable in the right place | 18:07 | |
Kaiepi | ah, perfect | 18:08 | |
thanks | |||
timotimo | if you literally OtherGrammar.parse inside a code block in your grammar, you'll surely want to use your current match's position as a start point or something like that | ||
b2gills | a grammar is just a special type of class, which means you can use inheritance, and compose in roles with tokens | ||
timotimo | that's usually more useful, yeah | 18:14 | |
Kaiepi | wait you can compose in roles with tokens? | 18:23 | |
timotimo | yup | 18:24 | |
Kaiepi | that might be really useful for what i'm doing | 18:25 | |
18:25
sauvin left
|
|||
moritz | there's, like, a whole book that discusses this kind of stuff :-) | 18:27 | |
b2gills | In Perl 6 a [regex|token|rule] is just a sub type of method written in a domain specific sub language | ||
timotimo | which also means you can use methods written in regular old perl6, but it's interesting | ||
Kaiepi | i've heard they're really powerful, but i haven't had the chance to use them since i'd been working on nativecall stuff before | 18:28 | |
b2gills | My go-to example for what a grammar can look like is JSON::Tiny::Grammar github.com/moritz/json/blob/master...Grammar.pm | 18:30 | |
mahafyi | in DB:Pg my $pg = DB::Pg.new; # You can pass in connection information if you want. | 18:31 | |
But i need an example here please.. how to pass the connection info. | |||
18:32
lizmat left
|
|||
raschipi | b2gills: Is that a complete grammar for JSON? | 18:32 | |
b2gills | There may still be some edge cases it doesn't properly handle, but yeah it is complete. | 18:34 | |
raschipi | wow | ||
Kaiepi | what i'm doing is writing a telnet library | ||
jnthn | mahafyi: It needs a connection string passed as the conninfo parameter, here's an example from one of my apps that constructs it from env vars: gist.github.com/jnthn/b5168f761165...f3f51e8790 | 18:35 | |
b2gills | Kaiepi: Note the use of `proto token` in the above grammar. I don't know if it would be helpful for what you are doing, but it is a very nice feature. | 18:36 | |
jnthn | dinner, bbl | 18:37 | |
mahafyi | jnthn: perfect. i was reading www.postgresql.org/docs/current/st...CONNSTRING but couldnt figure how to pass it | ||
Kaiepi | it definitely will | ||
jnthn | mahafyi: Yeah, the docs could probably use a better example; I thought to send a PR but was in a bit of a hurry with the thing I was building. :) | ||
mahafyi: I'm sure a pull request with a doc improvement there, if you're intersted to do it, would be welcomed ;) | 18:38 | ||
*:) | |||
jnthn really goes to eat :) | |||
Kaiepi | 16 commands, ~200 subcommands, and even more at a lower lever in some places | ||
it'd make parsing much less hell | |||
18:39
darutoko left
|
|||
mahafyi | jnthn : ok i will try and do it (also requires learning how to do that, in the first place). | 18:40 | |
b2gills | Note that `( "a$_" with $foo )` checks if `$foo` is defined. If it is it does the first part. If it isn't the whole expression returns Empty (empty slip) | ||
Basically with the example provided above it doesn't provide a password if there isn't a DB_PASSWORD in the environment. | 18:43 | ||
18:47
lizmat joined
|
|||
Geth | doc: 918f4820b4 | 陈梓立++ (committed using GitHub Web editor) | README.zh.md Update README.zh.md |
18:50 | |
mahafyi | ah ok, i think i figured out how to do a pull request now. | 18:58 | |
and added one, to add the example given by jnthn | 18:59 | ||
19:01
Khisanth left
19:07
domidumont left
19:13
imcsk8 left,
imcsk8 joined
19:15
jmerelo left
19:16
Khisanth joined
19:24
mcmillhj left
19:29
[Sno] joined
19:33
mcmillhj joined
19:47
zakharyas joined
19:50
mahafyi left
19:52
dct joined
|
|||
moritz | $ docker pull croservices/cro-http | 19:54 | |
Using default tag: latest | |||
Error response from daemon: manifest for croservices/cro-http:latest not found | |||
what am I doing wrong? if I understood github.com/croservices/cro/blob/ma...loyment.md correctly, that should work, no? | |||
19:55
mcmillhj left
|
|||
jnthn | moritz: Ah, we only publish versioned ones so far | 19:57 | |
No :latest | |||
The example has a version in there and "Always use a versioned base image rather than :latest | 19:58 | ||
" | |||
Is there somewhere else to clarify it that'd help? | |||
moritz | jnthn: that's under "Tips", which I understood to be "you *can* use latest, but you *shouldn't*" :-) | 19:59 | |
jnthn | Ah :) | ||
Yeah, it's not even an option at the moment I guess | |||
Perhaps we should push a :latest as well | |||
moritz | or add a comment that there is no :latest, and instead link to [the list of available tags](hub.docker.com/r/croservices/cro-http/tags/) | 20:00 | |
jnthn | *nod* | ||
github.com/croservices/docker/blob...-images.p6 would be the script to patch to push a latest | |||
(If you're sufficiently keen to patch it, that is... :)) | |||
We should really make links to that page anyway | |||
moritz | I'll add some | 20:01 | |
20:01
mcmillhj joined
|
|||
jnthn | moritz++ # thanks! | 20:02 | |
I was about to make an issue to not forget it (gotta go afk in a moment), but if you'll sent a patch that's even better :) | |||
moritz | github.com/croservices/cro/pull/71 | 20:06 | |
20:10
uzl joined
|
|||
rindolf | moritz: hi, sup? | 20:28 | |
jnthn: sup/ | |||
20:28
kurahaupo_ joined
20:30
kurahaupo left
|
|||
uzl | Hi to everybody! | 20:33 | |
AlexDaniel | hello! | ||
uzl | yesterday I posted about an example of a JSON grammar in Think Perl 6 and in the next section, the author adds an actions class to it and it's not working as expected for me. | ||
the example in the book: shorturl.at/HRWX8 | 20:34 | ||
20:34
psychoslave joined
20:35
kurahaupo_ left,
kurahaupo joined
|
|||
moritz | uzl: token string needs a pair of parenthesis for $0 to work in the string action method | 20:36 | |
token string { \" ( <[ \w \s \- ' ]>+ ) \" } | |||
with that modification, I get this output: | |||
{dob => {day => 9, month => 11, year => 1934}, lastName => Sagan, name => Carl, occupations => [atronomer author lecturer]} | |||
uzl | moritz: Wow, that was so simple! | 20:37 | |
moritz: Thanks! | |||
moritz | uzl: you're welcome | 20:39 | |
uzl | moritz: does that mean that $0 in the method string is making a reference to the capture group in token string? | ||
20:39
wamba left
|
|||
moritz | uzl: correct | 20:40 | |
20:40
wamba joined
|
|||
uzl | moritz: awesome! | 20:40 | |
moritz | uzl: if you want an even deeper dive into regexes and grammars, there's smile.amazon.com/dp/1484232275/ | 20:43 | |
20:46
damnlie left
20:47
damnlie joined
|
|||
rindolf | uzl: hi | 20:47 | |
20:49
comborico1611 joined,
Possum joined
20:52
comborico1611 left,
zakharyas left
|
|||
uzl | moritz: I'll take a look at it. Thanks! | 20:53 | |
rindolf: hello! | |||
21:02
skids left
21:06
mcmillhj left
21:09
Xiti joined,
Xiti left
21:11
Xiti joined,
Xiti left
21:16
raschipi left
21:24
rindolf left
21:31
uzl left
21:41
mcmillhj joined
21:43
epony left
21:46
mcmillhj left
21:52
Xliff joined
|
|||
Geth | doc: kjkuan++ created pull request #2094: Fix missing nodejs dependency in the Dockerfile. |
21:54 | |
22:00
wamba left
22:02
molaf left
22:06
dct left
22:13
psychoslave left,
psychoslave joined
22:19
psychoslave left
22:25
raynold joined
22:26
robertle left
22:32
mcmillhj joined
22:37
mcmillhj left
22:43
HaraldJoerg left
23:06
mcmillhj joined
23:10
mcmillhj left
23:14
markoong left
23:18
comborico1611 joined
23:19
kurahaupo left,
kurahaupo joined
23:20
mcmillhj joined
23:25
mcmillhj left
23:30
[particle]1 joined
23:32
mcmillhj joined
23:33
[particle] left
23:37
mcmillhj left
23:44
Kaiepi left
23:59
mcmillhj joined
|