!EtGqjSRNQoJCbpCJSF:matrix.org

Nim programming language

7812 Members
Official Matrix channel for the Nim programming language. This channel is bridged with our main Discord and Gitter channels.96 Servers

Load older messages


SenderMessageTime
27 May 2024
@elegantbeef:matrix.orgElegantbeef of is for runtime checking 09:04:58
@_discord_709044657232936960_=50=4dunch=5b=49=52=43=5d:t2bot.ioPMunch[IRC]#0000 Of! 09:04:58
@_discord_709044657232936960_=50=4dunch=5b=49=52=43=5d:t2bot.ioPMunch[IRC]#0000 I was trying with is 09:05:06
@_discord_961485620075720734:t2bot.ionnsee can you explain to me like i'm 5 09:07:10
@_discord_961485620075720734:t2bot.ionnsee what this does or why i would want to use this 09:07:26
@_discord_217459674700578816:t2bot.ioalbassort you guys might find this funny 09:07:36
@_discord_217459674700578816:t2bot.ioalbassort so gpgme is the high level implementation of gnupg 09:07:47
@_discord_217459674700578816:t2bot.ioalbassort
parms = """<GnupgKeyParms format="internal">
Key-Type: RSA
Key-Length: 2048
Subkey-Type: RSA
Subkey-Length: 2048
Name-Real: Joe Tester
Name-Comment: with stupid passphrase
Name-Email: joe+gpg@example.org
Passphrase: Crypt0R0cks
Expire-Date: 2020-12-31
</GnupgKeyParms>
"""

with gpg.Context() as c:
    c.set_progress_cb(gpg.callbacks.progress_stdout)
    c.op_genkey(parms, None, None)
    print("Generated key with fingerprint {0}.".format(
        c.op_genkey_result().fpr))
09:08:14
@_discord_217459674700578816:t2bot.ioalbassort *
parms = """<GnupgKeyParms format="internal">
Key-Type: RSA
Key-Length: 2048
Subkey-Type: RSA
Subkey-Length: 2048
Name-Real: Joe Tester
Name-Comment: with stupid passphrase
Name-Email: joe+gpg@example.org
Passphrase: Crypt0R0cks
Expire-Date: 2020-12-31
</GnupgKeyParms>
"""

with gpg.Context() as c:
    c.set_progress_cb(gpg.callbacks.progress_stdout)
    c.op_genkey(parms, None, None)
    print("Generated key with fingerprint {0}.".format(
        c.op_genkey_result().fpr))
09:08:20
@elegantbeef:matrix.orgElegantbeef nnsee inside other code like concepts 😄 09:08:22
@_discord_217459674700578816:t2bot.ioalbassort it takes XML as input 09:08:32
@elegantbeef:matrix.orgElegantbeef https://github.com/beef331/traitor/blob/master/traitor.nim#L99-L108 09:08:37
@elegantbeef:matrix.orgElegantbeeffor instance09:08:39
@_discord_961485620075720734:t2bot.ionnsee fascinating 09:13:15
@_discord_961485620075720734:t2bot.ionnsee i wouldn't say i'm a heavy user of concepts either 09:13:26
@_discord_961485620075720734:t2bot.ionnsee i just... don't write code like that 09:13:40
@_discord_961485620075720734:t2bot.ionnsee i'm a bit too stupid for that 09:13:47
@_discord_709044657232936960_=50=4dunch=5b=49=52=43=5d:t2bot.ioPMunch[IRC]#0000 Does anyone know of a simple utility to run a program multiple times and get the average runtime? 09:22:14
@_discord_709044657232936960_=50=4dunch=5b=49=52=43=5d:t2bot.ioPMunch[IRC]#0000 Just some very light benchmarking 09:22:25
@elegantbeef:matrix.orgElegantbeefhyperfine09:24:58
@_discord_961485620075720734:t2bot.ionnsee +1, hyperfine does exactly what you want 09:27:05
@_discord_961485620075720734:t2bot.ionnsee i love hyperfine 09:27:21
@elegantbeef:matrix.orgElegantbeefIt's hyper fine09:27:28
@_discord_709044657232936960_=50=4dunch=5b=49=52=43=5d:t2bot.ioPMunch[IRC]#0000 Ah, exactly what I need! 09:27:34
@_discord_682074095168520244:t2bot.iogoerge_lsd is it possible to call an iterator to yield just one value, not in a for loop ? 09:39:36
@_discord_259277943275126785:t2bot.ioodexine If the iterator is declared as a closure 09:40:05
@_discord_259277943275126785:t2bot.ioodexine Otherwise you’re gonna need a for loop in any case 09:40:27
@_discord_682074095168520244:t2bot.iogoerge_lsd I was thinking to wrap building a file checksum sequentially with HashContext living inside the iterator, and calling it with the next data, although now that I think of it, not sure it makes much sense 09:42:10
@bglm:matrix.org@bglm:matrix.org left the room.10:13:43
@_discord_682074095168520244:t2bot.iogoerge_lsd hey ElegantBeef and ElegantBeef APP, based on your previous suggestion, would something like this be a good idea/work ? https://play.nim-lang.org/#pasty=YWxtyBKs I am having trouble figuring out the generics syntax when returning this very generic object. Or if it's even possible 10:44:27

There are no newer messages yet.


Back to Room ListRoom Version: