00:21:02 | * | jay-tuckey joined #nim |
00:23:08 | FromDiscord | <michaelb.eth> I have an array of `int` and I'm shifting contiguous members, e.g. what's in indexes 2..5 gets copied into indexes 4..7.↵↵Currently I'm using `for`/`countdown` and it works fine, but maybe there's a faster way? |
00:26:35 | FromDiscord | <Elegantbeef> using `a[b .. b + size] = a.toOpenArray[c, c + size]` might be faster |
01:19:26 | * | krux02 quit (Remote host closed the connection) |
01:20:14 | * | krux02 joined #nim |
01:50:55 | FromDiscord | <guttural666> how do I get basic comparison operators to work with distinct types, like distinct int? may be my problem here (getting a type mismatch error) https://media.discordapp.net/attachments/371759389889003532/1176701310880460950/image.png?ex=656fd37e&is=655d5e7e&hm=da4b278fb458627623e8ed19284a8a0ea8ca17adc68cfe1022b3c123ab5228c2& |
01:52:05 | FromDiscord | <guttural666> actually I'm not sure what the problem is |
01:53:10 | FromDiscord | <demotomohiro> You can borrow `inc` or `!=` for int.↵They are defined in system module. |
01:55:00 | FromDiscord | <guttural666> so what does one do? implement != for distinct ints? |
01:55:18 | FromDiscord | <guttural666> oh you CAN |
01:55:21 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/system.html#%21%3D.t%2Cuntyped%2Cuntyped↵Just borrow `==` and you can do `!=`. |
01:56:05 | FromDiscord | <guttural666> how do I borrow |
01:56:23 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#distinct-type-modeling-currencies |
01:57:18 | FromDiscord | <guttural666> aahhh, thanks didn't even know about this at all |
02:10:43 | FromDiscord | <guttural666> don't get how this is supposed to work https://media.discordapp.net/attachments/371759389889003532/1176706292937658449/image.png?ex=656fd822&is=655d6322&hm=1d6fa2bfd7efd4b93459f853bedb049ac6a7cd0a53b8ee63b7618d9a04a136b4& |
02:11:40 | FromDiscord | <guttural666> and why this should not work by default, what's the point in having distinct types if they are a pain in the ass |
02:16:03 | FromDiscord | <demotomohiro> `!=` is a template https://nim-lang.org/docs/system.html#%21%3D.t%2Cuntyped%2Cuntyped↵It should get `!=` if you borrow `==`. |
02:16:36 | FromDiscord | <guttural666> hmm |
02:18:34 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#types-distinct-type |
02:19:41 | FromDiscord | <demotomohiro> Distinct type create a new type and it might work differently from base type. |
02:20:19 | FromDiscord | <ElegantBeef> Damn bridge down 😄 |
02:20:21 | FromDiscord | <guttural666> yeah, but I wonder why they don't "inherit" all the functionality by default and just let users override it if necessary |
02:20:27 | FromDiscord | <ElegantBeef> Cause that's not distinct |
02:20:32 | FromDiscord | <ElegantBeef> that's a form of 'weak distinct' |
02:21:08 | FromDiscord | <guttural666> well it at least forces you to explicitly cast, and it adds a bit of expressiveness |
02:21:56 | FromDiscord | <ElegantBeef> The point is that the internal storage is the same but the interface is not |
02:22:02 | FromDiscord | <ElegantBeef> you can make converters to emulate weak distincts |
02:22:39 | FromDiscord | <guttural666> hmm |
02:22:53 | FromDiscord | <guttural666> probably makes sense |
02:23:18 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=4M6I |
02:23:58 | FromDiscord | <guttural666> going to prefer the :%s/Base/int conversion right now 😄 |
02:27:13 | FromDiscord | <guttural666> but I think I understand the reasoning, so thanks |
02:39:44 | * | jay-tuckey quit (Ping timeout: 256 seconds) |
03:16:43 | * | edr quit (Quit: Leaving) |
03:25:22 | * | rockcavera quit (Remote host closed the connection) |
03:32:06 | * | krux02 quit (Remote host closed the connection) |
03:47:19 | * | derpydoo quit (Ping timeout: 276 seconds) |
04:51:29 | * | jay-tuckey joined #nim |
06:08:17 | FromDiscord | <Chronos [She/Her]> In reply to @guttural666 "and why this should": Type safety perhaps |
06:53:41 | * | redj joined #nim |
06:54:27 | * | advesperacit joined #nim |
07:33:00 | * | PMunch_ is now known as PMunch |
07:36:16 | PMunch | As a counter point, what's the point of having distinct types if they are the same as the base type? |
07:36:50 | PMunch | The whole point of distinct types is that they share the same storage type as their base, but come with different semantics |
07:38:07 | * | om3ga quit (Read error: Connection reset by peer) |
07:38:43 | PMunch | For example let's say you have a `type Timestamp = distinct uint`, it probably doesn't make sense to do `myTimestamp div 2`, and at the same time it doesn't make sense to have `myInt += 10.seconds`. But `myInt div 2` makes sense, and so does `myTimestamp += 10.seconds`. These are types with different semantics, but which both share the same storage type |
07:40:12 | FromDiscord | <Elegantbeef> Weak distincts are a nice premise |
07:40:53 | FromDiscord | <Elegantbeef> Where you want to prevent implicit conversions to the type, but want to have all the operations of the parent |
07:42:02 | * | om3ga joined #nim |
07:42:51 | * | jmdaemon quit (Ping timeout: 256 seconds) |
07:45:48 | PMunch | Maybe the `type Bar {.borrow: '.'.} = distinct Foo` syntax should be extended to an argument-less version which does that |
07:46:45 | PMunch | Hmm, might be tricky to implement though.. |
07:47:16 | PMunch | Take the above example what should the `+` operation between two `Timestamp` distincts do? |
07:48:07 | FromDiscord | <Elegantbeef> Something declarative like my lender toy seems ideal |
07:48:09 | PMunch | Should `proc '+'(x, y: int): int` be turned into `proc '+'(x, y: Timestamp): Timestamp`? |
07:48:22 | PMunch | Lender toy? |
07:48:32 | * | om3ga quit (Read error: Connection reset by peer) |
07:49:08 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimtrest/blob/master/lender.nim#L226-L242 solves all ambiguity |
07:50:10 | FromDiscord | <Elegantbeef> It also does not do what the compiler does, it just emits a procedure annotated `inline` |
07:50:44 | FromDiscord | <Elegantbeef> The compiler uses the exact same procedure for all borrows |
07:50:53 | FromDiscord | <Elegantbeef> Which means it falls apart in many places |
07:51:40 | PMunch | Ah right, so you just tell it how you expect to be able to use it and it figures the rest out itself? |
07:52:08 | FromDiscord | <Elegantbeef> Yea it emits procedures that call the code based off what you wrote |
07:53:17 | FromDiscord | <Elegantbeef> Does not handle generics though |
07:54:05 | * | om3ga joined #nim |
08:00:07 | Amun-Ra | you rarely need all the operations of the base type |
08:00:25 | FromDiscord | <Elegantbeef> Right but sometimes you do |
08:01:02 | FromDiscord | <Elegantbeef> I really like how strict distinct is, but there are some times 😄 |
08:01:24 | * | jmdaemon joined #nim |
08:01:30 | Amun-Ra | right, I like the way they are implemented, I usually add one/two borrows top :> |
08:22:55 | * | jay-tuckey quit (Ping timeout: 276 seconds) |
08:41:54 | * | xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1 - https://znc.in) |
08:43:49 | * | xutaxkamay joined #nim |
08:54:38 | * | jmdaemon quit (Ping timeout: 260 seconds) |
09:12:53 | * | redj quit (Remote host closed the connection) |
09:14:15 | * | redj joined #nim |
09:15:09 | * | xet7 quit (Quit: Leaving) |
10:08:30 | FromDiscord | <TӨMΛ ☠> What is fastest way to iterate over `seq[(int, int)]`? If it makes any difference, I want to `return true` if `(int, int) in seq[(int, int)]`, but since this can be called many times on big seqs, it'd be nice to know what is most performant approach |
10:11:05 | FromDiscord | <odexine> hashset? |
10:18:35 | * | mahlon quit (Ping timeout: 264 seconds) |
10:32:21 | PMunch | Yeah, the most performant solution is to not use a seq for this |
10:42:42 | FromDiscord | <TӨMΛ ☠> Are they expandable though? |
10:50:28 | FromDiscord | <anuke> yes |
10:52:49 | * | mahlon joined #nim |
10:52:49 | FromDiscord | <nnsee> In reply to @toma400 "What is fastest way": can your seq contain a given `(int, int)` multiple times? |
11:17:10 | FromDiscord | <TӨMΛ ☠> In reply to @nnsee "can your seq contain": I made check for it to exclude those |
11:17:31 | FromDiscord | <nnsee> what you want is a hash set |
11:17:36 | FromDiscord | <nnsee> https://nim-lang.org/docs/sets.html |
11:18:31 | FromDiscord | <TӨMΛ ☠> Gotcha, seems indeed like perfect thing ❤️ |
11:18:41 | FromDiscord | <TӨMΛ ☠> I guess also doing HashSet comparison would be easier that way |
11:31:13 | * | jay-tuckey joined #nim |
12:10:56 | * | jay-tuckey quit (Ping timeout: 256 seconds) |
12:24:05 | FromDiscord | <pr0c_mm3r> hey yall, I wanted to get started with hacking and malware development specifically. So, At the moment I know the basics of python, like a higher level understanding of programming and programs and all. Have made few programs as well |
12:24:19 | FromDiscord | <pr0c_mm3r> So, should I get started with nim for making malwares? |
12:32:59 | PMunch | We certainly don't want people to use Nim for malware as it keeps triggering false positives with AV for us who use Nim for more legitimate purposes |
12:33:19 | PMunch | Most people around here won't help out either if it seems like you're writing malware for this exact purpose |
12:33:52 | PMunch | May I suggest a more productive pursuit of programming? |
12:34:19 | FromDiscord | <nnsee> In reply to @pr0c_mm3r "So, should I get": why specifically malware? why not anything else? |
12:34:28 | FromDiscord | <nnsee> malware development is generally frowned upon here |
12:34:41 | FromDiscord | <griffith1deadly> why not just mc server implementation 🤔 |
12:34:47 | FromDiscord | <pr0c_mm3r> In reply to @nnsee "why specifically malware? why": well Im specifically interested in that and cybersec |
12:35:03 | FromDiscord | <pr0c_mm3r> Nothing unethical though, Might just test them in a VM |
12:35:24 | FromDiscord | <pr0c_mm3r> In reply to @PMunch "We certainly don't want": wait so, nim is just used for bypassing AV? |
12:35:54 | FromDiscord | <nnsee> AVs for VMs also submit samples to AV vendors which means nim keeps ending up in the AV shitlist |
12:36:04 | FromDiscord | <pr0c_mm3r> In reply to @PMunch "May I suggest a": Im specifically interested in the field of cybersec, that's why I asked 😐 |
12:36:32 | FromDiscord | <nnsee> there's a million things to do in cybersec besides writing malware |
12:36:42 | FromDiscord | <pr0c_mm3r> In reply to @nnsee "AVs for VMs also": that's why I asked, is nim specifically for bypassing AV |
12:36:55 | FromDiscord | <pr0c_mm3r> In reply to @nnsee "there's a million things": RE and binexp? |
12:37:09 | FromDiscord | <nnsee> in fact i'm very confident that >95% of people working in the cybersec field do _not_ write malware |
12:37:32 | PMunch | Nim is certainly not used only for bypassing AV. In has unfortunately become somewhat popular with malware writers. I guess the single stand-alone binary and good performance while staying ergonomic is as good a selling point to them as it is to the rest of us. |
12:37:54 | FromDiscord | <nnsee> In reply to @pr0c_mm3r "that's why I asked,": not sure what you mean by this. Nim is a general purpose programming language. The fact that it is used by a large number of people for writing malware and Nim happens to end up in AV shitlists is an unfortunate side effect of the language being good |
12:38:23 | FromDiscord | <nnsee> In reply to @pr0c_mm3r "RE and binexp?": for example. Or vuln research |
12:38:48 | FromDiscord | <pr0c_mm3r> In reply to @PMunch "Nim is certainly not": oh, so Is it a good language to learn now? Im only familiar with basics of python |
12:38:52 | PMunch | The problem is hat as people write malware in Nim it gets submitted to AV vendors. These vendors are typically pretty bad at getting counter examples when new languages roll around, so their fingerprinting algorithms end up just fingerprinting Nimisms. This leads to completely legitimate programs written in Nim (including the compiler itself) being confused for malware. |
12:39:00 | FromDiscord | <Chronos [She/Her]> In reply to @griffith1deadly "why not just mc": Pain lol, have you worked on your impl recently or? |
12:39:30 | FromDiscord | <pr0c_mm3r> In reply to @nnsee "for example. Or vuln": well, I gotta learn networking first for anything else yeah? Say, network hacking? |
12:39:41 | FromDiscord | <pr0c_mm3r> Im interested in that joint as well |
12:40:06 | FromDiscord | <griffith1deadly> In reply to @chronos.vitaqua "Pain lol, have you": currently i'm translate my ue4 game external game cheat to full C, with pain in ass |
12:40:13 | PMunch | I'll urge you once more to |
12:40:17 | FromDiscord | <griffith1deadly> (edit) removed "game" |
12:40:26 | FromDiscord | <nnsee> In reply to @pr0c_mm3r "well, I gotta learn": well in any field it's good to have a grasp of the underlying subject before delving into the offensive side of it |
12:40:26 | PMunch | Whoops, that sentence wasn't complete.. |
12:40:30 | FromDiscord | <Chronos [She/Her]> In reply to @griffith1deadly "currently i'm translate my": Ah fair |
12:40:44 | FromDiscord | <griffith1deadly> (edit) "C," => "C (nim compilation backend)," |
12:41:04 | FromDiscord | <nnsee> i have a degree in "Ethical Hacking and Network Security" and a lot of what we studied was just regular networking |
12:41:16 | PMunch | I was about to say that I urge you once more to consider something more productive for your programming endeavors |
12:41:20 | FromDiscord | <pr0c_mm3r> So, can I try anything else specifically in nim in this field? |
12:41:45 | PMunch | You _can_ do pretty much anything in Nim |
12:41:55 | FromDiscord | <pr0c_mm3r> But first things first, is learning it gonna be worth it for me? Like, I am just familiar with python like I said earlier |
12:42:09 | FromDiscord | <pr0c_mm3r> In reply to @PMunch "You _can_ do pretty": could you give me some examples? |
12:42:18 | FromDiscord | <pr0c_mm3r> Network based for example? |
12:45:20 | FromDiscord | <pr0c_mm3r> hey man? |
12:57:25 | PMunch | Just think of anything, then imagine Nim doing it |
12:58:40 | FromDiscord | <pr0c_mm3r> In reply to @PMunch "Just think of anything,": so nim is a good language for me |
12:58:58 | PMunch | Nim is a good language for anyone |
12:59:11 | PMunch | But whether you are good for the Nim language or not I'm not so sure |
12:59:22 | FromDiscord | <pr0c_mm3r> Perhaps that syntax would make it easier for me to shift to it. Also I dont necessarily have to know lower level languages like C? |
12:59:35 | * | rockcavera joined #nim |
12:59:37 | FromDiscord | <pr0c_mm3r> In reply to @PMunch "But whether you are": Im not so sure of the use cases, that's why |
12:59:53 | FromDiscord | <nnsee> In reply to @pr0c_mm3r "Perhaps that syntax would": no, but knowing C concepts comes in handy |
13:00:00 | PMunch | You don't have to know C, but it certainly helps |
13:00:00 | FromDiscord | <nnsee> but generally no |
13:00:46 | PMunch | pr0c_mm3r, that was a jab at you for wanting to use Nim for malware purposes. |
13:02:47 | FromDiscord | <pr0c_mm3r> got any good resources though? |
13:03:04 | PMunch | Google is pretty good these days I've heard |
13:03:13 | PMunch | Has answers for all sorts of stuff, not only Nim |
13:03:28 | FromDiscord | <pr0c_mm3r> In reply to @PMunch "<@832568108744048641>, that was a": lmao, Ill just keep that shit on hold for later, I might just get started with network hacking |
13:06:16 | FromDiscord | <pr0c_mm3r> In reply to @PMunch "Has answers for all": great, : D |
13:06:38 | FromDiscord | <pr0c_mm3r> maybe even write a google dork script to download relevant stuff? xd |
13:08:30 | * | beholders_eye joined #nim |
13:13:27 | FromDiscord | <nnsee> hackerman starter pack |
13:13:37 | FromDiscord | <pr0c_mm3r> lmfao |
13:53:07 | * | derpydoo joined #nim |
14:07:25 | FromDiscord | <pr0c_mm3r> @nnsee can you tell me what you're doing in cybersec? Pentester? |
14:08:19 | FromDiscord | <nnsee> pentester, redteamer, vuln researcher, cyber exercise development |
14:08:43 | FromDiscord | <pr0c_mm3r> damn, you're a whole package, : O |
14:09:06 | FromDiscord | <pr0c_mm3r> so ig you started off having interest in this field? |
14:09:16 | FromDiscord | <pr0c_mm3r> With programming and stuff? |
14:10:40 | FromDiscord | <pr0c_mm3r> ig later on instead of maldev, Ill do re and binary exploitation |
14:10:42 | FromDiscord | <nnsee> well my interest in the field got started when i was quite young, around 10 i would say, and i had gotten a game console (the original PSP) and wanted to know how to get free games on it |
14:10:42 | FromDiscord | <pr0c_mm3r> in nim |
14:11:24 | FromDiscord | <nnsee> you had to "jailbreak" your PSP which iirc involved opening an image file which abused a flaw in the image parser and enabled loading unsigned applications |
14:11:36 | FromDiscord | <pr0c_mm3r> In reply to @nnsee "well my interest in": sheesh, you did start off at a young age |
14:12:00 | FromDiscord | <nnsee> to 10-year old me, opening an image and having text fly across the screen, the PSP suddenly rebooting itself and it magically being able to run any old application was so, so cool to me |
14:12:24 | FromDiscord | <pr0c_mm3r> of course |
14:12:39 | FromDiscord | <nnsee> that's where my IT interest started from |
14:13:07 | FromDiscord | <nnsee> a totally unrelated story arc was me installing linux on my PC because it looked cool when i was like 12 and getting really, really into linux |
14:13:32 | FromDiscord | <nnsee> and another one being me picking up programming to write mods for games and stuff |
14:13:55 | FromDiscord | <pr0c_mm3r> hmm, guess that winds up to you being a overall tech savvy, since you were 10 |
14:14:11 | FromDiscord | <nnsee> when i was a bit older, i started buying used networking devices online and hacking them because it was fun |
14:14:11 | * | redj quit (Ping timeout: 260 seconds) |
14:14:21 | FromDiscord | <nnsee> started a blog too, after a while |
14:14:27 | FromDiscord | <nnsee> got a job thanks to it, so no regrets |
14:22:33 | FromDiscord | <nnsee> https://nns.ee if you're interested, shameless self plug |
14:33:33 | * | edr joined #nim |
14:37:32 | PMunch | Was 10, PSP just released.. That made me feel old |
14:38:07 | PMunch | I think if modding was as big as it was back when I was a kid that's where I would have started. What initially drove me to CS was trying to code games |
14:41:31 | FromDiscord | <nnsee> wait, how old are you again? |
14:48:20 | PMunch | Me? |
14:48:27 | PMunch | I'm 31 |
14:49:53 | arkanoid | nnsee, nice blog! |
14:56:53 | FromDiscord | <TӨMΛ ☠> In reply to @nnsee "and another one being": This sounds so amazing. Honestly modding was my entry to programming, and funnily also a reigniter. But I love that story about PSP jailbreaking, sounds amazing even now (maybe because I'm huge emulator fan too) |
14:57:32 | PMunch | Yeah that jailbreaking with an image sounds super cool |
14:57:41 | PMunch | Maybe I'll dig my PSP out of the basement |
14:57:54 | PMunch | It unfortunately has a stuck shoulder button though.. |
15:00:08 | * | lucasta joined #nim |
15:19:19 | FromDiscord | <nnsee> In reply to @arkanoid "<@961485620075720734>, nice blog!": thanks! |
15:23:16 | * | PMunch quit (Quit: Leaving) |
15:29:13 | FromDiscord | <jviega> Young whippersnappers |
15:30:26 | FromDiscord | <jviega> There's got to be someone older than me in this community, but over a year later, I have no clue who it would be |
15:34:28 | FromDiscord | <nixfreak> hmm |
15:43:39 | arkanoid | jviega, well, one year later, earth people tend to go +1 |
16:04:30 | FromDiscord | <srabb> sent a code paste, see https://play.nim-lang.org/#ix=4M9U |
16:04:42 | FromDiscord | <jviega> You have to add ~/.nimble/bin to your path |
16:05:23 | FromDiscord | <srabb> In reply to @jviega "You have to add": can you explain that to me please |
16:05:34 | FromDiscord | <srabb> im really new to nim and linux and all of that |
16:06:02 | FromDiscord | <jviega> In your .profile add to the end, `export PATH=$PATH:~/.nimble/bin` and then log out and log back in |
16:06:27 | FromDiscord | <jviega> (or, execute the file again with `. ~/.profile`) |
16:07:26 | FromDiscord | <srabb> In reply to @jviega "In your .profile add": .profile? |
16:07:40 | FromDiscord | <jviega> Do you know how to edit a file on your computer? |
16:07:43 | FromDiscord | <srabb> i guess so |
16:07:47 | FromDiscord | <jviega> Edit the file named ~/.profile |
16:08:13 | FromDiscord | <srabb> where is it |
16:09:37 | FromDiscord | <jviega> In ~/.profile |
16:09:53 | FromDiscord | <jviega> If it doesn't exist yet you'll be creating it |
16:10:04 | FromDiscord | <srabb> what directory is the file on |
16:10:44 | FromDiscord | <srabb> the same on as my nim file? |
16:11:04 | FromDiscord | <jviega> The ~/ specifies the directory |
16:11:16 | FromDiscord | <jviega> ~ means your home directory |
16:41:28 | FromDiscord | <srabb> where is .profile i cant find it |
16:43:36 | FromDiscord | <srabb> i found it using ls -a |
16:43:46 | FromDiscord | <srabb> but i dont know how to edit it using the terminal |
16:45:49 | FromDiscord | <demotomohiro> I set environment variable on .bashrc. |
16:47:06 | FromDiscord | <demotomohiro> If you run `export PATH=$PATH:~/.nimble/bin` on your terminal you can use Nim.↵But you have to run that command everytime you longin to terminal. |
16:49:23 | FromDiscord | <redmechanics> sent a code paste, see https://play.nim-lang.org/#ix=4Maa |
16:50:03 | FromDiscord | <srabb> In reply to @demotomohiro "If you run `export": ok finally i installed it thanks |
16:50:35 | FromDiscord | <demotomohiro> `echo 'export PATH=$PATH:~/.nimble/bin' >> .profile` adds the command to `.profile`.↵Anyway, in general running random commonds on the internet without knowing what it does is not secure though. |
16:56:05 | FromDiscord | <bostonboston> I thought I remembered reading somewhere you can hide the call to nimMain show how when making a dll, is that true |
16:57:20 | * | jmdaemon joined #nim |
16:58:35 | FromDiscord | <demotomohiro> In reply to @redmechanics "i am writting an": How about to add bound check when you access seq or add `assert line.len > argIndex` before doing `line[argIndex]`. |
17:05:50 | FromDiscord | <apetransaction> how do i assign variables from asyncronous things https://media.discordapp.net/attachments/371759389889003532/1176931559274729603/Screen_Shot_2023-11-22_at_11.05.33_AM.png?ex=6570a9ee&is=655e34ee&hm=909ad1ac3188a6a628c6716c98423b2c07ad1c77c95a7567bbbe8f96084c72c8& |
17:05:54 | FromDiscord | <apetransaction> i cant find how |
17:06:08 | FromDiscord | <apetransaction> i wanna get the responce from here but i cant find a way to |
17:12:51 | FromDiscord | <that_dude.> In reply to @bostonboston "I thought I remembered": Thought it was behind a nomain flag or smth |
17:13:23 | * | jmdaemon quit (Ping timeout: 260 seconds) |
17:18:40 | FromDiscord | <TӨMΛ ☠> Forgive me stupid followup to that `seq/hash set` question above, but... will OrderedHashSet perform better than regular HashSet? Or it doesn't matter at all? |
17:18:46 | FromDiscord | <TӨMΛ ☠> (edit) "Forgive me stupid followup to that `seq/hash set` question above, but... will OrderedHashSet perform better than regular HashSet? Or ... it" added "does" | removed "doesn't" |
17:20:33 | FromDiscord | <odexine> i would assume that it would perform worse |
17:37:41 | FromDiscord | <TӨMΛ ☠> In reply to @odexine "i would assume that": Why so? :o |
17:37:56 | FromDiscord | <odexine> ordering needs to be additionally tracked |
17:42:44 | * | jmdaemon joined #nim |
17:44:31 | arkanoid | nim forum input has been broken for me for quite some time: I can't click preview, I get zero feedback after clicking "reply" (but it's posting!) |
17:46:33 | arkanoid | some errors in console |
17:46:36 | arkanoid | Uncaught Error: Error: unhandled exception: karax.nim(644, 14) `same(kxi.currentTree, document.getElementById(kxi.rootId))` |
17:46:52 | FromDiscord | <bootymonster69> Good to see so much activity |
17:47:38 | arkanoid | clicking on "preview" returns HTTP 400 on POST https://forum.nim-lang.org/preview |
17:48:44 | FromDiscord | <TӨMΛ ☠> In reply to @odexine "ordering needs to be": So like not only during initial ordering, but also later, to make sure it stayed intact? |
17:49:01 | FromDiscord | <odexine> yes |
17:54:25 | FromDiscord | <TӨMΛ ☠> Thank you so much ❤️ |
18:19:29 | * | lucasta quit (Quit: Leaving) |
18:25:02 | NimEventer | New thread by ggb-sw1: Can someone tell me how to read the AST associated with a varaible?, see https://forum.nim-lang.org/t/10669 |
18:27:44 | FromDiscord | <jviega> @bostonboston yes it's true, you can put it in a constructor so it gets called before main() |
18:49:49 | FromDiscord | <Chronos [She/Her]> Hey y'all, out of curiosity, is it realistic to model human language in a way that something like Tensorflow or Arraymancer could generate language without relying on an LLM or similar? |
18:50:04 | FromDiscord | <Chronos [She/Her]> It's hard to model the idea I have tbh |
18:50:37 | FromDiscord | <Chronos [She/Her]> But, rather than having massive training sets of what are basically examples of the human language, would it, even in very loose theory, be possible to do something like that? |
18:50:39 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "Hey y'all, out of": if you don't want to rely on a LLM what do you want to rely on? |
18:50:56 | FromDiscord | <Chronos [She/Her]> In reply to @mratsim "if you don't want": Built from the ground up, to see if it's even possible |
18:51:17 | FromDiscord | <Chronos [She/Her]> I should probably look into learning data science in general for this tbh |
18:51:32 | arkanoid | bootymonster69: it could be just me |
18:51:37 | FromDiscord | <Chronos [She/Her]> It's a vague concept of illogical thought processes meshing together :p |
18:51:50 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "Built from the ground": I have char-RNN shakespeare generator but that was impressive in 2015: https://github.com/mratsim/Arraymancer/blob/master/examples/ex06_shakespeare_generator.nim |
18:52:31 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "I should probably look": Look for "Transformers"↵↵keywords: BERT, attention is all you need |
18:52:48 | FromDiscord | <mratsim> Maybe try experimenting with spaCy first |
18:53:02 | FromDiscord | <Chronos [She/Her]> SpaCy? |
18:53:11 | FromDiscord | <mratsim> Rasa-NLU might have tutorials as well |
18:53:15 | FromDiscord | <Chronos [She/Her]> Char-RNN? :p |
18:53:43 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "SpaCy?": https://spacy.io |
18:53:56 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "Char-RNN? :p": character based Recurrent Neural Network |
18:54:03 | arkanoid | found the culprit, it was a firefox extension |
18:54:22 | FromDiscord | <Chronos [She/Her]> Oh neat |
18:54:55 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "Char-RNN? :p": Text generated after training on Shakespeare: https://github.com/mratsim/Arraymancer/blob/master/examples/ex06_shakespeare_generator.nim#L413 |
18:55:25 | FromDiscord | <Chronos [She/Her]> That looks hella cool! |
18:56:26 | FromDiscord | <Chronos [She/Her]> In reply to @mratsim "Text generated after training": That's actually better than I expected honestly |
18:56:30 | FromDiscord | <Phil> TIL Arraymancer is not just about hyper efficient weird math algo stuff on N dimensional array data structures |
18:56:41 | FromDiscord | <odexine> lol |
18:56:42 | FromDiscord | <Phil> It is about hyper efficient weird math algo stuff for ML! |
18:56:46 | FromDiscord | <Chronos [She/Her]> Still mostly gibberish obviously but, somehow more consistent than I thought |
18:56:48 | FromDiscord | <odexine> phil arraymancer was always about ML |
18:56:56 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "It is about hyper": That... Wasn't common knowledge? |
18:57:14 | FromDiscord | <Phil> In reply to @chronos.vitaqua "That... Wasn't common knowledge?": Look I literally never read the README, I saw the name mentioned occasionally |
18:57:23 | FromDiscord | <Phil> I saw array and checked out |
18:57:42 | FromDiscord | <Chronos [She/Her]> I never even read the README before, just knew from context- |
18:58:06 | FromDiscord | <odexine> 👀 |
18:58:24 | FromDiscord | <odexine> i was working on a colour palette extractor a while back using arraymancer |
19:03:54 | FromDiscord | <mratsim> I actually wanted to have it play games: |
19:04:19 | FromDiscord | <mratsim> https://github.com/mratsim/agent-smith |
19:05:29 | FromDiscord | <mratsim> In reply to @odexine "i was working on": wow I was using OpenAI color palette in 2018, https://github.com/mratsim/agent-smith/blob/a2d9251e289f92f6b5fb68e19a98d16b00f2694c/examples/ex02_00_pong_cem.nim#L67 |
19:06:39 | FromDiscord | <odexine> well i wasnt using any machine learning, i was just using the usual k-means and w/e |
19:07:09 | FromDiscord | <odexine> it didnt turn out too well and someone had kinda already made what i wanted kinda so i somewhat-dropped it |
19:07:13 | FromDiscord | <odexine> it was pretty damn slow too |
19:07:47 | FromDiscord | <odexine> i gotta go for now tho its 4 am i have things to do by 9 xdddddddddd |
19:07:59 | FromDiscord | <mratsim> I don't remember if I have k-means implemented |
19:17:38 | FromDiscord | <odexine> You do |
19:21:05 | FromDiscord | <redmechanics> i have an interpreter for a language i am making and when in the interpreted fie |
19:37:23 | FromDiscord | <redmechanics> anyone got any idea of somthing i could code ? |
20:02:13 | NimEventer | New thread by mszs: Nimlsp does not see packages installed with nimble, see https://forum.nim-lang.org/t/10671 |
20:03:14 | FromDiscord | <fowl.mouth> In reply to @redmechanics "anyone got any idea": Code up something that suggests ideas for projects to code |
20:04:07 | * | jmdaemon quit (Ping timeout: 255 seconds) |
20:04:15 | NimEventer | New thread by mishankov: Yahttp - simple HTTP client, see https://forum.nim-lang.org/t/10672 |
20:08:05 | * | jmdaemon joined #nim |
20:11:00 | Amun-Ra | or code up something that codes up projects |
20:13:22 | * | jmdaemon quit (Ping timeout: 276 seconds) |
20:16:10 | FromDiscord | <griffith1deadly> hm, i think i love nim `distinct` in interpop with c.. |
20:16:22 | Amun-Ra | yes |
20:17:53 | Amun-Ra | especially enum flags |
20:19:11 | FromDiscord | <.bobbbob> Im a bit confused on how to get an uploaded file with jester. I can do request.params["image"] to get the name of the uploaded image but im not sure how to get the actual image and save it to a file. anyone know? |
20:19:15 | Amun-Ra | I mean: https://play.nim-lang.org/#ix=4Mb6 |
20:22:57 | FromDiscord | <ezquerra> In reply to @isofruit "TIL Arraymancer is not": Actually it is quite useful for signal processing too |
20:27:39 | FromDiscord | <redmechanics> can nim be used for ai / machine learning if yes does anyone have ressources ? |
20:28:23 | NimEventer | New thread by mishankov: Some sort of interface-like functionality or varargs, see https://forum.nim-lang.org/t/10673 |
20:54:41 | * | jmdaemon joined #nim |
21:10:21 | * | jmdaemon quit (Ping timeout: 256 seconds) |
21:20:27 | FromDiscord | <Chronos [She/Her]> In reply to @mratsim "I actually wanted to": Oh that sounds super fun |
21:27:19 | FromDiscord | <Phil> In reply to @redmechanics "can nim be used": You may want to scroll up and see me realizing like a dumbass that one of nim's most prominent projects called arraymancer is in fact for ML |
21:27:42 | FromDiscord | <Phil> So yeah, there are corresponding projects |
21:28:19 | FromDiscord | <Phil> Also running `nimble search machine learning` grants you a fair list of projects to look at. Or searching for that on nimble.directory |
21:36:59 | * | jmdaemon joined #nim |
21:57:34 | * | miragearchitect joined #nim |
22:14:03 | FromDiscord | <Dralhim> sent a code paste, see https://play.nim-lang.org/#ix=4MbK |
22:15:12 | FromDiscord | <mratsim> In reply to @odexine "You do": probably need some optim then, reduction/aggregation/summarization algo are tricky to make fast.↵I have a couple in Arraymancer that get slower the more thread I have. |
22:17:04 | FromDiscord | <Elegantbeef> In Nim chars are ordinals |
22:17:08 | FromDiscord | <Elegantbeef> So yes it's what you said |
22:20:58 | * | lucasta joined #nim |
22:21:21 | FromDiscord | <bostonboston> Can you only use `{.strdefine.}` in your main module |
22:21:38 | FromDiscord | <Elegantbeef> No you should be able to use it everywhere |
22:25:05 | FromDiscord | <bostonboston> Ah, it must be exported |
22:30:51 | * | jkl quit (Quit: Gone.) |
22:32:35 | * | jkl joined #nim |
22:35:28 | arkanoid | nim -h: --eval:cmd evaluate nim code directly; e.g.: `nim --eval:"echo 1"` defaults to `e` (nimscript) but customizable: `nim r --eval:'for a in stdin.lines: echo a'` |
22:35:36 | arkanoid | what does it mean "defaults to `e`" |
22:35:58 | * | jkl quit (Remote host closed the connection) |
22:36:10 | FromDiscord | <bostonboston> `nim e` as opposed to `nim c` right? |
22:36:46 | arkanoid | oh! ok, now I see with nim --fullhelp |
22:36:48 | arkanoid | thanks |
22:37:37 | FromDiscord | <bostonboston> You got it, I was gonna compare it to how `nim r` defaults to `nim c` |
22:37:37 | * | jkl joined #nim |
22:52:39 | * | advesperacit quit () |
23:17:51 | arkanoid | bostonboston I just benchmarked nim r with and without caching, debug/release, nim e, bash, python, ruby for a trivial task: https://forum.nim-lang.org/t/10595#71310 |
23:21:13 | * | derpydoo quit (Ping timeout: 255 seconds) |
23:26:00 | arkanoid | I mean for scripting |
23:32:03 | FromDiscord | <bostonboston> Interdasting |
23:32:27 | FromDiscord | <Elegantbeef> Now do `--cc:tcc` |
23:35:40 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
23:36:13 | * | jmdaemon joined #nim |
23:41:34 | * | jmdaemon quit (Ping timeout: 255 seconds) |
23:43:46 | * | lucasta quit (Remote host closed the connection) |
23:46:17 | arkanoid | Elegantbeef, never used it, let me try |
23:48:31 | arkanoid | Error: `--tlsEmulation:on` must be used when using threads with tcc backend |
23:48:42 | arkanoid | not using threads, not using tls |
23:49:03 | FromDiscord | <Elegantbeef> `--threads:off` |
23:49:19 | arkanoid | tcc: error: undefined symbol 'fabs' |
23:49:31 | FromDiscord | <Elegantbeef> Threads are always imported with nim 2.0 which means that it stopped working with TCC, as it's not a supported C compiler anywho |
23:49:33 | FromDiscord | <Elegantbeef> Ah shame |
23:49:51 | arkanoid | ? |
23:50:45 | arkanoid | I thing I'm trying to compile the most trivial nim program possible (countup and increment) |
23:52:46 | arkanoid | it works with --passl:"-ldl -lm" |