00:00:04 | * | junland quit (Quit: %ZNC Disconnected%) |
00:00:47 | * | junland joined #nim |
00:37:37 | FromDiscord | <jejPony> how do i use "downloadFile"? |
00:37:42 | FromDiscord | <jejPony> I want to try downloading a file |
00:37:50 | FromDiscord | <jejPony> but the documentation is confusing me |
00:40:51 | FromGitter | <OdinTech3> What are some cool projects people have built with Nim. Maybe it's my lack of creativity but i find it hard to think about what i can build with Nim |
00:42:23 | FromDiscord | <juan_carlos> `client.downloadFile(url = "http://foo.io/file", filename = "/tmp/bar.ext")` |
00:42:38 | FromDiscord | <jejPony> ok, thanks |
00:42:42 | FromDiscord | <jejPony> let me try it |
00:43:32 | FromDiscord | <juan_carlos> From `macro` is there a way to know if a name is a stropping?. Ot its meant to be transparent. |
00:43:33 | FromDiscord | <jejPony> |
00:43:33 | FromDiscord | <jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630203448603836426/unknown.png |
00:44:18 | disruptek | no, you kinda have to look at keywords.txt from the compiler. |
00:44:49 | FromDiscord | <juan_carlos> Make a client, like `let client = newHttpClient()` |
00:44:56 | FromDiscord | <juan_carlos> Then use the `client` |
00:45:06 | FromDiscord | <jejPony> ok |
00:49:24 | FromDiscord | <jejPony> I feel dumb |
00:49:24 | FromDiscord | <jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630204927402180618/unknown.png |
00:53:42 | FromDiscord | <exelotl> @jejPony you need to import the httpclient module |
00:54:06 | FromDiscord | <jejPony> ok |
00:56:25 | FromDiscord | <juan_carlos> My url and filename are fake BTW you must provide a real ones. |
00:57:36 | FromDiscord | <jejPony> ok |
00:58:33 | FromDiscord | <jejPony> |
00:58:33 | FromDiscord | <jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630207224127684608/unknown.png |
01:01:03 | FromDiscord | <juan_carlos> `import httpclient` |
01:01:18 | FromDiscord | <juan_carlos> Imports here are not function call like JS/TS. |
01:01:28 | FromDiscord | <jejPony> |
01:01:28 | FromDiscord | <jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630207962924711947/unknown.png |
01:01:37 | FromDiscord | <jejPony> i tried this before and it resulted in the same error |
01:03:48 | FromDiscord | <juan_carlos> Save it, run it. Pastebin better than photos probably. |
01:04:34 | FromDiscord | <juan_carlos> Maybe making the Tutorial first can save you time in the long run. |
01:06:00 | FromDiscord | <exelotl> can confirm that code works for me |
01:20:57 | * | Jjp137 joined #nim |
01:24:46 | * | Hideki_ joined #nim |
01:31:51 | * | laaron joined #nim |
01:51:45 | * | sealmove joined #nim |
01:53:16 | FromDiscord | <jejPony> Forgot to save it, thank you. |
01:53:29 | FromDiscord | <jejPony> I keep forgetting I have to save it for it to update. |
01:59:53 | * | sealmove quit (Ping timeout: 245 seconds) |
02:02:07 | * | sealmove joined #nim |
02:07:50 | * | gangstacat quit (Quit: ฤis!) |
02:24:13 | * | laaron quit (Remote host closed the connection) |
02:25:10 | * | laaron joined #nim |
02:28:29 | * | laaron quit (Remote host closed the connection) |
02:31:14 | * | Hideki_ quit (Remote host closed the connection) |
02:32:10 | * | Hideki_ joined #nim |
02:32:48 | * | laaron joined #nim |
02:36:26 | * | Hideki_ quit (Ping timeout: 240 seconds) |
02:41:59 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
02:42:16 | * | laaron joined #nim |
02:46:32 | * | theelous3 joined #nim |
02:52:30 | * | Hideki_ joined #nim |
02:53:09 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
02:53:36 | * | laaron joined #nim |
02:53:48 | * | Hideki_ quit (Remote host closed the connection) |
02:55:13 | * | Hideki_ joined #nim |
03:06:16 | * | lritter quit (Ping timeout: 240 seconds) |
03:07:08 | * | lritter joined #nim |
03:07:53 | * | Hideki_ quit (Remote host closed the connection) |
03:08:36 | * | laaron quit (Remote host closed the connection) |
03:09:10 | * | laaron joined #nim |
03:14:30 | * | Hideki_ joined #nim |
03:17:56 | * | laaron quit (Remote host closed the connection) |
03:19:44 | * | Hideki_ quit (Ping timeout: 276 seconds) |
03:25:30 | * | Hideki_ joined #nim |
03:30:37 | FromDiscord | <jejPony> https://pastebin.com/bVPKEPtE |
03:30:38 | FromDiscord | <jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630245502666932264/unknown.png |
03:32:46 | FromDiscord | <juan_carlos> Add `-d:ssl` to compile command. |
03:33:53 | FromDiscord | <jejPony> I did that |
03:33:57 | FromDiscord | <jejPony> and it did compile |
03:34:12 | FromDiscord | <jejPony> but the program downloads this |
03:34:12 | FromDiscord | <jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630246404618715166/test.html |
03:42:20 | * | laaron joined #nim |
03:46:38 | * | chemist69 quit (Ping timeout: 246 seconds) |
03:48:42 | * | chemist69 joined #nim |
04:08:43 | * | dddddd quit (Remote host closed the connection) |
04:12:17 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
04:13:38 | * | laaron joined #nim |
04:30:56 | * | nsf joined #nim |
04:35:38 | * | theelous3 quit (Ping timeout: 240 seconds) |
04:44:52 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
04:45:45 | * | laaron joined #nim |
04:47:37 | * | Hideki_ quit (Remote host closed the connection) |
04:48:58 | * | Hideki_ joined #nim |
04:52:01 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
04:52:15 | * | Hideki_ quit (Remote host closed the connection) |
04:52:31 | * | Hideki_ joined #nim |
04:52:40 | * | laaron joined #nim |
05:05:02 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
05:05:40 | * | laaron joined #nim |
05:10:04 | * | radsoc joined #nim |
05:12:37 | * | laaron quit (Remote host closed the connection) |
05:29:14 | * | laaron joined #nim |
05:31:30 | * | laaron quit (Client Quit) |
05:32:38 | * | laaron joined #nim |
05:37:00 | * | laaron quit (Client Quit) |
05:37:28 | * | laaron joined #nim |
05:52:15 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
05:53:29 | * | laaron joined #nim |
05:58:45 | * | laaron quit (Remote host closed the connection) |
06:09:00 | * | Hideki_ quit (Remote host closed the connection) |
06:09:41 | * | Hideki_ joined #nim |
06:13:36 | * | solitudesf joined #nim |
06:14:30 | * | Hideki_ quit (Ping timeout: 268 seconds) |
06:27:20 | * | solitudesf quit (Ping timeout: 265 seconds) |
06:28:11 | * | Hideki_ joined #nim |
06:29:30 | * | Hideki_ quit (Remote host closed the connection) |
06:30:15 | * | Hideki_ joined #nim |
06:32:58 | * | odinfinch quit (Quit: The Lounge - https://thelounge.chat) |
06:34:26 | * | Hideki_ quit (Ping timeout: 240 seconds) |
06:37:51 | * | Hideki_ joined #nim |
06:38:15 | * | solitudesf joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:02:02 | * | actuallybatman quit (Ping timeout: 276 seconds) |
07:03:48 | * | gangstacat joined #nim |
07:04:51 | * | gmpreussner joined #nim |
07:08:41 | * | radsoc quit (Quit: radsoc) |
08:06:23 | * | Vladar joined #nim |
08:09:40 | * | SodaScripter joined #nim |
08:11:14 | * | solitudesf quit (Ping timeout: 240 seconds) |
08:15:58 | * | SodaScripter left #nim ("Leaving") |
08:17:16 | * | Jjp137 quit (Read error: Connection reset by peer) |
08:19:16 | * | Senketsu joined #nim |
08:21:32 | * | Jjp137 joined #nim |
08:31:17 | * | SodaScripter joined #nim |
08:35:45 | * | asymptotically joined #nim |
08:38:10 | * | SodaScripter quit (Remote host closed the connection) |
08:38:11 | * | lritter quit (Ping timeout: 268 seconds) |
08:49:16 | * | Senketsu quit (Quit: WeeChat 2.5) |
09:09:36 | * | sealmove quit (Quit: WeeChat 2.6) |
09:09:54 | * | sealmove joined #nim |
09:21:20 | * | radsoc joined #nim |
09:23:06 | * | Vladar quit (Remote host closed the connection) |
09:26:41 | FromGitter | <nickdex> So a really basic question how do you read integer in nim/nimscript. I thought it would work like python - read string (or TaintedString in this case) then convert it (int() or toInt()) |
09:38:36 | sealmove | sure you can do that |
09:38:52 | sealmove | there is parseInt() |
09:39:47 | FromDiscord | <juan_carlos> parseInt(), theres lots of parse* stuff they named similar. |
09:40:04 | sealmove | or you can read directly using streams |
09:40:23 | * | sealmove quit (Quit: WeeChat 2.6) |
09:40:42 | FromGitter | <nickdex> ahh... okay, i was looking along python style int(), str() etc thanks :) |
09:41:08 | FromGitter | <nickdex> ๐ will look for streams way too |
09:43:02 | FromGitter | <nickdex> surprisingly parse<type> style didn't work on stdin.readLine |
09:45:05 | FromDiscord | <juan_carlos> `rdstdin.readLineFromStdin("wat?").normalize.parseInt` |
09:45:18 | FromDiscord | <juan_carlos> Or somethin' like that. |
09:47:59 | * | radsoc quit (Quit: radsoc) |
09:50:20 | FromGitter | <nickdex> thanks juan, that seems to be working. For streams I found more strange behavior, created a `newFileStream(stdin)` then when I tried to readInt<byte> and tried to echo it, echoed some very different values |
10:03:04 | * | clyybber joined #nim |
10:56:03 | * | Hideki_ quit (Remote host closed the connection) |
11:05:04 | * | fanta1 joined #nim |
11:13:10 | * | Hideki_ joined #nim |
11:17:07 | * | Hideki_ quit (Remote host closed the connection) |
11:17:23 | * | Hideki_ joined #nim |
11:19:48 | clyybber | Araq: Are you there? |
11:23:28 | * | shomodj joined #nim |
11:54:07 | * | ronny quit (Write error: Connection reset by peer) |
11:54:08 | * | nc-x[m] quit (Read error: Connection reset by peer) |
11:54:09 | * | narimiran[m] quit (Read error: Connection reset by peer) |
11:54:13 | * | spymasterd[m] quit (Read error: Connection reset by peer) |
11:54:13 | * | xomachine[m] quit (Read error: Connection reset by peer) |
11:54:16 | * | Demos[m] quit (Read error: Connection reset by peer) |
11:54:16 | * | GitterIntegratio quit (Read error: Connection reset by peer) |
11:54:21 | * | planetis[m] quit (Read error: Connection reset by peer) |
11:54:22 | * | muxueqz[m] quit (Read error: Connection reset by peer) |
11:54:22 | * | skrylar[m] quit (Read error: Connection reset by peer) |
11:54:22 | * | ee7[m] quit (Read error: Connection reset by peer) |
11:54:22 | * | Connor[m] quit (Read error: Connection reset by peer) |
11:54:22 | * | macsek1911[m] quit (Read error: Connection reset by peer) |
11:54:31 | * | nergal[m] quit (Read error: Connection reset by peer) |
11:54:32 | * | Miguelngel[m] quit (Read error: Connection reset by peer) |
11:54:32 | * | encryptize[m] quit (Read error: Connection reset by peer) |
11:54:33 | * | yglukhov[m] quit (Read error: Connection reset by peer) |
11:54:34 | * | swisscowbell[m] quit (Remote host closed the connection) |
11:54:34 | * | zielmicha[m]1 quit (Remote host closed the connection) |
11:54:35 | * | testgovno[m] quit (Read error: Connection reset by peer) |
11:54:36 | * | Kameleon quit (Read error: Connection reset by peer) |
11:54:38 | * | lqdev[m] quit (Read error: Connection reset by peer) |
11:54:38 | * | TheManiac[m] quit (Read error: Connection reset by peer) |
11:54:38 | * | LEdoian[m] quit (Read error: Connection reset by peer) |
11:54:40 | * | pigmej quit (Read error: Connection reset by peer) |
11:54:41 | * | leorize[m] quit (Remote host closed the connection) |
11:54:43 | * | meff[m] quit (Remote host closed the connection) |
11:54:44 | * | isaac[m]1 quit (Remote host closed the connection) |
11:54:45 | * | k0mpjut0r quit (Write error: Connection reset by peer) |
11:54:46 | * | jaens[m] quit (Remote host closed the connection) |
11:54:46 | * | MrAxilus quit (Read error: Connection reset by peer) |
11:54:46 | * | BitPuffin quit (Read error: Connection reset by peer) |
11:54:46 | * | gh0st[m] quit (Read error: Connection reset by peer) |
11:59:56 | clyybber | bb matrix |
12:02:38 | * | Connor[m] joined #nim |
12:08:34 | * | sealmove joined #nim |
12:11:47 | FromDiscord | <Rika> can i do structural typing in nim? |
12:14:24 | clyybber | Concepts are akin to that |
12:15:23 | clyybber | And tuples can be considered structural typing |
12:15:49 | clyybber | or rather, anonymous tuples |
12:17:59 | FromDiscord | <Rika> do concepts have docu? search doesnt yield much, find in manual neither |
12:19:10 | clyybber | its in the experimental manual https://nim-lang.github.io/Nim/manual_experimental.html |
12:19:54 | clyybber | Be aware that this 'of' syntax in concept refinement is not yet implemented |
12:19:57 | FromDiscord | <Rika> is it in stable or do i have to add a compiler flag |
12:24:11 | clyybber | Its in stable |
12:26:09 | * | Demos[m] joined #nim |
12:26:09 | * | k0mpjut0r joined #nim |
12:26:09 | * | BitPuffin joined #nim |
12:26:09 | * | LEdoian[m] joined #nim |
12:26:09 | * | GitterIntegratio joined #nim |
12:26:10 | * | planetis[m] joined #nim |
12:26:10 | * | leorize[m] joined #nim |
12:26:10 | * | gh0st[m] joined #nim |
12:26:10 | * | nergal[m] joined #nim |
12:26:10 | * | jaens[m] joined #nim |
12:26:10 | * | lqdev[m] joined #nim |
12:26:11 | * | isaac[m]1 joined #nim |
12:26:11 | * | pigmej joined #nim |
12:26:11 | * | MrAxilus joined #nim |
12:26:11 | * | ronny joined #nim |
12:26:12 | * | swisscowbell[m] joined #nim |
12:26:14 | FromDiscord | <Rika> so everything EXCEPT the concept refinement section is good to use? |
12:26:16 | * | spymasterd[m] joined #nim |
12:26:16 | * | TheManiac[m] joined #nim |
12:26:16 | * | encryptize[m] joined #nim |
12:26:16 | * | ee7[m] joined #nim |
12:26:17 | * | skrylar[m] joined #nim |
12:26:17 | * | macsek1911[m] joined #nim |
12:26:17 | * | muxueqz[m] joined #nim |
12:26:17 | * | meff[m] joined #nim |
12:26:17 | * | nc-x[m] joined #nim |
12:26:17 | * | narimiran[m] joined #nim |
12:26:18 | * | Kameleon joined #nim |
12:26:18 | * | testgovno[m] joined #nim |
12:26:18 | * | Miguelngel[m] joined #nim |
12:26:18 | * | yglukhov[m] joined #nim |
12:26:18 | * | xomachine[m] joined #nim |
12:26:19 | * | zielmicha[m]1 joined #nim |
12:28:18 | clyybber | Rika: Should be. Well it *is* experimental, but yeah. Just go ahead |
12:29:01 | FromGitter | <gogolxdong> Which is the document describing async and await? |
12:37:50 | Zevv | https://nim-lang.org/docs/asyncdispatch.html? |
12:52:05 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzzโฆ) |
12:56:05 | FromGitter | <gogolxdong> exactly, thanks! |
12:57:51 | lqdev[m] | TIL this syntax `for i, (n, f) in fields:` is supported |
13:03:06 | FromDiscord | <Rika> what. |
13:03:17 | FromDiscord | <Rika> ty for share |
13:15:14 | * | Tyresc joined #nim |
13:23:55 | * | Trustable joined #nim |
13:24:13 | * | dddddd joined #nim |
13:29:25 | * | Kameleon_ joined #nim |
13:29:38 | FromDiscord | <kodkuce> how to trow/raise Exception whitout try ? |
13:30:59 | * | Kameleon_ left #nim (#nim) |
13:31:40 | FromDiscord | <kodkuce> something like if x<10 rise Exception |
13:32:03 | lqdev[m] | @Rika this does tuple unpacking, by the way |
13:32:27 | lqdev[m] | I ended up not using this since I need to iterate my seq backwards, but it was intriguing to learn anyways |
13:33:34 | * | Kameleon_ joined #nim |
13:33:47 | * | nsf quit (Quit: WeeChat 2.5) |
13:34:47 | * | Kameleon left #nim ("User left") |
13:37:43 | * | Kameleon_ quit (Client Quit) |
13:41:21 | FromDiscord | <Rika> yeah which was what i thought you mean |
13:42:20 | * | Kameleon joined #nim |
13:43:44 | * | Hideki_ quit (Remote host closed the connection) |
13:52:10 | FromGitter | <ZeeQyu> Hi! I'm trying to understand how nimsuggest works, but I can only find documentation on how to use a subset of the commands displayed in the usage displayed after you start the --stdin mode. Is the rest of the commands described somewhere? (dus, chk, mod, highlight, outline,known) |
13:56:32 | FromGitter | <nickdex> Any idea why an empty set (hashset from sets module) when intersects (using *) with another non-empty set gives non-empty set as result? |
13:57:11 | FromGitter | <nickdex> Pretty sure it should be empty set |
14:01:11 | FromDiscord | <Rika> can you send a play link or whatever its called |
14:01:29 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=1XMN is {} and {} |
14:01:40 | FromDiscord | <Rika> oh hashset |
14:01:45 | FromDiscord | <Rika> let me check that |
14:03:05 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=1XMP still {} and {} |
14:03:29 | FromGitter | <nickdex> yeah, I am trying to build an example in play ground. The thing is my original code uses stdin for reading bunch of input |
14:03:48 | FromGitter | <nickdex> and repl supports inputs, but has old version of nim |
14:04:34 | FromDiscord | <Rika> yeah... 0.17... very old |
14:05:25 | FromDiscord | <Rika> ideone has 0.19 |
14:08:04 | FromGitter | <nickdex> (https://files.gitter.im/nim-lang/Nim/UmJW/rsz_archlabs-03-3840x1080.png) |
14:08:13 | FromGitter | <nickdex> Here's the screenshot of input/output |
14:08:42 | FromGitter | <nickdex> https://play.nim-lang.org/#ix=1XMS |
14:08:48 | FromGitter | <nickdex> code for reading |
14:11:10 | FromGitter | <nickdex> I think toHashSet is 0.19+ feature, ideone didn't recognize it |
14:11:35 | FromGitter | <nickdex> AUR is also outdated so Im using docker for v1 |
14:14:30 | FromGitter | <nickdex> hmm, very weird on Nim playground it seems to be working fine |
14:14:35 | leorize | @ZeeQyu you need to ask someone that's knowledgable about it |
14:14:49 | leorize | I happen to be one of them if you need any help :P |
14:15:16 | * | dv^_^ joined #nim |
14:16:07 | FromGitter | <nickdex> ok nvmind, found my mistake |
14:16:31 | FromGitter | <nickdex> now I have search how assign a nil value to var variable, if thats possible |
14:17:22 | FromDiscord | <Rika> has to be nillable i think |
14:18:08 | FromGitter | <ZeeQyu> <leorize> I'd love to. I'm not above writing it down and creating a pull request for nimsuggest, too, to solve this more permanently. |
14:18:13 | lqdev[m] | nickdex: the type of that variable has to be `ref` or `ptr`, otherwise it's impossible |
14:18:40 | FromGitter | <ZeeQyu> For starters, what does mod, dus and known do? The rest, I have a clue about. |
14:18:49 | FromGitter | <ZeeQyu> But I have no idea about those three |
14:19:28 | FromGitter | <nickdex> oh okay, so what do you guys if you checking for null/undefined condition, I mean you just declared a variable and want to assign first value or do some other thing otherwise |
14:20:59 | leorize | ZeeQyu: `dus` is what `use` is nowadays |
14:21:28 | leorize | `mod` and `known` are debugging artifacts |
14:21:39 | leorize | `known` let you know if a file is in the modulegraph |
14:22:21 | leorize | not sure what `mod` do though, it never returns anything from my testing |
14:22:30 | FromGitter | <ZeeQyu> so dus = display usages? |
14:22:44 | FromDiscord | <Chiqqum_Ngbata> `const m__thing = 10` -> `Error: invalid token: trailing underscore` |
14:22:46 | FromDiscord | <Chiqqum_Ngbata> Why is this |
14:23:07 | FromGitter | <ZeeQyu> And do you mean use is broken/deprecated? Why's there a new one? |
14:23:41 | * | Vladar joined #nim |
14:25:03 | * | whaletechno quit (Remote host closed the connection) |
14:25:25 | * | whaletechno joined #nim |
14:27:58 | FromDiscord | <jejPony> I am having trouble figuring out how to use the information I am getting from the documentation. I don't know the proper way to use it. In this instance, I'm confused as to how to use HttpCode from httpcore. |
14:29:19 | FromDiscord | <Rika> what're you tryin to do? |
14:29:25 | FromDiscord | <juan_carlos> You need practice basically you mean(?) :P |
14:30:40 | FromDiscord | <jejPony> I'm trying to get the HttpCode of a page, before I try to download it, to make sure it's valid. |
14:31:45 | FromDiscord | <Rika> uh you have to load the page to get a code technically |
14:31:57 | FromDiscord | <Rika> so basically you're trying to pause the download |
14:32:04 | FromDiscord | <jejPony> Yeah |
14:32:09 | FromDiscord | <Rika> maybe try sending a HEAD request instead actually |
14:32:17 | FromDiscord | <juan_carlos> You usually do something like `requestObject.code == Http200` (Pseudocode) |
14:33:23 | FromDiscord | <juan_carlos> But yeah you have to download the thing to get the code of the thing. |
14:33:26 | FromGitter | <ZeeQyu> Furthermore, from what I've understood, con is invocation context, which should be used in the cases of โ let world = "world!" โ discard hello.add( โ Where you'd give the position of the parenthesis to be suggested to use the world variable. However, it doesn't seem to do what I expect. Is my understanding correct? How is it intended to be used? [https://gitter.im/nim-lang/Nim?at=5d99fb360e67130aae250270] |
14:35:05 | FromDiscord | <Rika> try smth like this maybe? disclaimer i'm pretty much a noob too |
14:35:05 | FromDiscord | <Rika> `client.request(url, HttpHead)` |
14:35:23 | FromDiscord | <Rika> im not sure if the codes returned by HEAD requests are the same when you GET the page |
14:36:57 | FromDiscord | <Rika> i tried it out, i think theyre equal |
14:37:00 | FromDiscord | <Chiqqum_Ngbata> Should be, in practice. Seems like you'll probably just want to return some error if status code is not 200, otherwise proceed with response body as normal. Taking a guess |
14:37:05 | FromDiscord | <Rika> but i think it's also dependent on the server |
14:37:32 | FromDiscord | <Rika> ah if you're gonna use the data on 200 then better just directly do the GET request |
14:37:38 | FromDiscord | <Chiqqum_Ngbata> HEAD should respect status codes but of course these things are at the discretion of whomever wrote the server |
14:37:47 | FromDiscord | <Rika> ehem |
14:37:48 | FromDiscord | <jejPony> I'm actually trying to look for a 302 |
14:38:03 | FromDiscord | <Rika> 302 is nothing changed right |
14:38:04 | FromDiscord | <jejPony> Because of the thing im trying to download |
14:38:12 | FromDiscord | <jejPony> 302 is redirect, I thought |
14:38:24 | * | whaletechno quit (Ping timeout: 265 seconds) |
14:38:26 | FromDiscord | <Rika> ah no that's 304 i thoughto f' |
14:40:02 | FromDiscord | <Chiqqum_Ngbata> You just want to GET, check if status code == 302, loop w/ URL pointed to by Location header, or something like this |
14:43:39 | FromDiscord | <Rika> not safe to rely on a maybe (this case being "maybe HEAD request code == GET request code") so yeah |
14:45:29 | * | shomodj joined #nim |
14:45:59 | * | shomodj quit (Client Quit) |
14:47:35 | * | fanta1 quit (Quit: fanta1) |
14:50:35 | FromDiscord | <kodkuce> hmm can i pass string as ref whitout having to wrap it in some new type? |
14:53:16 | FromDiscord | <jejPony> this isnt working so far |
14:53:16 | FromDiscord | <jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630417292282429445/unknown.png |
14:53:57 | FromDiscord | <Rika> change `url2 string` to `url2: string` |
14:54:13 | FromDiscord | <jejPony> ok |
14:54:16 | * | actuallybatman joined #nim |
14:54:28 | FromDiscord | <Rika> i think you need to learn the basic syntax first before going here |
14:54:48 | FromDiscord | <jejPony> ok |
14:55:25 | FromDiscord | <kodkuce> how to pass a pointer to string, or ref or whater if i can ? |
14:55:56 | FromDiscord | <Rika> what |
14:59:36 | * | nsf joined #nim |
14:59:55 | FromDiscord | <kodkuce> proc changeinputedstring( inputedstring: string): |
14:59:55 | FromDiscord | <kodkuce> inputedstring = "somechange" |
14:59:56 | FromDiscord | <kodkuce> |
14:59:56 | FromDiscord | <kodkuce> var |
14:59:56 | FromDiscord | <kodkuce> mystring:string = "vanila" |
14:59:56 | FromDiscord | <kodkuce> |
14:59:56 | FromDiscord | <kodkuce> changeinputedstring(mystring) |
14:59:58 | FromDiscord | <kodkuce> |
15:00:00 | FromDiscord | <kodkuce> echo mystring << SHOULD BE "somechange" and not vanila , i want proc changeinputedstring() to change oreginal var |
15:00:23 | FromDiscord | <kodkuce> and no i dont want to do |
15:00:23 | FromDiscord | <kodkuce> mystring = changeinputedstring( mystring) |
15:00:48 | FromDiscord | <kodkuce> i want changeinputedstring( TOPASSREFERECE, AKA POINTER) |
15:02:11 | FromGitter | <ZeeQyu> @kodkuce I think you're looking for proc changeinputedstring(inputedstring: var string) |
15:03:59 | FromDiscord | <kodkuce> default is passing by value, and i want by ref |
15:04:09 | FromDiscord | <Rika> this is making the parameter mutable |
15:04:11 | FromDiscord | <Rika> which is what you want |
15:04:13 | FromGitter | <ZeeQyu> notice the var keyword |
15:04:32 | FromDiscord | <Rika> inputedstring: var string |
15:04:32 | FromDiscord | <Rika> instead of |
15:04:32 | FromDiscord | <Rika> inputedstring: string |
15:04:34 | FromDiscord | <kodkuce> i think var just passes it by value but as variable |
15:04:42 | FromDiscord | <Rika> and? it does what you want afaik |
15:04:45 | FromDiscord | <kodkuce> will try but i dont hink it wokrs |
15:04:58 | FromDiscord | <Rika> try it |
15:06:58 | FromDiscord | <kodkuce> ok it works sorry my bad, |
15:07:05 | FromDiscord | <jejPony> this is driving me insane, i think im gonna stop |
15:07:49 | FromDiscord | <Rika> jejPony: take it slow; dont force info into your head |
15:08:00 | FromDiscord | <Rika> if you dont get it, drop it for the moment and do something else |
15:08:12 | FromDiscord | <Rika> try again at another time, when you feel like it |
15:09:02 | FromDiscord | <kodkuce> whats driving you insane? |
15:10:29 | FromDiscord | <Rika> think it was trying to figure out how to do what he was trying to code |
15:10:37 | FromDiscord | <Rika> but that is just an assumptuion |
15:11:08 | FromGitter | <nickdex> can someone send link for discord room |
15:11:43 | FromGitter | <nickdex> nvmind got it :) |
15:17:09 | FromDiscord | <Rika> ๐ |
15:18:15 | FromDiscord | <badassiel> @jejPony might be better to start with simpler stuff, thats what I'm doing ๐ sources - opengenus/cosmos (github), hackerrank, codechef etc |
15:18:56 | FromDiscord | <Rika> are you nickdex or |
15:21:14 | * | fanta1 joined #nim |
15:22:46 | FromDiscord | <kodkuce> i already did whole poker logic in nim, but i find doining exercism quests realy nice for learning up |
15:27:33 | FromDiscord | <Kiloneie> If any of you new names are a beginner, you might find my videos on Nim useful. |
15:27:40 | * | al_ joined #nim |
15:27:46 | FromDiscord | <badassiel> @Rika yeah, this is my gamer profile |
15:28:22 | FromDiscord | <Rika> i'm not that beginner; im just here trying to store objects like this one python library did |
15:28:33 | FromDiscord | <Kiloneie> not talking about you |
15:28:38 | FromDiscord | <Rika> ;w; |
15:28:40 | FromDiscord | <Rika> okay |
15:28:56 | FromDiscord | <Rika> ***oof*** |
15:36:23 | FromDiscord | <badassiel> @kodkuce thanks for recommending exercism, looks good for levelling up |
15:38:50 | FromDiscord | <Rika> so i have an issue; i need to make an object that contains any one of four types in one of its fields BUT i cannot have a generic because the object itself should be able to be put in a seq with other objects (containing a seq of different types) |
15:39:01 | FromDiscord | <kodkuce> @badassiel when you do some , and publish be sure to check some other people solutions you see a lot of ways to simplefay stuff sometimes or opposite ๐ |
15:39:29 | FromDiscord | <Rika> wasnt an issue in python ofc but i cant think of an elegant solution to this other than making a tuple inside and just making a function that gets the right seq in that tuple |
15:39:39 | FromDiscord | <Kiloneie> Maybe use a Tuple ? |
15:39:40 | FromDiscord | <Kiloneie> idk |
15:39:58 | FromDiscord | <Kiloneie> oh wait. |
15:40:07 | FromDiscord | <Rika> ? |
15:40:16 | FromDiscord | <kodkuce> did you post this on reddit too? |
15:40:21 | FromDiscord | <Rika> nope not yet |
15:40:25 | FromDiscord | <Rika> only got to this issue now |
15:40:31 | FromDiscord | <kodkuce> i think i saw somone writing about it |
15:40:39 | FromDiscord | <kodkuce> or meybe i worng |
15:40:51 | FromDiscord | <Rika> if you look at my profile right now, i'm making a curve object with "curve segments" in a seq |
15:41:12 | FromDiscord | <Rika> curves can be bezier, linear, or etc but they dont mix inside the curve object |
15:41:26 | FromDiscord | <kodkuce> https://www.reddit.com/r/nim/comments/dbre8v/storing_type_in_seq/ i thinked this but i was wrong |
15:41:31 | FromDiscord | <kodkuce> i thinkk xD |
15:41:35 | FromDiscord | <Rika> ill look into it |
15:42:57 | FromDiscord | <Rika> er ill just try the "tuple and procedure" thing i mentioned |
15:43:01 | Araq | don't store "types" anywhere |
15:43:02 | FromDiscord | <ZeeQyu> Yeah, I was about to suggest the case of in type definition syntax, whatever it's called, which is mentioned in one of the comments there. Can you store those in a seq? |
15:43:03 | FromDiscord | <Rika> sounds like its the only way |
15:43:07 | FromDiscord | <badassiel> @kodkuce sure, will keep in mind ๐ |
15:43:07 | FromDiscord | <Rika> i didnt mean type sorry |
15:43:09 | Araq | types only exist at compile-time |
15:43:10 | FromDiscord | <Rika> i meant another object |
15:43:47 | clyybber | Araq: Hey, making the default field thing work for ref objects is a bit harder than expected. |
15:44:03 | clyybber | Their loc.lode.kind == nkEmpty |
15:44:06 | FromDiscord | <Kiloneie> @Araq what did you mean by, no love for "result" variable ? Did i overshadow it too much via "return" keyword D:, is that way you meant D: ? |
15:44:26 | Araq | Kiloneie: you only showed 'return' |
15:44:40 | FromDiscord | <Kiloneie> no.. |
15:44:51 | Araq | no? sorry, I skimmed it |
15:45:00 | FromDiscord | <ZeeQyu> Hi Araq, nice to meet you. This is my first time in this chat, and I just wanted to let you know that it's a wonderful language you've designed here. |
15:45:13 | FromDiscord | <Kiloneie> https://www.youtube.com/watch?v=THOQLLT9RJk&feature=youtu.be |
15:45:14 | Araq | thanks |
15:45:23 | FromDiscord | <Kiloneie> this is where i used it, and i used it before return |
15:45:50 | Araq | sorry |
15:45:59 | FromDiscord | <Kiloneie> i do have timestamps, so if you wanna skip trough the video, try the stamps ๐ |
15:46:06 | Araq | missed it completely, I'm debugging |
15:46:34 | FromDiscord | <kodkuce> comming form c# i used to use return alwies now i am starting to feele result good too ๐ |
15:46:59 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=1XFk something like this ;n; |
15:47:00 | FromDiscord | <kodkuce> or even not writing result |
15:47:08 | FromDiscord | <Kiloneie> both are useful. |
15:47:31 | Araq | clyybber: why look at 'lode' and not at the type? |
15:47:33 | FromDiscord | <Rika> oh yeah i love this language too i just cant understand it |
15:47:51 | Araq | Rika: what do you want to know? |
15:48:12 | FromDiscord | <ZeeQyu> Araq: While you're getting bombarded with questions, let me add another one on top. Nimsuggest: what does mod do? And what is the story behind dus and use, considering leorize said they're related? |
15:48:36 | clyybber | Araq: I need lode to construct a nkDotExpr so I generate an assignment. |
15:48:50 | clyybber | But maybe I'm overthinking this and theres a much better way to assign the fields |
15:48:53 | FromDiscord | <Rika> i dont know what to do for the scenario i said above ;w; i clarified it in the play.nim-lang.org link to the best of my ability |
15:48:56 | Araq | 'dus' tries to be smart, it means "goto definition if you're on a usage and goto usages if you're on a definition" |
15:49:37 | Araq | 'mod <file>' means "assume <file> has been changed" |
15:50:10 | Araq | iirc 'mod' is mostly for writing tests |
15:51:02 | FromDiscord | <ZeeQyu> So you would call mod <file>, then, in a new row, call f.ex. def to assure you're using the newest version of the file? |
15:51:36 | FromDiscord | <ZeeQyu> Or does it have no purpose in an actual IDE-assisting situation? |
15:51:37 | Araq | and 'dus' is what every editor should do but doesn't. it's like a "jump around" command, I hate the context switch and the thinking about "goto definition" vs "goto usage(s)" |
15:51:42 | FromDiscord | <Kiloneie> Does anyone have a better title name than Slices and More on Strings ? Video talks about slices, to string conversion and string contentation... |
15:52:04 | FromDiscord | <Rika> contentation? concatenation? |
15:52:27 | FromDiscord | <Kiloneie> i don't know how to spell that word |
15:52:29 | FromDiscord | <juan_carlos> Makes strings happy/ |
15:52:30 | disruptek | Araq: ah, that makes a lot of sense. |
15:52:51 | FromDiscord | <Kiloneie> Slices and Strings in Depth ? |
15:52:52 | Araq | ZeeQyu: to the best of my knowledge 'mod' has no purpose for text-editor integration, nimsuggest tracks file changes on its own anyway |
15:53:47 | FromDiscord | <Rika> did you record the video already? |
15:53:52 | FromDiscord | <Kiloneie> No |
15:53:59 | FromDiscord | <Kiloneie> i am about to |
15:54:15 | shashlick | @disruptek aah |
15:54:24 | FromDiscord | <ZeeQyu> Araq: Alright. Would you mind if I asked a lot of questions about nimsuggest for the purpose of then using the information to create a pull request for the editor integration page and the tool itself, adding a help section, so you don't need to answer these questions agan? |
15:54:26 | shashlick | Checked out golden a bit |
15:54:53 | shashlick | Use a config.nims, nim.cfg seems to have an issue with define values |
15:55:07 | disruptek | just pushed it. |
15:55:44 | shashlick | Also git_last_error does get wrapped but you need to use $ since message is a cstring |
15:55:58 | Araq | Rika: set intersection is defined as "all the elements that exist in both sets" |
15:56:05 | disruptek | yeah, that's old code. |
15:56:09 | FromDiscord | <ZeeQyu> I'm intending to create a sorely needed JetBrains language support plugin, so I'd need to learn the details of nimsuggest anyway. |
15:56:17 | Araq | and so x * {} is {} |
15:56:33 | Araq | maybe you want '+' instead? (set union) |
15:57:06 | FromDiscord | <Rika> uh |
15:57:11 | Araq | ZeeQyu: I don't mind PRs like that, I welcome them |
15:57:12 | FromDiscord | <Rika> i think i copied the wrong link |
15:57:26 | FromDiscord | <Rika> did i??? |
15:57:43 | FromDiscord | <ZeeQyu> Araq: I was asking more about if you were okay with the questions. ^.^ |
15:57:44 | FromDiscord | <Rika> i dont seem to have copied the wrong one; just in case, it's this one https://play.nim-lang.org/#ix=1XFk |
15:58:41 | shashlick | @disruptek ok any other blockers? |
15:59:39 | disruptek | shashlick: no, i tol' you -- i'm sorted, thanks! ๐ |
15:59:46 | shashlick | I think it is worth logging the nim.cfg issue with values |
15:59:50 | Araq | https://play.nim-lang.org/#ix=1XNA Rika |
15:59:58 | disruptek | zeeqyu: leorize knows too much about nimsuggest. |
16:00:12 | disruptek | alright, i'll issue it. |
16:01:13 | FromDiscord | <Rika> Araq: i mean the comments below; what should i do regarding the Curve; I want (theoretical) Curve[Bezier] to live in a seq with Curve[Linear]s ๐ฆ sorry i feel like this is consuming a lot of time |
16:01:14 | Araq | but I think https://play.nim-lang.org/#ix=1XNB is much easier to use |
16:01:28 | FromDiscord | <Rika> ah hmm okay |
16:01:46 | shashlick | So you are using dynamic and not static? |
16:01:53 | FromDiscord | <Rika> i'll go with that, thanks |
16:03:00 | FromDiscord | <ZeeQyu> Araq: For starters, I'd like to confirm that the undocumented commands do what I'm guessing they do and what it looks like they're doing. Outline is used to create an outline of a file in some sidebar, which contains all the definitions in a file, with their nesting information? highlight is intended to be used for syntax highlighting, to color words different colors based on what function it fills in the code? leorize said known is for know |
16:03:39 | Araq | everything leorize said is true |
16:04:03 | FromDiscord | <ZeeQyu> I'm guessing chk is to check for errors in a file, but when I run it on a file, I get errors within the system.nim file, so I don't think I'm using it correctly (chk test.nim) |
16:04:19 | Araq | I don't remember 'outline' :-) but what you say makes sense |
16:04:35 | FromDiscord | <badassiel> erm we dont have conditional operator (? : ) in nim ? have any inline binary conditional syntax or just if else? |
16:05:00 | Araq | (if cond: exprA else: exprB) badassiel |
16:05:05 | FromDiscord | <ZeeQyu> I'm not doubting the veracity of leorize's claims. I'm just trying to make sense of them. |
16:05:34 | FromDiscord | <kodkuce> @badassiel you do var x = if 5<3: 22 else: 55 |
16:05:42 | Araq | as for your question, I don't know why 'chk' fails on system.nim, maybe a wrong setup |
16:05:43 | FromDiscord | <badassiel> oh, kinda like python version then |
16:05:43 | FromDiscord | <kodkuce> if asking about terrary like operator |
16:06:30 | FromDiscord | <ZeeQyu> For memory: the help once you start nimsuggest in nim 1.0.0 is |
16:06:30 | FromDiscord | <ZeeQyu> usage: sug|con|def|use|dus|chk|mod|highlight|outline|known file.nim[;dirtyfile.nim]:line:col |
16:06:58 | * | Trustable quit (Remote host closed the connection) |
16:07:03 | Araq | yeah, I don't know 'outline' |
16:07:12 | Araq | everything else was covered |
16:08:00 | * | Trustable joined #nim |
16:08:26 | FromDiscord | <ZeeQyu> Apparently it was a wrong setup, updating with choosenim to 1.0.0 from 0.20.2 gave me only errors in the current file. Not sure what I did to cause that though, there shouldn't be such a difference between the RC and the release, I'm guessing. |
16:08:46 | clyybber | Araq: The problem is this: in genNew (or rawGenNew) I need to generate field assignments for all the fields of the ref object that have a default value, but for that I need the nkSym of the ref object. |
16:09:21 | clyybber | This works for normal objects because their loc.lode is the nkSym of the object. But for ref objects it doesn't |
16:11:04 | FromDiscord | <ZeeQyu> What is the purpose of specifying a file at startup of nimsuggest? Which file should be specified, the "main" file calling everything else, or whichever file is currently open? |
16:11:24 | FromDiscord | <ZeeQyu> What does "in the modulegraph" mean? Is that as in if it's included (or in a dependency of an included file) in the file you specified in the nimsuggest startup command? |
16:11:38 | Araq | ZeeQyu: you should specify a *directory* these days |
16:11:49 | FromDiscord | <ZeeQyu> Oh, that makes more sense |
16:12:14 | Araq | but according to Zevv our auto-detection for the "main Nim project file" could be better (I'm waiting for his PR) |
16:12:50 | Araq | "in the modulegraph" means it's some file that belongs to the project |
16:13:42 | FromDiscord | <ZeeQyu> When you say "these days", do you mean bleeding edge or, 1.0.0? calling nimsuggest --stdin . |
16:13:42 | FromDiscord | <ZeeQyu> gives |
16:13:43 | FromDiscord | <ZeeQyu> cannot find file: <path to current directory> |
16:14:26 | FromDiscord | <ZeeQyu> Belongs to the project. If I hadn't included f.ex. macros from the stdlib, would that yield false then? |
16:15:31 | Araq | I mean since 0.20 |
16:15:38 | Araq | maybe earlier |
16:16:04 | Araq | what do you mean "cannot fine file"? the directory should have a .nim file |
16:16:43 | Araq | clyybber: I am not sure, patch the code so that loc.lode contains something useful? |
16:17:22 | Mister_Magister | how do you do inline if in nim like in c++ ?: ? |
16:17:58 | FromDiscord | <ZeeQyu> My directory structure is {SOMEPATH}/extras/test.nim |
16:17:58 | FromDiscord | <ZeeQyu> I am in the extras folder and I call |
16:17:58 | FromDiscord | <ZeeQyu> nimsuggest --stdin . |
16:17:58 | FromDiscord | <ZeeQyu> and get that {SOMEPATH}/extras is a file that cannot be found. |
16:17:59 | * | solitudesf joined #nim |
16:18:07 | FromDiscord | <ZeeQyu> The folder only has the one file |
16:18:57 | FromDiscord | <Rika> are non-exported procedures seen by the rest of the "module", or is it only within the file? |
16:19:18 | clyybber | Araq: Yeah, I'll try a few things. Also how should I handle case objects? |
16:19:47 | clyybber | Is there some part of the compiler I can reuse for them? |
16:20:17 | clyybber | As in determining which case branch they are "on" |
16:21:54 | FromDiscord | <ZeeQyu> I'm on windows 10, using powershell inside visual studio code, in case it has relevance |
16:22:44 | Araq | try 'nimsuggest --stdin somepath/extras' |
16:23:07 | FromDiscord | <Kiloneie> echo sequence1[0 .. < 2] this is deprecated ? what is to be used instead ? |
16:23:33 | Araq | ..< without the space |
16:23:36 | FromDiscord | <ZeeQyu> It's the ..< instead of .. <, right? Removing the space |
16:23:41 | FromDiscord | <ZeeQyu> Too slow ^.^ |
16:24:06 | FromDiscord | <Kiloneie> oO okay... i don't see the point of this deprecation but okay. |
16:24:23 | clyybber | its unambiguous |
16:24:48 | FromDiscord | <kodkuce> is there some way to deduct 1 seq form other , something like this |
16:24:48 | FromDiscord | <kodkuce> var |
16:24:48 | FromDiscord | <kodkuce> g1:seq[string] = @["m1","m2","m3","m4","m5"] |
16:24:48 | FromDiscord | <kodkuce> g2:seq[string] = @["m1","m2","m5"] |
16:24:48 | FromDiscord | <kodkuce> g3:seq[string] = g1 - g2 <<< GIVE ME @["m3","m4"] |
16:25:24 | FromDiscord | <Rika> you can do that with sets but you know sets |
16:25:36 | FromDiscord | <Rika> no dupes, order lost too i think |
16:25:49 | FromDiscord | <kodkuce> but i need dupes ๐ฆ |
16:25:57 | FromDiscord | <kodkuce> guess will manualy for loop it |
16:26:30 | Zevv | I have nothing to do with autodetection araq, you need leorize |
16:27:48 | * | radsoc joined #nim |
16:29:29 | FromDiscord | <ZeeQyu> Araq: Here's something more comprehensive describing the problem |
16:29:30 | FromDiscord | <ZeeQyu> https://gist.github.com/ZeeQyu/53b643fa741a27b7b57ec4a1e14e8f3b |
16:29:32 | leorize | Araq, ZeeQyu: the current autodetection is terrible |
16:30:06 | FromDiscord | <ZeeQyu> So what's the recommended workaround? Give nimsuggest the current main file? |
16:30:19 | leorize | yes |
16:30:31 | leorize | it can auto detect if a nim configuration file is found |
16:31:08 | leorize | or a nimble file |
16:31:10 | FromDiscord | <ZeeQyu> But in the future, give the entire project folder to it? What does specifying the file do, preload files/folder? |
16:31:18 | leorize | but it will never work with the current nimble structure |
16:31:47 | leorize | specifying the project file makes it the entry file of the project |
16:32:04 | leorize | nimsuggest will start parsing from there to get the types, etc. |
16:32:20 | leorize | it's not important until you have to deal with `include` files |
16:33:10 | Araq | kodkuce: sequtils.deduplicate |
16:34:18 | FromDiscord | <ZeeQyu> And once you do include files, how should you reason about it? I'm guessing include doesn't use the import order, so does include files get interpreted relative to the selected file's folder? |
16:35:31 | leorize | nah, include files get interpreted relative to the file that includes it |
16:35:35 | leorize | like how Nim does |
16:36:04 | Araq | give nimsuggest the main Nim file and 'include files' do work, we have tests that prove it |
16:36:20 | leorize | so for big projects like the compiler itself |
16:36:39 | leorize | sem.nim is splitted into semexprs.nim, semstmts.nim, etc. |
16:36:54 | FromDiscord | <Kiloneie> Should i include the ^ different syntax for slices ? i don't personally get really... |
16:37:00 | FromDiscord | <Kiloneie> it * |
16:37:02 | leorize | if you run nimsuggest on semexprs.nim, nimsuggest wouldn't know where all the types and proc in there came from |
16:37:13 | FromDiscord | <ZeeQyu> Ooh, I see |
16:41:08 | FromDiscord | <ZeeQyu> What is the quality and prefix values returned by sug, as described here https://github.com/nim-lang/nimsuggest/issues/86 ? |
16:42:05 | leorize | prefix is if the suggestion share the same prefix with the current text I think |
16:42:31 | leorize | quality is just a number for the epc backend |
16:42:35 | FromDiscord | <ZeeQyu> So it's either "Prefix" or ""? |
16:42:59 | leorize | so far I only see quality 100 |
16:43:07 | leorize | https://github.com/nim-lang/Nim/blob/27b081d1f77604ee47c886e69dbc52f53ea3741f/compiler/prefixmatches.nim#L13 |
16:43:11 | leorize | that's all the prefixes |
16:43:39 | FromDiscord | <ZeeQyu> How would you use the prefixes in an ide implementation scenario? |
16:44:06 | leorize | it can be used for order of suggestions |
16:44:16 | leorize | None gets the lowest priority |
16:44:27 | leorize | Abbrev gets the higher one |
16:44:32 | leorize | Substr even higher |
16:44:36 | leorize | Prefix the highest |
16:44:43 | FromDiscord | <ZeeQyu> But doesn't nimsuggest order its results anyway? |
16:44:54 | leorize | nope |
16:44:57 | leorize | it doesn't |
16:46:58 | leorize | are you writing an editor plugin? |
16:47:01 | FromDiscord | <ZeeQyu> Oh, it's in order of discovery? Huh. That's interesting. |
16:47:01 | FromDiscord | <ZeeQyu> So what's epc again? I think I read it related to emacs. |
16:47:25 | FromDiscord | <ZeeQyu> I intend to create a Jetbrains nim support plugin, as well as improve the documentation for nimsuggest. |
16:48:08 | * | Senketsu joined #nim |
16:48:17 | leorize | epc is a lisp-based ipc for emacs |
16:48:33 | leorize | if you need any help, please let me know :) |
16:48:53 | FromDiscord | <ZeeQyu> For especially the second one, I'd like to be sure I've understood how the nimsuggest interface works in detail. |
16:49:00 | * | hami joined #nim |
16:49:04 | FromDiscord | <ZeeQyu> And not guessing ^.^ |
16:49:13 | FromDiscord | <ZeeQyu> That's why I'm asking so many questions. |
16:49:35 | FromDiscord | <ZeeQyu> I will! |
16:49:40 | leorize | I can assure you that my answers are from actual reading of nim's source code :P |
16:49:52 | FromDiscord | <ZeeQyu> Not writing it? |
16:49:56 | FromDiscord | <ZeeQyu> Who wrote it? |
16:50:16 | leorize | also, I'm the author of https://github.com/alaviss/nim.nvim, so feel free to take any parts that you need to implement there |
16:50:25 | FromDiscord | <ZeeQyu> Sure will! |
16:50:27 | leorize | Araq wrote it |
16:50:52 | leorize | you can assume that most of nim was initially written by araq :P |
16:50:54 | FromDiscord | <ZeeQyu> But I'm guessing he's taken some pull requests, considering he didn't recognize the outline command |
16:51:12 | FromDiscord | <ZeeQyu> And yeah, that seems to be the theme |
16:51:28 | leorize | nah, he implemented it :P you can read the commit log |
16:51:37 | FromDiscord | <ZeeQyu> Huh, funny |
16:51:56 | FromDiscord | <ZeeQyu> I suppose it gets hard to keep track of this amount of code |
16:52:04 | FromDiscord | <ZeeQyu> So IPC, as in inter-process communication? in epc, what is quality used for? |
16:52:19 | leorize | for their completion engine I presume |
16:52:20 | FromDiscord | <Chiqqum_Ngbata> Is there a way to trick nim into accepting leading/trailing underscores in identifiers? |
16:52:22 | leorize | not an emacs user |
16:52:34 | leorize | Chiqqum_Ngbata: there aren't any |
16:52:38 | leorize | please don't use them |
16:52:46 | FromDiscord | <Chiqqum_Ngbata> Trying to generate a binding and it wants a __thing__ |
16:52:57 | FromDiscord | <Chiqqum_Ngbata> `__thing__` * |
16:53:01 | leorize | give it a better name :P |
16:53:10 | disruptek | you can use both at the same time if your identifier is short enough. |
16:54:01 | FromDiscord | <ZeeQyu> disruptek: I just tried it, It doesn't seem to work. |
16:54:13 | disruptek | make the identifier shorter. |
16:54:29 | leorize | like real short |
16:54:32 | FromDiscord | <ZeeQyu> shorter than |
16:54:32 | FromDiscord | <ZeeQyu> let _ = 5 |
16:54:32 | FromDiscord | <ZeeQyu> ? |
16:54:39 | leorize | !eval let _ = 5 |
16:54:41 | NimBot | <no output> |
16:54:45 | disruptek | none more short. |
16:54:59 | FromDiscord | <ZeeQyu> !eval let _ = 5 |
16:54:59 | FromDiscord | <ZeeQyu> echo _ |
16:55:01 | NimBot | <no output> |
16:55:10 | leorize | it can't do multiline |
16:55:17 | FromDiscord | <ZeeQyu> Can you send multiline- darn. |
16:55:32 | disruptek | use a semicolon. |
16:55:56 | FromDiscord | <ZeeQyu> !eval let _ = 5; echo _ |
16:55:58 | NimBot | Compile failed: /usercode/in.nim(1, 17) Error: undeclared identifier: '_' |
16:56:04 | FromDiscord | <ZeeQyu> Yeah, same as I get |
16:56:08 | leorize | `_` is a special identifier |
16:56:15 | leorize | it's a blackhole |
16:56:19 | FromDiscord | <ZeeQyu> Oh, nice |
16:56:56 | FromDiscord | <ZeeQyu> But your guess is that quality is a priority thing? First in the list if highest quality or something? |
16:57:10 | leorize | yea |
16:57:15 | leorize | but I ignore it always |
16:57:27 | FromDiscord | <ZeeQyu> Lol |
16:57:48 | leorize | most completion engine can resolve all that prefix abbrev thingy anyway |
16:57:52 | leorize | so I skip that part also |
16:58:17 | * | Senketsu quit (Quit: WeeChat 2.5) |
16:58:20 | * | fanta1 quit (Quit: fanta1) |
16:59:28 | FromDiscord | <ZeeQyu> I think I have a lot to go on. Now I need to sit down and understand the Jetbrains plugin interface to see if I can make the two parts play ball. My plan is to create some level of this plugin, and then, when I know all about it, write in-program documentation for nimsuggest, update the ide integration guide and the idetools page, and create pull-requests for all that when I have a good grasp of the details. |
16:59:40 | FromDiscord | <ZeeQyu> leorize, Araq, thanks for all your help |
17:00:02 | FromDiscord | <ZeeQyu> And leorize, considering you already have the knowledge base, feel free to beat me to updating the documentation. I won't be upset. |
17:00:31 | * | Senketsu joined #nim |
17:00:37 | FromDiscord | <ZeeQyu> But if you don't feel like it, it's cool. I rather enjoy writing documentation. |
17:01:00 | leorize | I don't :P writing documentation is booring |
17:01:27 | FromDiscord | <ZeeQyu> Good thing you seem to enjoy answering questions then. ^.^ |
17:01:30 | FromDiscord | <ZeeQyu> Almost as good |
17:06:03 | * | Senketsu quit (Quit: WeeChat 2.5) |
17:07:28 | * | Senketsu joined #nim |
17:15:15 | * | traviss quit (Quit: Leaving) |
17:17:26 | * | traviss joined #nim |
17:19:32 | FromDiscord | <Karl Marx> So you can communicate with the Gitter people via here |
17:19:43 | FromDiscord | <Karl Marx> This is super smart |
17:24:28 | * | actuallybatman quit (Ping timeout: 245 seconds) |
17:26:07 | * | Senketsu quit (Quit: WeeChat 2.5) |
17:31:28 | * | Senketsu joined #nim |
17:31:36 | * | whaletechno joined #nim |
17:32:59 | * | Senketsu quit (Client Quit) |
17:34:53 | Araq | https://www.swb-marathon.de/files/bilder/2019/M_Bremen_Marathon_org.jpg I did it |
17:35:15 | Araq | in 4 hours 36 minutes |
17:36:16 | Zevv | dude |
17:36:33 | Zevv | congrats |
17:36:57 | Araq | thanks |
17:38:14 | * | Zevv is impressed - that'd take me at least two days :) |
17:38:31 | disruptek | that's ridonkulous. |
17:38:43 | disruptek | were you on a bicycle? |
17:39:34 | Araq | Marathon on a bicycle? lol, no, I used my feet |
17:40:48 | * | Senketsu joined #nim |
17:41:19 | disruptek | all the more remarkable an achievment. |
17:42:10 | Araq | thanks, I tried to beat 4:30 though. had some lovely storm against me for km 34 until 38 though, so I have a good excuse |
17:42:17 | disruptek | i was fast when i was a kid, can't seem to get motivated now. how much do you run during a normal week? |
17:42:31 | Araq | 4 times. |
17:42:54 | FromDiscord | <Kiloneie> That's both healthy and unhealthy. Marathons do nothing good for your body. |
17:43:48 | Zevv | all the more for your soul :) |
17:44:11 | Araq | it's quite comparable to inventing your own programming language. A very bad idea. |
17:44:15 | disruptek | it's pretty healthy from a mental perspective. |
17:44:44 | FromDiscord | <Kiloneie> nah language is awesome, it's very healthy, as long as you don't stress yourself, then you grow cancer in time |
17:44:45 | nixfreak | dude why negative just say congrats |
17:45:03 | * | narimiran joined #nim |
17:45:11 | Araq | nixfreak: it's fine, don't worry |
17:45:15 | disruptek | i have a buddy that runs 5 miles/day 4x per week and 12 miles/day the other days. he's about 60, been doing it for 30 years at least. |
17:45:21 | FromDiscord | <Kiloneie> Sorry, congrats |
17:46:22 | FromDiscord | <Kiloneie> i am just trying to say that shorter runs are healthy, long ones aren't... |
17:46:28 | nixfreak | Araq would say that much exercise has improved metal capability (programming lets say) or stayed about the same |
17:46:42 | FromDiscord | <Kiloneie> you feel more alive |
17:47:12 | FromDiscord | <Kiloneie> i can't start doing anything as good without workout in the morning |
17:47:12 | nixfreak | kiloneie no evidence to back that up |
17:47:34 | FromDiscord | <Kiloneie> i feel sleepy as hells if i don't workout |
17:48:26 | Araq | nixfreak: I don't really know. However, the best ideas I had for Nim occured to me during jogging |
17:49:13 | FromDiscord | <Kiloneie> I did a lot of thinking in my previous job, since my body went on auto pilot after i learned how to do my job. |
17:49:53 | FromDiscord | <Kiloneie> To help time fly one tries to think. |
17:50:26 | * | shomodj joined #nim |
17:51:04 | nixfreak | Araq that makes sense, and very interesting |
17:51:08 | FromDiscord | <Kiloneie> https://youtu.be/eN2cjLn1Y1w |
17:52:30 | * | ofelas joined #nim |
17:53:41 | nixfreak | well congrats man |
17:54:09 | nixfreak | Does anyone know of a nim gui lib / wrapper that works cross compiled lets say from osx/unix to windows? |
17:54:46 | Araq | any UI lib that supports Windows should work fine and you can use 'wine' to test it |
17:56:25 | nixfreak | Thats true , forgot about WINE , thanks |
18:03:41 | FromDiscord | <ZeeQyu> Good job, Araq! |
18:04:36 | * | Senketsu quit (Quit: WeeChat 2.5) |
18:05:13 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzzโฆ) |
18:05:38 | * | Senketsu joined #nim |
18:07:48 | Araq | thanks! |
18:08:05 | clyybber | why would Marathons be bad for your body? |
18:08:29 | Araq | it's bad for your knees |
18:08:31 | clyybber | Oh well |
18:08:36 | clyybber | Everythings bad for your knees |
18:08:41 | Araq | lol |
18:08:49 | clyybber | Also, congrats |
18:09:17 | Araq | I think I'll switch to half marathons next year |
18:09:37 | disruptek | a friend did the leadville 100 last year. |
18:09:51 | Araq | what's that, 100 miles? |
18:10:10 | disruptek | yeah, in 24hrs. and at altitude. and with varied altitude. in the mountains. |
18:10:32 | disruptek | he made it in 23.5hrs. |
18:10:54 | disruptek | you people are insane. |
18:11:48 | Araq | can't disagree, it's quite mad |
18:12:16 | Araq | but 21km is just right |
18:12:20 | * | radsoc quit (Quit: radsoc) |
18:12:51 | * | actuallybatman joined #nim |
18:13:30 | * | shomodj joined #nim |
18:15:03 | * | shomodj quit (Client Quit) |
18:15:11 | FromDiscord | <Kiloneie> I know about marathon problems trough my sister who kept doing them, and then could barely walk. Over exertion. |
18:15:31 | disruptek | it's different when you're running from cops. |
18:15:57 | clyybber | that I'm proficient in |
18:16:09 | FromDiscord | <Kiloneie> To me personally, i just do a 20 min workout + 2x 5 min running on the treadmill. Because i sit all day and i will probably die of heart attack, gotta move. |
18:16:45 | Araq | Kiloneie: well "barely walk" is only after the run |
18:16:57 | FromDiscord | <Kiloneie> for her it was for days after xD |
18:17:13 | FromDiscord | <Kiloneie> she was doing public marathons, and was in top runners always. |
18:17:18 | Araq | and it's kinda the point to test your limits |
18:17:19 | clyybber | Ooh I had a few fights were walking was hard afterwards |
18:17:30 | clyybber | I guess it happens in every sport with feet |
18:17:46 | disruptek | when i first moved to colorado, i was living at 10,000' on top of a mountain. i had to pause to catch my breath every time i ran down a mountain lion. |
18:17:49 | Araq | I can barely walk too now fwiw |
18:18:15 | FromDiscord | <Kiloneie> Now eat some protein D: |
18:18:16 | disruptek | not mountain lion. not sure why i said that. every time i walked up stairs. that's what i meant. |
18:18:22 | FromDiscord | <Kiloneie> xD |
18:18:32 | clyybber | wth |
18:18:43 | clyybber | lol |
18:19:18 | disruptek | yeah don't do that. |
18:19:29 | disruptek | it's one thing to chase a bear, it's another to chase a cougar. |
18:19:36 | * | tdc quit (Ping timeout: 240 seconds) |
18:19:56 | FromDiscord | <Kiloneie> oO, what pretty sure you die in both instances |
18:20:13 | FromDiscord | <Kiloneie> unless you are sporting an assault rifle, or an elephant gun |
18:20:22 | disruptek | they are really fast and they get very grumpy when you grab their tails. |
18:24:07 | * | solitudesf quit (Remote host closed the connection) |
18:28:26 | * | Senketsu quit (Ping timeout: 240 seconds) |
18:28:30 | Araq | Kiloneie: what are/were her times? |
18:28:48 | * | NimBot joined #nim |
18:29:07 | * | solitudesf joined #nim |
18:29:34 | FromDiscord | <Kiloneie> That i don't know, as she was a terrible sister... She got plenty of medals when she was younger and in the recent few years. |
18:29:53 | FromDiscord | <Kiloneie> We barely talk ever. |
18:41:54 | * | tdc joined #nim |
18:44:34 | * | lritter joined #nim |
18:45:09 | FromDiscord | <Chiqqum_Ngbata> I assume someone here has familiarity with nimgen |
18:46:26 | FromDiscord | <Chiqqum_Ngbata> ``` |
18:46:26 | FromDiscord | <Chiqqum_Ngbata> search.0 = "define ERL_NIF_INLINE __inline__" |
18:46:27 | FromDiscord | <Chiqqum_Ngbata> replace.0 = "XXX" |
18:46:27 | FromDiscord | <Chiqqum_Ngbata> ``` |
18:46:45 | FromDiscord | <Chiqqum_Ngbata> Somehow when I add this clause to nimgen .cfg it all hangs. Am I doing something obviously wrong? |
18:47:30 | * | radsoc joined #nim |
18:58:30 | FromDiscord | <Chiqqum_Ngbata> Just trying to do a string replace on a header file before preprocessor |
19:05:04 | FromDiscord | <Lunar> Chiqqum: no clue |
19:05:32 | FromDiscord | <Lunar> How can I create a task that runs two things at the same time? I.E A server port listener, and a client to send stuff to the port? |
19:05:59 | FromDiscord | <Lunar> Right now I have a functioning chat client, except it's only one way texting. I can't get anything back |
19:06:09 | FromDiscord | <Lunar> Unless... What if I use UDP instead of TCP? |
19:06:34 | * | sentreen_ quit (Ping timeout: 268 seconds) |
19:07:15 | FromDiscord | <Chiqqum_Ngbata> Concurrency. I think there is an asyncnet example in the documentation; should be able to create server and client |
19:07:38 | FromDiscord | <Chiqqum_Ngbata> UDP/TCP is irrelevant |
19:08:52 | * | Kameleon quit (Read error: Connection reset by peer) |
19:09:44 | FromDiscord | <Lunar> I thought UDP could send and receive at the same time? |
19:11:58 | FromDiscord | <Kiloneie> Pretty sure that's not how it works ?... |
19:13:41 | FromDiscord | <Lunar> I'm probably wrong ๐
|
19:14:39 | FromDiscord | <Kiloneie> Just like how electric current shifts directions at crazy speeds, that's probably how UDP works, although i am not 100% sure. |
19:15:10 | FromDiscord | <Kiloneie> google says, multi threading |
19:15:45 | FromDiscord | <Rothmoss> Hi, new to nim. I have been looking for a way to check what language (c or js) that the program is currently being compiled to. is there a way to do this? I've been searching for a few hours but just cant find it. like |
19:15:45 | FromDiscord | <Rothmoss> ``` |
19:15:46 | FromDiscord | <Rothmoss> var message: string |
19:15:46 | FromDiscord | <Rothmoss> when compiledToJavascript: |
19:15:46 | FromDiscord | <Rothmoss> message = "its javascript!" |
19:15:46 | FromDiscord | <Rothmoss> else compiledToC: |
19:15:46 | FromDiscord | <Rothmoss> message = "its C" |
19:15:48 | FromDiscord | <Rothmoss> echo message |
19:15:49 | FromDiscord | <Rothmoss> ``` |
19:15:56 | disruptek | please use a pastebin in the future. |
19:16:29 | disruptek | you can use `when` to determine the platform at compile-time. |
19:18:31 | * | absolutejam joined #nim |
19:22:37 | * | al_ quit (Quit: al_) |
19:23:59 | * | sentreen joined #nim |
19:33:29 | FromDiscord | <Lunar> Can someone describe to me how this works? <https://nim-lang.org/docs/threads.html#createThread%2CThread%5Bvoid%5D%2Cproc%29> |
19:34:13 | FromDiscord | <Lunar> How do I use the ``createThread`` function, and why are there two ``createThread`` shortcuts on the left side? |
19:38:39 | FromGitter | <Varriount> Hello my fellow Nimsters! :D |
19:39:18 | FromDiscord | <Lunar> Hello! |
19:39:22 | FromGitter | <Varriount> Lunar: There are two `createThread` links, because there are two overloads/variants of the `createThread` procedure. |
19:39:30 | FromDiscord | <Lunar> O.o |
19:39:38 | FromDiscord | <Lunar> I wish they would clarify that |
19:39:55 | FromDiscord | <Lunar> At first look, it just seems like Gibberish |
19:40:04 | FromGitter | <Varriount> Well, it's part of the language |
19:40:35 | FromGitter | <Varriount> https://nim-lang.org/docs/manual.html#overloading-resolution |
19:41:18 | FromDiscord | <Lunar> That's fair ๐
|
19:41:51 | FromGitter | <Varriount> Though, I do agree that it's not obvious if you haven't dealt with a language that supports overloaded identifiers before. |
19:42:27 | FromDiscord | <Lunar> That's me! ๐ |
19:42:38 | FromGitter | <Varriount> And the manual tends to be written from a more technical specification perspective, rather than a teaching perspective. |
19:42:51 | FromDiscord | <Lunar> So how do you suggest I learn? |
19:42:55 | FromDiscord | <Lunar> and do you happen to know how to use multithreading? |
19:42:59 | FromGitter | <Varriount> Lunar: https://nim-lang.org/docs/tut1.html#procedures-overloaded-procedures |
19:43:14 | FromGitter | <Varriount> Lunar: Depends on what you mean by "how to use". |
19:43:48 | FromGitter | <Varriount> Do I know how to use multithreading as a non-language-specific technique? Yes. Have I used multithreading with Nim? Not really. |
19:44:02 | FromGitter | <Varriount> What are you trying to accomplish, as you general goal? |
19:44:03 | FromDiscord | <Lunar> Ah, I meant how to multithread in Nim |
19:45:34 | Zevv | Oi Varriount, whats up! |
19:46:01 | FromGitter | <Varriount> Zevv! :D |
19:46:29 | Zevv | what are you nimming these days then? |
19:47:07 | FromGitter | <Varriount> Zevv: Unfortunately, not much. I have some distant plans for Commandant, but right now I'm dealing with real life stuff |
19:48:07 | FromDiscord | <Lunar> What's commandant? |
19:48:44 | Zevv | real life stuff, how mundane |
19:49:43 | FromDiscord | <Kiloneie> This is real life |
19:51:13 | FromDiscord | <Lunar> Nim is life |
19:51:14 | FromDiscord | <Lunar> ๐ |
19:53:35 | * | shomodj joined #nim |
19:54:40 | FromGitter | <Varriount> Lunar: https://github.com/Varriount/commandant |
19:54:48 | FromDiscord | <Lunar> Ah, thank you! |
19:55:20 | FromDiscord | <Lunar> So I'm using ``spawn`` from the ``threadpool`` import, which wants me to compile with the ``--threads:on`` option, which then gives me the error: ``Error: 'spawn' takes a GC safe call expression`` |
19:55:55 | FromDiscord | <Lunar> Anyone else confused? |
19:55:57 | FromDiscord | <Lunar> ๐ |
19:58:06 | FromGitter | <Varriount> Lunar: Have you read about Nim's memory model with regards to threading? |
19:58:17 | FromDiscord | <Lunar> I have not |
19:58:20 | FromDiscord | <Lunar> I'll look for it now |
19:58:22 | FromGitter | <Varriount> Also, what language are you coming from? |
19:58:47 | FromGitter | <Varriount> Lunar: https://nim-lang.org/docs/manual.html#threads-gc-safetyhttps://nim-lang.org/docs/manual.html#threads-gc-safety |
19:58:50 | FromGitter | <Varriount> https://nim-lang.org/docs/manual.html#threads-gc-safety |
19:59:17 | FromDiscord | <Lunar> Many. C#, Java, the WebDev package, Python, I tried Fortran, didn't go very well |
19:59:24 | FromDiscord | <Lunar> Thanks for the links though |
19:59:56 | FromDiscord | <Lunar> Why'd you post the same link three times? |
20:00:54 | FromGitter | <Varriount> I accidentally pressed ctrl+v and then enter the first time, and then pressed ctrl+v again so that you would have a proper link. |
20:01:01 | * | tdc quit (Quit: Leaving) |
20:01:16 | FromDiscord | <Lunar> Whoops ๐ |
20:01:29 | * | nsf quit (Quit: WeeChat 2.5) |
20:01:37 | FromGitter | <Varriount> Lunar: The long and short of it is that (at least for now) Nim's memory model is very strict when it comes to shared memory. |
20:02:07 | FromGitter | <Varriount> Objects allocated in one thread's heap cannot be safely shared with another thread, unless one passes pointers (rather than references) around. |
20:02:47 | FromDiscord | <Lunar> So in order to create a IO chat client, multithreading is not the way to go? |
20:02:51 | FromDiscord | <Lunar> *I/O |
20:03:11 | Zevv | varriount: when you start passing pointers around, your "safety" is down the drain anyway |
20:03:23 | Zevv | so the "unless..." part voids your warrenty |
20:03:48 | FromGitter | <Varriount> Lunar: If you want to create a chat client, I would recommend using the asyncio framework |
20:04:18 | FromGitter | <Varriount> Though, I don't know of a good tutorial for it. Hm. |
20:04:37 | FromDiscord | <Lunar> <https://nim-lang.org/0.19.0/asyncio.html> |
20:04:39 | FromDiscord | <Lunar> > Warning: This module is deprecated since version 0.10.2. Use the brand new asyncdispatch module together with the asyncnet module. |
20:04:41 | Zevv | PMunch has a writeup in progress, maybe he's willing to share a draft |
20:05:02 | FromGitter | <Varriount> https://nim-lang.org/docs/asyncnet.html |
20:05:12 | FromDiscord | <Lunar> I'm an idiot ๐ |
20:05:19 | FromGitter | <Varriount> Nah |
20:06:16 | FromGitter | <Varriount> To be honest, while Nim is a great language, there are definitely some major pain points. |
20:06:38 | FromGitter | <Varriount> Documentation is one, things like multithreading are another. |
20:06:55 | FromGitter | <Varriount> Though, there is work being done to improve both. |
20:07:15 | FromDiscord | <Lunar> I'd being willing to redo the documentation if someone could explain to me how the current one works |
20:07:50 | FromDiscord | <Lunar> Although, since I don't have any overloading experience, I'm not sure if I should be the one doing it |
20:08:18 | FromDiscord | <Lunar> I say overloading xp because I don't know how it works nor how to show examples |
20:08:25 | FromDiscord | <Lunar> so |
20:08:25 | FromDiscord | <Lunar> ยฏ\_(ใ)_/ยฏ |
20:09:28 | FromGitter | <Varriount> You never worked with overloaded functions in C# or Java? |
20:10:36 | FromDiscord | <Kiloneie> overloading is basically just having multiple functions with the same name, but with different types and outcomes, the compiler then determines which one to use based on the type(something like that) |
20:10:48 | FromDiscord | <Kiloneie> It's real simple |
20:11:12 | FromDiscord | <Kiloneie> Nothing in programming is hard, it's just another layer on top of another layer. Baby steps. |
20:12:45 | FromGitter | <Varriount> ROM -> BIOS -> Bootloader -> OS |
20:17:16 | Mister_Magister | @Varriount if it only was this simpleโฆ |
20:19:00 | FromGitter | <Varriount> Mister_Magister: Well, yeah. You also have the whole UEFI hardware structures, drivers, memory/processor modes, etc. |
20:19:29 | Mister_Magister | and if you go to qualcomm it's staring to become sick |
20:19:35 | Mister_Magister | @Varriount also microos in cpu |
20:19:44 | FromGitter | <Varriount> UEFI especially seems to add *a lot* of complexity - you even need your own mini-interpreter for it. |
20:23:01 | FromGitter | <Varriount> Mister_Magister: And don't forget AML - https://wiki.osdev.org/AML |
20:23:24 | Mister_Magister | hueh :P |
20:23:32 | Mister_Magister | yeah we totally scared beginners xd |
20:23:57 | * | Trustable quit (Remote host closed the connection) |
20:24:19 | FromDiscord | <Kiloneie> i am technically a beginners myself ๐ |
20:28:22 | FromDiscord | <Lunar> I'm only slightly terrified |
20:28:38 | FromDiscord | <Lunar> But having multiple functions with the same name is definitely confusing |
20:28:46 | FromDiscord | <Lunar> Personally, I wouldn't allow it on my own language |
20:31:23 | Mister_Magister | @Lunar it's really useful |
20:31:49 | Mister_Magister | like you want your function withch does same thing accept argument of multiple types |
20:32:56 | FromDiscord | <Lunar> I'm about to show how secluded I am from the rest of the world, but |
20:33:17 | FromDiscord | <Lunar> Can't you choose multiple types of inputs when making the function? I.E |
20:33:53 | FromDiscord | <Lunar> ``` |
20:33:53 | FromDiscord | <Lunar> function main(String:Int Args) { |
20:33:53 | FromDiscord | <Lunar> ... |
20:33:53 | FromDiscord | <Lunar> } |
20:33:54 | FromDiscord | <Lunar> ``` |
20:33:58 | FromDiscord | <Lunar> Letme pastebin that |
20:34:03 | FromDiscord | <Lunar> Well |
20:34:05 | Mister_Magister | well that doesn't work in irc lmao |
20:34:08 | FromDiscord | <Lunar> There isn't anything to pastebin |
20:34:13 | FromDiscord | <Lunar> ``function main(String:Int Args) {`` |
20:34:20 | Mister_Magister | nah |
20:34:26 | Mister_Magister | that would be weird |
20:35:07 | FromDiscord | <Lunar> The syntax? Yes. The concept of choosing what types of arguments wanted? No |
20:35:26 | Mister_Magister | well not really |
20:35:32 | Mister_Magister | both concepts are good |
20:36:05 | Mister_Magister | and with overloading if you need slight change of how function works depending on type but same outcome oveloading is really the way |
20:36:18 | Mister_Magister | also if it's hardly typed you can't just mix variables types |
20:36:21 | FromDiscord | <speckledlemon> Can someone point me to where in the docs repo the tutorials are generated from? There's a bug I want to fix |
20:36:34 | FromDiscord | <Lunar> What's the bug? *Just curious* |
20:36:41 | FromDiscord | <Karl Marx> I think they are on the |
20:36:47 | FromDiscord | <Karl Marx> Git readme |
20:36:52 | FromDiscord | <Karl Marx> Wiki* |
20:36:53 | FromDiscord | <Karl Marx> Sorry |
20:38:02 | * | narimiran quit (Ping timeout: 240 seconds) |
20:38:04 | FromDiscord | <speckledlemon> Ah, found them: https://github.com/nim-lang/Nim/blob/devel/doc/tut1.rst |
20:38:11 | FromDiscord | <speckledlemon> Ah, found them: <https://github.com/nim-lang/Nim/blob/devel/doc/tut1.rst> |
20:38:15 | FromGitter | <Varriount> Yep |
20:38:22 | FromDiscord | <speckledlemon> That's...confusing |
20:39:32 | FromGitter | <Varriount> What might be neat is a "tour" through the Nim language and standard library |
20:39:51 | FromDiscord | <Karl Marx> wdym |
20:40:06 | FromGitter | <Varriount> Wdym? |
20:40:12 | FromDiscord | <Karl Marx> What do u mean |
20:40:15 | FromDiscord | <Kiloneie> Araq told me i should do that... but i have no freaking clue where to begin. |
20:40:20 | FromDiscord | <Karl Marx> Of the "tour" |
20:40:33 | FromGitter | <Varriount> https://tour.golang.org/welcome/1 |
20:40:35 | FromDiscord | <Karl Marx> Like a hello world style thing? |
20:40:42 | FromDiscord | <Karl Marx> Oh yeah |
20:40:46 | FromDiscord | <Karl Marx> That would be cool |
20:41:04 | * | clyybber quit (Quit: WeeChat 2.6) |
20:42:20 | FromDiscord | <speckledlemon> @Lunar What I _think_ is a bug is https://github.com/nim-lang/Nim/blob/5be8e0b0883c5d88db8f24db36d114290dffcae3/doc/tut1.rst#L1751, "ambiguous" implies that the example won't compile, but it does |
20:43:20 | FromDiscord | <Lunar> I *believe* you sent me the wrong link |
20:43:32 | FromDiscord | <Kiloneie> that opens the doc at beginning |
20:43:52 | FromDiscord | <speckledlemon> it shouldn't... |
20:44:02 | FromDiscord | <Lunar> Is that your bug? |
20:44:10 | FromDiscord | <Lunar> I can see that too ๐ |
20:44:28 | FromGitter | <Varriount> speckledlemon: Github renders markdown by default - perhaps you have some setting that disables that? |
20:44:51 | FromDiscord | <speckledlemon> it just takes a moment for GH to switch from the render to the source view |
20:45:06 | FromDiscord | <Kiloneie> both chrome and firefox open nim tutorial(part1) |
20:45:27 | FromDiscord | <Karl Marx> Yeah readme is rendered by default |
20:45:31 | FromDiscord | <Karl Marx> I am on Firefox |
20:45:44 | FromDiscord | <Lunar> I'm on Opera |
20:45:48 | FromDiscord | <speckledlemon> then click the little switcher at the top of the page and reload |
20:45:53 | FromDiscord | <Lunar> Which has an Chromium engine |
20:45:53 | FromDiscord | <Lunar> so |
20:45:55 | FromDiscord | <Karl Marx> Try Firefox or something |
20:45:56 | FromDiscord | <Lunar> Doesn't matter |
20:45:57 | FromDiscord | <Lunar> ยฏ\_(ใ)_/ยฏ |
20:45:59 | FromDiscord | <Karl Marx> True |
20:46:16 | FromDiscord | <Karl Marx> Maybe try another browser (?) could be a setting in opera |
20:47:24 | FromDiscord | <speckledlemon> click the angle brackets and reload |
20:47:24 | FromDiscord | <speckledlemon> https://cdn.discordapp.com/attachments/371759389889003532/630506414577680397/Screen_Shot_2019-10-06_at_4.47.07_PM.png |
20:48:01 | shashlick | @Chiqqum_Ngbata - just saw your nimgen question |
20:48:06 | shashlick | you still having an issue? |
20:50:32 | FromGitter | <Varriount> Try this - https://github.com/nim-lang/Nim/blame/5be8e0b0883c5d88db8f24db36d114290dffcae3/doc/tut1.rst#L1751 |
20:50:53 | FromDiscord | <Kiloneie> this works |
20:52:32 | FromDiscord | <Kiloneie> that is ambigious |
20:52:53 | FromDiscord | <Lunar> That works |
20:55:06 | FromGitter | <Varriount> speckledlemon: Yeah, that does seem ambiguous, I would check with araq whether the documentation is correct, and the language is wrong, or vice-versa |
20:57:02 | FromDiscord | <Kiloneie> The first call outputs 3, the second is empty, and the third gets discarded because... |
20:57:08 | FromDiscord | <Kiloneie> Meh, voodoo |
20:58:04 | FromDiscord | <Kiloneie> i think... the discard one overrides the rest |
20:58:20 | FromDiscord | <Kiloneie> if you put the discarded one above the rest, nothing will output at all |
20:58:25 | FromDiscord | <speckledlemon> Just so we're all on the same page, I am saying that the result it clear: yes, the discard one overrides the rest, and the tutorial implies something else is supposed to happen |
20:58:43 | FromDiscord | <Kiloneie> really ? |
20:58:55 | FromDiscord | <Kiloneie> i had no clue this is how things worked xD |
20:59:28 | FromDiscord | <speckledlemon> It's not ambiguous at all if the expected behavior is to allow redefinition of the proc |
21:00:02 | FromDiscord | <speckledlemon> You saw it yourself that the one from module A isn't getting called |
21:01:17 | FromDiscord | <Kiloneie> This is supposed to be a tutorial or something ? i don't really use github. |
21:01:48 | FromDiscord | <speckledlemon> It's from <https://nim-lang.org/docs/tut1.html#modules> |
21:02:02 | FromDiscord | <speckledlemon> You know, the official tutorial |
21:02:29 | FromDiscord | <Kiloneie> yeah okay, was just thinking if there is maybe a button to jump to the output file on that line |
21:04:08 | * | radsoc quit (Quit: radsoc) |
21:04:51 | FromDiscord | <Kiloneie> Yeah that is weird, why end the second on ambigious when it actually isn't. |
21:05:05 | FromDiscord | <Kiloneie> section * |
21:07:16 | FromDiscord | <speckledlemon> Ok, since Varriount mentioned that it isn't clear where the problem is, I'll make an issue rather than a PR |
21:07:47 | FromDiscord | <Kiloneie> yeah do that. |
21:08:32 | FromDiscord | <Kiloneie> is it weird that i keep away from programming all the time, but then when i start i can barely stop ? |
21:09:23 | * | asymptotically quit (Quit: Leaving) |
21:12:44 | * | theelous3 joined #nim |
21:17:44 | Tyresc | how do I use two or more statements in a control flow function? 'and' or && didn't do the trick |
21:18:58 | krux02_ | Tyresc: if (var x: int; x += 3; x > 2): echo 123 |
21:19:14 | * | solitudesf quit (Ping timeout: 240 seconds) |
21:21:02 | Tyresc | hmm I see, and what about loops? |
21:23:05 | disruptek | you can `if foo or bar:` or `if foo and bar:` -- it's not clear that you mean "statements" and not "expressions". |
21:23:15 | disruptek | krux02's example is for statements. |
21:26:04 | Tyresc | Oh I am sorry, I am looking for the way to use two or more requirements in a while loop ala 'while i > 0 and i < ceiling:' |
21:26:23 | disruptek | that's it right there. most likely you have a bug. |
21:27:35 | Tyresc | oh the linter only suggested `and` |
21:27:55 | disruptek | yes, `and`, as you have used it, works just fine. |
21:28:06 | disruptek | you can use `or` as well. |
21:28:34 | Tyresc | ah no I meant "`and`" opposed to "and" |
21:29:01 | Tyresc | the word by itself works like expected, thanks |
21:29:05 | disruptek | don't quote your keywords; it makes them unhappy. |
21:29:15 | disruptek | unless of course you want to name an identifier after a keyword. |
21:29:23 | disruptek | in which case, use backquotes `thusly`. |
21:29:47 | disruptek | !eval let `and` = "and"; echo `and` |
21:29:48 | NimBot | and |
21:29:59 | Tyresc | I only got the backquotes variant suggested so I suppose that's where the error came from |
21:30:00 | disruptek | !eval let `and` = "or"; echo `and` |
21:30:03 | NimBot | or |
21:30:16 | disruptek | !eval let and = "or"; echo and |
21:30:17 | NimBot | Compile failed: /usercode/in.nim(1, 5) Error: identifier expected, but got 'keyword and' |
21:50:01 | * | Vladar quit (Remote host closed the connection) |
22:07:24 | * | Pistos joined #nim |
22:08:36 | Pistos | Hi. I've skimmed the nim-lang website, but I'm still looking for an "elevator pitch" type of article for Nim. I've seen the feature list on the front page, and the headings of the tutorials. |
22:10:11 | disruptek | is the pitch for you or someone else? |
22:10:46 | FromDiscord | <Kiloneie> you can check my tutorials if you want in depth step by step |
22:28:02 | rayman22201 | Yay. Just found a bug in ioselectors_epoll.nim. Opinion, do I submit the fix as a separate PR, or roll it into my AsyncEvents PR? I already know the answer is to make a seperate PR, I just don't want to do the work :-( |
22:31:23 | FromDiscord | <treeform> I think you know what you need to do. |
22:31:42 | disruptek | dom96 tol' me he's looking for more bugs to fix. |
22:32:09 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
22:32:26 | * | pbb joined #nim |
22:34:20 | rayman22201 | I have the fix already. I just have to pull it out of my huge monster PR |
22:35:17 | Pistos | disruptek: Let's say both. :) Though, in my case, I'm convinced enough by what I've read to actually try to write some test-the-waters programs myself now. |
22:35:26 | Pistos | Kiloneie: Link(s)? |
22:35:48 | rayman22201 | This will only make sense if you are familiar with the io selector code, but the User key type does not properly unregister itself from selector. The `unregister` proc just completely skips that case :-/ |
22:36:25 | disruptek | i'm asking because it's helpful for others to have a way to frame their arguments, and there are different camps here -- pl people, devops people, game creators, web folks, gui folks, etc. |
22:36:34 | rayman22201 | guess what key type AsyncEvents use? :-P |
22:37:21 | disruptek | you may want to hold off until a decision is made on what to do about unregister as per my issue. not clear whether such a change gets backported or w/e. |
22:37:39 | disruptek | at least you should create another issue to move the discussion along. |
22:38:58 | rayman22201 | what is your issue disruptek? can you link it to me? |
22:39:39 | * | absolutejam quit (Ping timeout: 240 seconds) |
22:39:45 | disruptek | i don't have a url, but it's #12354 |
22:40:01 | rayman22201 | that'll do. Let me look and see if it's related |
22:40:24 | Pistos | disruptek: In my case, my primary initial use case for Nim would be writing REST API backends for webapps. So I'll be needing a framework/package for that, plus an ORM, and easy JSON operations. I've found jester, norm, and the stdlib json package, respectively. Any alternate recommendations welcome. |
22:40:46 | disruptek | Pistos: look at my openapi package. |
22:41:01 | disruptek | it needs someone to write backend support. ๐ |
22:41:23 | disruptek | the only notable orm is `ormin`, but docs are skimpy. |
22:41:44 | disruptek | i take that back; i'm not familiar with norm. |
22:42:26 | rayman22201 | disruptek, ah yes. My bug is slightly different. My bug is that even when you correctly and explicitly call "unregister" on the epoll event, depending on the event type, it does the wrong thing. |
22:43:07 | disruptek | yeah, i get it. i'm just sayin' that it's not clear when/how this module can be changed for whatever reason. |
22:43:15 | * | beatmox quit (Ping timeout: 240 seconds) |
22:43:25 | disruptek | i dunno... opinions. |
22:43:29 | * | nif_ quit (Quit: ...) |
22:43:39 | * | nif joined #nim |
22:43:45 | rayman22201 | I don't see why that should stop me from submitting a PR to fix my thing? it needs to be fixed either way. |
22:43:54 | * | oxymoron joined #nim |
22:44:25 | disruptek | i agree. |
22:45:27 | rayman22201 | almost a good excuse to do nothing and drink beer instead :-P |
22:45:58 | * | beatmox joined #nim |
22:46:24 | rayman22201 | I should check if the other selector backends have the same bug. If epoll has it, chances are the others do to :-/ |
22:46:43 | * | hami quit (Ping timeout: 268 seconds) |
23:07:34 | FromDiscord | <Kiloneie> @Pistos just type my name in youtube |
23:08:38 | FromDiscord | <Kiloneie> https://youtu.be/5tVIsDYPClA |
23:11:09 | * | krux02__ joined #nim |
23:12:19 | * | oxymoron quit (Quit: Leaving) |
23:13:52 | * | krux02_ quit (Ping timeout: 264 seconds) |
23:15:50 | rayman22201 | https://github.com/nim-lang/Nim/pull/12371 |
23:23:37 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzzโฆ) |
23:24:18 | * | shomodj joined #nim |
23:24:24 | * | shomodj quit (Client Quit) |
23:24:31 | leorize | Pistos: packedjson is faster and is more memory conservative |
23:25:19 | leorize | it doesn't share the same api with stdlib json though |
23:25:44 | leorize | as for orm I'd say that ormin looks better |
23:26:09 | leorize | norm lacks a proper custom querying api last time I checked |
23:26:37 | leorize | which means that you will pull the entire object from the database everytime you wanted to access anything, not really a nice thing |
23:35:55 | rayman22201 | Does anybody know which ioselector backend Mac uses? |
23:42:30 | Pistos | leorize: At this point, I am aiming for ease of development, so, whichever has the nicer interface/syntax. |
23:42:40 | Pistos | re: json |
23:43:02 | disruptek | i would stick with stdlib version until you need to move away from it. |
23:44:14 | Pistos | disruptek: That's my thinking, too. |
23:44:45 | Pistos | leorize: ormin looks really skimpy on documentation, though. |
23:50:17 | * | Tyresc quit (Ping timeout: 240 seconds) |
23:56:28 | sealmove | wow, I think we got many fresh Nim users since v1 was released! |
23:57:51 | * | laaron joined #nim |