00:01:17 | FromGitter | <kayabaNerve> ... mySeq.del(0) ruins the order? |
00:01:53 | FromGitter | <kayabaNerve> Damn. I have some code to update. |
00:14:55 | * | stefanos82 quit (Quit: Quitting for now...) |
00:49:51 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
01:07:13 | * | mal`` quit (Ping timeout: 248 seconds) |
01:10:17 | * | gangstacat joined #nim |
01:15:43 | * | mal`` joined #nim |
01:31:09 | * | deech_ quit (Remote host closed the connection) |
01:31:27 | * | deech_ joined #nim |
01:33:39 | * | deech_ quit (Remote host closed the connection) |
01:33:47 | * | Voltist joined #nim |
01:33:59 | * | deech_ joined #nim |
01:44:46 | * | Tyresc quit (Quit: WeeChat 2.5-dev) |
01:50:28 | * | deech__ joined #nim |
01:53:34 | * | deech_ quit (Ping timeout: 272 seconds) |
02:17:25 | * | oculux quit (Ping timeout: 246 seconds) |
02:21:18 | * | oculux joined #nim |
02:38:11 | * | dddddd quit (Remote host closed the connection) |
02:41:09 | * | Voltist quit (Remote host closed the connection) |
02:44:51 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
02:45:13 | * | theelous3_ joined #nim |
02:45:46 | * | laaron joined #nim |
04:19:12 | FromGitter | <zacharycarter> It's late - but congrats on 0.20.0 & RC1 |
04:19:15 | FromGitter | <zacharycarter> !!! |
04:40:10 | * | theelous3_ quit (Ping timeout: 252 seconds) |
04:40:45 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
04:41:02 | * | laaron joined #nim |
04:42:00 | * | nsf joined #nim |
05:35:59 | * | athens joined #nim |
05:39:49 | * | brakmic joined #nim |
05:40:26 | * | narimiran joined #nim |
05:43:55 | * | brakmic_ joined #nim |
05:47:13 | * | brakmic quit (Ping timeout: 248 seconds) |
06:08:37 | FromGitter | <rokups> del vs delete is terrible and confusing api design :( |
06:09:53 | Zevv | agree |
06:12:44 | * | laaron quit (Remote host closed the connection) |
06:13:33 | * | laaron joined #nim |
06:15:37 | * | PMunch_ is now known as PMunch |
06:20:12 | * | brakmic_ quit (Read error: Connection reset by peer) |
06:20:37 | * | brakmic joined #nim |
06:21:31 | * | brakmic quit (Read error: Connection reset by peer) |
06:21:38 | * | brakmic_ joined #nim |
06:27:10 | * | disruptek quit (Ping timeout: 272 seconds) |
06:27:16 | leorize | I think I found some weird compiler quirks |
06:27:59 | leorize | so currently https://github.com/nim-lang/Nim/pull/11605 is failling |
06:28:18 | leorize | but it will work again if you apply this patch: http://ix.io/1MYJ/diff |
06:28:22 | leorize | and I don't know why |
06:29:21 | * | disruptek joined #nim |
06:29:33 | leorize | Araq: ^ any possible pointers? |
06:34:21 | * | solitudesf joined #nim |
06:52:24 | * | GitterIntegrati4 quit (Read error: Connection reset by peer) |
06:52:26 | * | k0mpjut0r quit (Write error: Connection reset by peer) |
06:52:26 | * | Miguelngel[m] quit (Remote host closed the connection) |
06:52:26 | * | gh0st[m] quit (Read error: Connection reset by peer) |
06:52:28 | * | planetis[m] quit (Read error: Connection reset by peer) |
06:52:28 | * | mattisme quit (Read error: Connection reset by peer) |
06:52:30 | * | Connor[m] quit (Remote host closed the connection) |
06:52:31 | * | zeroDotTwenty[m] quit (Remote host closed the connection) |
06:52:34 | * | lqdev[m] quit (Write error: Connection reset by peer) |
06:52:34 | * | BitPuffin quit (Write error: Connection reset by peer) |
06:52:38 | * | meff[m] quit (Write error: Connection reset by peer) |
06:52:42 | * | TheManiac[m] quit (Write error: Connection reset by peer) |
06:52:46 | * | narimiran[m] quit (Read error: Connection reset by peer) |
06:52:47 | * | leorize[m] quit (Remote host closed the connection) |
06:52:49 | * | LeonardoMariscal quit (Remote host closed the connection) |
06:52:49 | * | nergal[m] quit (Write error: Connection reset by peer) |
06:52:50 | * | macsek1911[m] quit (Remote host closed the connection) |
06:52:51 | * | yglukhov[m] quit (Write error: Connection reset by peer) |
06:52:52 | * | zielmicha[m]1 quit (Write error: Connection reset by peer) |
06:52:52 | * | skrylar[m] quit (Write error: Connection reset by peer) |
06:52:52 | * | spymasterd[m] quit (Write error: Connection reset by peer) |
06:52:52 | * | Manny8888 quit (Write error: Connection reset by peer) |
06:52:55 | * | isaac[m]1 quit (Write error: Connection reset by peer) |
06:52:56 | * | cfv[m] quit (Remote host closed the connection) |
06:52:56 | * | Demos[m] quit (Remote host closed the connection) |
06:52:56 | * | xomachine[m] quit (Remote host closed the connection) |
06:53:27 | * | Trustable joined #nim |
06:53:34 | * | dddddd joined #nim |
06:53:49 | * | purebadger joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:19 | * | athens quit (Quit: Leaving) |
07:00:46 | * | krux02 joined #nim |
07:00:52 | * | Connor[m] joined #nim |
07:04:48 | * | gmpreussner joined #nim |
07:21:45 | * | Demos[m] joined #nim |
07:21:45 | * | BitPuffin joined #nim |
07:21:45 | * | Manny8888 joined #nim |
07:21:45 | * | GitterIntegratio joined #nim |
07:21:46 | * | gh0st[m] joined #nim |
07:21:46 | * | isaac[m] joined #nim |
07:21:46 | * | k0mpjut0r joined #nim |
07:21:46 | * | lqdev[m] joined #nim |
07:21:46 | * | leorize[m] joined #nim |
07:21:46 | * | mattisme joined #nim |
07:21:46 | * | nergal[m]1 joined #nim |
07:21:52 | * | macsek1911[m] joined #nim |
07:21:52 | * | cfv[m] joined #nim |
07:21:52 | * | Miguelngel[m] joined #nim |
07:21:52 | * | spymasterd[m] joined #nim |
07:21:53 | * | zielmicha[m]1 joined #nim |
07:21:53 | * | planetis[m] joined #nim |
07:21:53 | * | skrylar[m] joined #nim |
07:21:54 | * | LeonardoMariscal joined #nim |
07:21:54 | * | narimiran[m] joined #nim |
07:21:54 | * | TheManiac[m] joined #nim |
07:21:54 | * | yglukhov[m] joined #nim |
07:21:55 | * | xomachine[m] joined #nim |
07:21:55 | * | meff[m] joined #nim |
07:21:58 | * | zeroDotTwenty[m] joined #nim |
07:23:23 | * | nsf quit (Quit: WeeChat 2.4) |
07:23:56 | Zevv | * |
07:38:51 | PMunch | * |
07:39:19 | narimiran | ** |
07:39:43 | FromGitter | <alehander42> ^ |
07:39:55 | FromGitter | <alehander42> pascal style |
07:41:45 | FromGitter | <alehander42> btw guys do you have examples of easy to reproduce gc bugs in nim |
07:41:58 | FromGitter | <alehander42> or just small programs that stress the gc |
07:42:05 | FromGitter | <alehander42> e.g. making it do a lot of allocations and deallocations |
07:45:14 | Araq | the issue tracker has a GC tag |
07:45:23 | Araq | and we have tests/gc |
07:47:00 | FromGitter | <alehander42> thank you |
07:47:02 | * | tjmac joined #nim |
07:47:20 | FromGitter | <alehander42> what do you use typically to debug those gc leaks |
07:47:37 | FromGitter | <alehander42> valgrind? gdb? just logging? |
07:48:08 | FromGitter | <alehander42> or a combo |
07:48:45 | * | Vladar joined #nim |
07:48:46 | * | dwdv joined #nim |
07:53:58 | PMunch | Hmm, where there some precedence rule changes around `==`? |
07:55:23 | PMunch | I'm sure that `if some("Hello")?.find('l') == 2` used to work (using my existential operator for options) |
07:55:39 | PMunch | But now it complains that find only takes a character |
07:56:15 | FromGitter | <alehander42> what does dumpTree show? |
07:56:46 | PMunch | Good question |
07:57:06 | PMunch | By the way if some("Hello")?.find('l').`==`(2) works fine |
08:00:00 | PMunch | http://ix.io/1MYY |
08:02:22 | Araq | PMunch, nothing changed, it's something else |
08:02:39 | PMunch | Hmm |
08:03:10 | FromGitter | <alehander42> ?. has |
08:03:12 | FromGitter | <alehander42> higher precedence |
08:03:31 | Araq | I told you about this gotcha but you weren't listening, I think. |
08:03:38 | FromGitter | <alehander42> some("Hello") ?. (find('l') == 2) |
08:03:44 | FromGitter | <alehander42> it seems |
08:03:56 | Araq | yup |
08:04:16 | FromGitter | <alehander42> is this true for all custom operators |
08:04:16 | PMunch | Araq, you were? |
08:08:49 | PMunch | I'm guessing I can't control precedence somehow? |
08:09:11 | Araq | https://www.twitch.tv/araq4k |
08:10:21 | FromGitter | <alehander42> it became offline for me |
08:10:35 | FromGitter | <alehander42> hm error on my end |
08:10:40 | FromGitter | <alehander42> nvm |
08:16:49 | livcd | Are you streaming ? |
08:17:40 | FromDiscord_ | <djazz> it's live |
08:19:26 | FromDiscord_ | <djazz> Araq: who is they other guy talking? |
08:19:29 | FromDiscord_ | <djazz> the* |
08:19:32 | livcd | narimiran |
08:19:49 | FromGitter | <alehander42> isnt it krux02 |
08:19:53 | narimiran | it's me |
08:20:00 | FromDiscord_ | <djazz> 😃 |
08:20:05 | FromGitter | <alehander42> wow |
08:20:05 | livcd | krux02 sounds like Araq so no |
08:29:52 | * | dddddd quit (Ping timeout: 268 seconds) |
08:33:58 | FromDiscord_ | <djazz> re:linting, in JavaScript i use StandardJS (which uses eslint) and it has a ton of rules https://standardjs.com/rules.html @Araq @alehander42 |
08:36:39 | FromDiscord_ | <djazz> it is very strict |
08:36:48 | FromDiscord_ | <djazz> but having some nim linter would be nice |
08:36:57 | FromDiscord_ | <djazz> will try nimpretty someday |
08:38:41 | * | dddddd joined #nim |
08:39:26 | * | floppydh joined #nim |
08:48:27 | * | hoijui joined #nim |
08:51:26 | * | Vladar quit (Remote host closed the connection) |
08:51:52 | FromGitter | <wsdjeg> does nim has mail list? for example Google group? |
08:56:03 | FromDiscord_ | <djazz> What is a tainted string? I found https://nim-lang.org/docs/system.html#TaintedString but clicking the link in "see taint mode for details" leads nowhere. |
08:58:45 | narimiran | https://nim-lang.org/docs/manual_experimental.html#taint-mode |
09:03:52 | FromDiscord_ | <djazz> ah, thanks! So my custom readstring proc for a stream should return a TaintedString like readStr etc. |
09:04:52 | FromDiscord_ | <djazz> (I needed a custom one to read strings written by .NET's BinaryWriter |
09:04:56 | FromDiscord_ | <djazz> ) |
09:07:58 | PMunch | Hmm, is it possible to define a procedure that takes an argument that can be converted. |
09:08:16 | PMunch | Like you can do with varargs[theType, convertProc] |
09:11:32 | PMunch | Hmm, wut: http://ix.io/1MZd |
09:12:28 | * | Vladar joined #nim |
09:13:52 | PMunch | Oh, that was confusing.. I was missing the return type and `=` |
09:14:13 | * | ikan-keli_ quit (Ping timeout: 245 seconds) |
09:15:23 | * | ikan-keli_ joined #nim |
09:25:44 | * | Trustable quit (Remote host closed the connection) |
09:30:52 | FromGitter | <alehander42> djazz i can try to adapt a cop of https://github.com/metacraft-labs/fast-rubocop for nim to see if it works |
09:30:59 | FromGitter | <alehander42> basically i thought i can plug different parsers |
09:31:07 | FromGitter | <alehander42> and reuse similar logic for different languages |
09:31:27 | FromGitter | <alehander42> (of course a real linter would be its own lib maybe) |
09:32:34 | FromDiscord_ | <djazz> yep, or look at https://eslint.org/ |
09:32:41 | FromDiscord_ | <djazz> great documentation on how it works too |
09:33:25 | * | Trustable joined #nim |
09:37:24 | FromGitter | <alehander42> thank you! |
09:37:28 | FromGitter | <alehander42> i will look at it more |
09:37:35 | FromGitter | <alehander42> it looks good yes <3 |
09:40:17 | FromDiscord_ | <djazz> https://eslint.org/docs/developer-guide/ ⭐ |
09:45:51 | * | dddddd quit (Remote host closed the connection) |
09:49:12 | FromDiscord_ | <djazz> nim has bitwise ops like and, or, xor, shr, shl. are there something in nim similar to other langs that have bitwise assignments? |=, &=, >>=, <<=, ^= |
09:49:52 | Araq | import bitops |
09:50:01 | Araq | it offers setBit() etc |
09:51:42 | Araq | x |= (1 << N) is actually pretty obscure for 'setBit' |
09:52:07 | Araq | Nim's inofficial motto is "Copying bad design is not good design." |
09:52:20 | FromGitter | <arnetheduck> Araq, any thoughts or change in stance on `func` in the std lib? I've run into several candidates lately for func-ification so they can be called from other funcs |
09:53:42 | FromDiscord_ | <djazz> hmm, not sure how setBit is used |
09:55:17 | FromDiscord_ | <djazz> can I make `v = v shr 7` simpler? |
09:55:52 | FromDiscord_ | <djazz> in other languages that would be `v <<= 7` |
09:56:35 | FromDiscord_ | <djazz> Maybe something similar to `inc` |
09:58:26 | Araq | djazz, if you find a good short name for it. I dunno. 'v = v shr 7' is fine |
09:59:00 | Araq | template shrip(a, b) = a = a shr b # "inplace shr" |
09:59:25 | Araq | shrip v, 7 |
10:00:47 | FromDiscord_ | <djazz> aha |
10:00:55 | FromDiscord_ | <djazz> `cast[byte](v)` just trims of the excess bits and sets the type right? |
10:01:04 | Araq | it's so easy to introduce your own helpers, don't bother us :P |
10:01:10 | FromDiscord_ | <djazz> yeah |
10:01:30 | Araq | yeah, well 'cast' is always a bitwise reinterpretation of the data |
10:01:42 | FromDiscord_ | <djazz> was just checking if there was something existing |
10:02:04 | * | FromDiscord_ <djazz> my 1 week with nim is not much in comparison ;) |
10:02:11 | FromGitter | <alehander42> i cant pass var to threads |
10:02:12 | FromGitter | <alehander42> right |
10:02:42 | FromGitter | <alehander42> var arg |
10:02:45 | FromDiscord_ | <djazz> fixed the celeste code, but havent been able to test it on the RPi yet. Excited 😄 |
10:03:03 | FromDiscord_ | <djazz> will try port the texture packer to nim too |
10:12:14 | * | hoijui quit (Quit: Leaving) |
10:17:34 | Zevv | djazz: template `shl`(x, n) = x = x shl n |
10:18:56 | Araq | Zevv, doesn't work well because 'shl' is a keyword |
10:19:11 | Zevv | `shl`(a, 7) |
10:19:16 | Zevv | it stinks indeed but it works |
10:20:15 | Zevv | template `<<=`(x, n) = x = x shl n |
10:20:16 | Zevv | :) |
10:22:47 | FromGitter | <rokups> on the topic of offensive nim practices - i made these for myself as well https://gist.github.com/046f76646dbd96e4ae127293265c3191 |
10:32:09 | * | abm joined #nim |
10:34:16 | Araq | arnetheduck: meh. it would be a set of massive PRs |
10:34:43 | Araq | and I would need to use debugEcho everywhere. |
10:35:36 | FromGitter | <arnetheduck> well, the std lib is due for a massive set of pr's anyway if you want to keep it relevant.. since you can't call a non-func from a func, it means that most of the std lib is useless when you're after the guarantees afforded by nosideeffect |
10:36:29 | Araq | I can call a noSideEffect proc from a func |
10:39:38 | * | purebadger quit (Ping timeout: 245 seconds) |
10:41:16 | FromGitter | <wsdjeg> does nim has Google groups? |
10:41:19 | * | stefanos82 joined #nim |
10:41:43 | lqdev[m] | shouldn't it be called shrIn? |
10:42:13 | lqdev[m] | according to NEP1, an -In suffix should be added to in-place operations |
10:42:18 | vegai | what, func isn't used in stdlib? |
10:42:27 | vegai | doesn't sound like a difficult PR |
10:42:53 | vegai | more like mechanical and rerunning the unit tests a lot |
10:43:33 | vegai | shouldn't a thing like that be of very high importance to do before 1.0 |
10:43:54 | vegai | s/thing/chore/ |
10:43:57 | * | purebadger joined #nim |
10:56:51 | FromDiscord_ | <djazz> `s/proc/func/g` |
11:00:59 | FromGitter | <arnetheduck> Araq, yes, but noSideEffect is not maintained across the stdlib either |
11:02:53 | FromGitter | <arnetheduck> and inferred things are not that useful.. when I'm reading the proc prototypes I want to know up fron that I can rely on them being nosideeffect and that it was the intent of the developer to make them so, so they don't come back and pull the rug from under my feet.. |
11:04:09 | FromGitter | <arnetheduck> stuff being `proc` tells me that the API is either broken or might become broken in the future and the author didn't want to exclude the possibility |
11:05:30 | FromGitter | <danielecook> How do you detect whether stdin is available? |
11:05:54 | FromGitter | <danielecook> I've seen this `getFileInfo(stdin).id.file==37` but it doesn't seem to work |
11:07:41 | FromGitter | <danielecook> Would you go off the file id / device? id: (device: 0, file: -364440485) |
11:23:51 | FromGitter | <danielecook> `isatty` also presents issue when I run the binary on an HPC...presumably someting to do with it being non-interactive |
11:25:55 | * | laaron- joined #nim |
11:29:32 | * | laaron quit (Ping timeout: 260 seconds) |
11:45:10 | FromGitter | <alehander42> i agree that it should be possible to call a lot of stuff from func |
11:45:44 | leorize[m] | detect if stdin is available? what do you mean? |
11:45:46 | FromGitter | <alehander42> about debugecho, one can always have a simpler alias |
11:46:05 | FromGitter | <alehander42> or even redefine echo = debugecho in debug mode araq |
11:46:09 | narimiran | printf, as in func :P |
11:48:00 | FromGitter | <danielecook> If you are writing a CLI application and you pass something in from a pipe, how do you detect there is incoming data from stdin? |
11:48:05 | FromGitter | <danielecook> What is the best way of doing so? |
11:48:38 | FromGitter | <danielecook> e.g. `echo "this is piped in" | nim_cli_app` should operate differently than `nim_cli_app` |
11:49:05 | FromGitter | <kaushalmodi> @danielecook isatty has worked well for me.. maybe it needs a bug report.. hopefully someone else using HPC can help you out |
11:49:09 | FromGitter | <kaushalmodi> https://scripter.co/nim-check-if-stdin-stdout-are-associated-with-terminal-or-pipe/#nim |
11:56:04 | Araq | arnetheduck: meh, ok, you win. |
11:56:12 | Araq | func the stdlib |
11:56:42 | FromGitter | <arnetheduck> no, you win :) you'll have a more beautiful std lib with fewer bug reports eventually :) |
11:58:59 | FromDiscord_ | <djazz> better stdlib +1 |
11:59:47 | Araq | more beautiful, ok, fewer bugs, unlikely. most effects don't pull in their weight and don't find enough bugs. but I've argued about this before and got no support in removing the effect system. |
12:02:53 | federico3 | IMO we should encourage using it more |
12:03:36 | Araq | on the other hand the lock levels are still super cool and are waiting for their chance once Nim is better at sharing memory |
12:03:48 | narimiran | on that note, opinions about `echo` becoming what `debugEcho` is now? |
12:05:56 | FromGitter | <arnetheduck> nah, that would be sad. the whole point is that you develop `func`'s with a slightly different mindset where there are more guarantees by compiler and type system working in unison.. if you find yourself relying too much on `echo` in such an environment, it's a bit of smell |
12:06:03 | * | Snircle joined #nim |
12:06:42 | FromGitter | <kaushalmodi> narimiran: that would make most of funcs to actually have side effects (on stdout) |
12:06:52 | Araq | I would even go so far and say there should be an --echo:off switch |
12:06:54 | lqdev[m] | please just don't turn Nim into another functional PL thank you |
12:07:02 | FromGitter | <kaushalmodi> I think people should know the implication of using debugEcho in a func |
12:07:18 | Araq | for me 'echo' is debug-only, for CLI you should use stdout.write |
12:07:35 | FromGitter | <kaushalmodi> Araq: aren't they the same? |
12:07:46 | Araq | for the JS target we map 'echo' to console.log |
12:07:53 | federico3 | Araq: that's really not clear in the documentation. Most code uses echo |
12:08:05 | Araq | federico3: I know |
12:08:40 | Araq | kaushalmodi: debugEcho and echo have the same implementation but echo has a side-effect and debugEcho hasn't |
12:08:44 | FromGitter | <kaushalmodi> It all begins with the canonical `echo "hello world" ` :P |
12:08:51 | FromGitter | <kaushalmodi> Araq: I know |
12:09:15 | FromGitter | <kaushalmodi> But using debugEcho, one is more thoughtful of that sideeffect |
12:09:34 | federico3 | reinventing logging :( |
12:10:23 | Araq | ;-) |
12:14:33 | * | purebadger quit (Quit: WeeChat 2.5) |
12:24:31 | FromGitter | <arnetheduck> logging is also a side effect |
12:26:33 | * | Trustable quit (Remote host closed the connection) |
12:27:19 | FromGitter | <alehander42> lqdev[m]: we're far from functional |
12:27:43 | FromGitter | <alehander42> this is more about side effects: people can still choose not to use it |
12:28:19 | FromGitter | <rokups> i wonder how many libs on nimble actually use siedeeffects |
12:28:35 | FromGitter | <alehander42> yaml! |
12:28:36 | FromGitter | <alehander42> i think |
12:29:02 | FromGitter | <rokups> your way of saying "only one"? :trollface: |
12:29:07 | FromGitter | <alehander42> well with func i think more will come |
12:29:50 | FromGitter | <rokups> do you have some writeup what this `func` will be? |
12:30:07 | narimiran | "will be"? it already is |
12:30:14 | FromGitter | <alehander42> yeah maybe not popularized |
12:30:23 | narimiran | func == proc {.noSideEffect.} |
12:30:26 | FromGitter | <arnetheduck> you can keep on using side-effect-free code in your side-effect-ful code.. it's just the other way around that doesn't work. |
12:30:27 | * | FromGitter * rokups is looking into manual |
12:30:30 | FromGitter | <rokups> ohh |
12:31:45 | FromGitter | <arnetheduck> narimaran, that's not true unfortunately.. it's similar but not transparent (the equivalence is superficial and doesn't carry over to all cases - for example they're separate ast types) |
12:32:35 | FromDiscord_ | <djazz> funky! |
12:32:57 | FromGitter | <alehander42> what are cases where they differ |
12:36:20 | FromGitter | <arnetheduck> anywhere in the compiler where there's a `n.kind == nkProc` :) mostly overload resolution, generics, corner cases, stuff like that.. I started funcifying some parts of `system.nim` but stopped when the state of the compiler became apparent.. will try again, but with slightly more peripheral code to begin with, too many issues otherwise. I suspect lots of macro code will be broken as well. |
12:37:52 | * | ikan-keli_2 joined #nim |
12:37:53 | * | ikan-keli_ quit (Ping timeout: 248 seconds) |
12:39:42 | FromGitter | <arnetheduck> the good news is that there's a lot of stuff which shouldn't be broken , which isn't really used in any of those contexts directly.. func |
12:41:02 | FromGitter | <arnetheduck> they usually form consistent and sound building blocks that you glue together afterwards, which is also why you often don't need to `echo` around them.. |
12:42:26 | * | envoyt joined #nim |
12:44:49 | FromGitter | <alehander42> agree, also a bit easier to test |
12:45:09 | FromGitter | <alehander42> and optimize? i guess |
12:45:42 | lqdev[m] | I'm not getting line info in a stack trace entry, something wrong on my side? |
12:46:09 | lqdev[m] | ah, it was --opt:speed |
12:46:24 | lqdev[m] | I suppose I don't need it now, as -Og is the default |
12:47:43 | FromGitter | <arnetheduck> optimizer.. well yeah, though it's enough that the compiler can deduce it. `func` places a hard boundary making the compilers life easier perhaps (this is true in C, less so in nim which fully recompiles everything all the time) |
13:01:45 | Zevv | what happens if the programmer lies or is mistaking about noSideEffect, UB? |
13:03:38 | narimiran | Zevv: https://play.nim-lang.org/#ix=1N0l |
13:06:24 | Zevv | so this is guarenteed to be inferred at compile time? |
13:06:31 | Zevv | then why should I use 'func' anyway? |
13:06:53 | * | natrys joined #nim |
13:08:32 | narimiran | https://play.nim-lang.org/#ix=1N0n |
13:08:43 | * | floppydh quit (Quit: WeeChat 2.5) |
13:08:55 | narimiran | btw, PMunch, playground doesn't highlight `func` :P |
13:12:37 | Zevv | narimiran: https://play.nim-lang.org/#ix=1N0n But why is it not inferred here that setSome() has side effects |
13:12:45 | Zevv | I lied here, but noone cares |
13:12:54 | narimiran | Zevv: wrong link |
13:13:11 | narimiran | click on 'share to ix', before sharing url |
13:13:22 | Zevv | ow wait. http://ix.io/1N0p/nim |
13:13:53 | FromGitter | <kaushalmodi> Zevv: when you click on "share to ix", it updates the playground link in the address bar too |
13:14:01 | Zevv | yeah I know now :) |
13:14:06 | FromGitter | <kaushalmodi> ok :) |
13:15:03 | narimiran | ouch |
13:15:11 | leorize[m] | Zevv: side effects in Nim is not the fp kind of side effects |
13:15:49 | leorize[m] | also tricking the compiler is possible, the implementation of assert does that :p |
13:16:13 | Zevv | yeah, explicitly tricking is ok. But I'm modifying state, which is kind of the definition of side effects |
13:16:39 | Zevv | ow wait, "This means that the proc/iterator only changes locations that are reachable from its parameters" |
13:17:58 | Zevv | knowing this, I'll have to change my behaviour and start using 'func' everywhere unless 'proc' is needed; similar to the basic rule for 'let' vs 'var' |
13:19:51 | narimiran | that's what i did in my personal projects |
13:20:11 | narimiran | everything is func/let, unless it can't be |
13:23:46 | Zevv | well, it seems I have a good progamming style, I just did a global search s/proc /func /g replace for all my files, and all still works. |
13:24:43 | PMunch | narimiran, should be fixed as soon as the cache refreshes :) |
13:28:00 | Zevv | leorize[m]: noSidEffects is cool, but it is slightly confusing that the semantics are different from other languages. Let's add {.noReallyNoSideEffects.} as well! |
13:29:52 | FromDiscord_ | <djazz> fun when you get an error like this, looks like the nim I use was built on Travis! `/Users/travis/build/nim-lang/nightlies/nim/e7471cebae2a404f3e4239f199f5a0c422484aac/lib/system/fatal.nim(39) sysFatal` |
13:30:15 | FromDiscord_ | <djazz> this is stable nim from choosenim |
13:30:17 | FromDiscord_ | <djazz> 😄 |
13:30:29 | FromDiscord_ | <djazz> again with that full path.. |
13:31:31 | FromDiscord_ | <djazz> got it nim secret: `import os; normalizePath ""` |
13:32:03 | FromDiscord_ | <djazz> (actual error: `Error: unhandled exception: index 27 not in 0 .. 26 [IndexError]`) |
13:34:59 | FromDiscord_ | <djazz> Shouldnät normalizePAth convert backlashes on mac/Linux? |
13:35:13 | FromDiscord_ | <djazz> is there a proc for that? |
13:35:39 | FromDiscord_ | <djazz> "Returns a normalized path for the current OS." |
13:35:54 | FromGitter | <kaushalmodi> djazz: you mean convert `"foo\bar"` to `"foo/bar"`? |
13:36:23 | FromGitter | <kaushalmodi> 1) `"foo\\bar"` to `"foo/bar"` |
13:36:41 | * | envoyt quit (Read error: Connection reset by peer) |
13:37:02 | * | envoyt joined #nim |
13:37:22 | leorize[m] | Zevv: that's called {.pure.}, which we don't have :p |
13:38:18 | FromDiscord_ | <djazz> kaushalmodi: yes |
13:38:41 | FromGitter | <kaushalmodi> not sure if this answers your case, but `"foo/bar"` works on windows too |
13:38:42 | FromDiscord_ | <djazz> strutils.replace(p, "\\", "/") should be done automatically, no? |
13:38:56 | narimiran | djazz: do you always have these "index is one too high" problems? :D (it was happening yesterday on your stream also, IIRC) |
13:38:57 | FromDiscord_ | <djazz> ah, discord ate one \\ |
13:39:05 | FromGitter | <kaushalmodi> I even like: ⏎ ⏎ ```from os import `/` ⏎ echo "abc" / "def"``` [https://gitter.im/nim-lang/Nim?at=5d1618792be6a2404dde3fd9] |
13:39:12 | leorize[m] | @djazz what if the user have \ in their file name? :p |
13:39:14 | FromDiscord_ | <djazz> narimiran: that was a completely different issue XD |
13:39:38 | FromGitter | <kaushalmodi> leorize: such users will learn some lesson :P |
13:39:40 | narimiran | but i remember seeing "N+1 is not in 0 .. N range" :D |
13:40:10 | FromDiscord_ | <djazz> leorize[m]: well yeah, you're right, \\ is a valid character in a filename |
13:40:25 | * | dddddd joined #nim |
13:41:23 | leorize[m] | I usually add some backslash in the filename if I want to irritate windows users :p |
13:49:15 | PMunch | Hmm, is it possible to call something from a macro that's not exported? |
13:49:17 | FromGitter | <danielecook> @kaushalmodi yeah I tried out the options on that site no luck |
13:49:26 | FromGitter | <danielecook> isatty works locally but not in non-interactive mode |
13:49:33 | FromDiscord_ | <djazz> yep, those pesky windows users! using backslahes in paths |
13:53:02 | FromGitter | <kaushalmodi> @danielecook May be if you can provide a recipe to show that bug and create a bug report. What do you mean by non-interactive mode? Can that can be created locally? |
13:53:37 | * | stefanos82 quit (Quit: Quitting for now...) |
13:53:40 | FromGitter | <kaushalmodi> btw that site is my blog :) |
13:53:56 | * | lritter joined #nim |
13:58:02 | FromGitter | <danielecook> @kaushalmodi oh haha ok cool |
13:58:08 | FromGitter | <danielecook> Ok Let me see if I can recreate it |
13:58:21 | FromGitter | <danielecook> One way might be to execute in screen or similar...i'll experiment with that |
13:58:38 | PMunch | I basically want to import the options module and my optionsutils module in a safeoptions module and hide get and unsafeGet from options |
14:04:06 | FromDiscord_ | <djazz> how do I assign a value to multiple variables? |
14:04:13 | FromDiscord_ | <djazz> I have tried r = g = b = x |
14:04:19 | FromDiscord_ | <djazz> r, g, b = x |
14:04:29 | FromDiscord_ | <djazz> the last one is mentioned in Tut 1 |
14:05:10 | Zevv | assignment != initialisation |
14:05:54 | FromGitter | <juancarlospaco> Hi |
14:07:22 | FromDiscord_ | <djazz> I guess it only works with var/let |
14:07:35 | FromDiscord_ | <djazz> "var x, y = 3 # assigns 3 to the variables `x` and `y`" |
14:08:39 | leorize | PMunch: use bindSym |
14:09:27 | FromDiscord_ | <kodkuce> hmm if i have Class1 and it has Class2 and Class2 has variables v1,v2,v3,v4... do i have for to put * for every variable, i thnked its enought i puted it on Class2 itself but am getting unacessable if i dont put on each var |
14:09:39 | FromDiscord_ | <kodkuce> hmm if i have Class1 and it has Class2 and Class2 has variables v1,v2,v3,v4... do i have for to put * for every variable, i thnked its enought i puted it on Class2 itself but am getting unacessable if i dont put on each var, that normal behavior |
14:09:50 | leorize | please avoid editing on discord |
14:09:56 | narimiran | hey kodkuce/poopBot! long time no see :) |
14:10:01 | FromGitter | <mratsim> yes you have to export every field you want public |
14:10:09 | PMunch | leorize, bindSym? |
14:11:10 | leorize | yea, once you bound the symbol you can have the macro generate calls for it without the need of it being exported |
14:11:24 | leorize | unless I misunderstood what you are trying to do |
14:14:54 | PMunch | Well, I have a module optionsutils. It imports options and has macros that uses isSome and unsafeGet in a defined way to create a safe pattern for accessing option values. I now want to create a safeoptions module that exposes the Options type, along with only the safe pattern macros from optionsutils, and the safe parts of options. |
14:15:47 | PMunch | So what I want to do is hide stuff from options, but export some stuff |
14:15:59 | PMunch | But still allow the macro to call the hidden stuff |
14:16:58 | leorize | then just bindSym what you need |
14:17:20 | leorize | as long as stuff don't get in the `export` line, you'll be fine |
14:18:00 | leorize | import the entire `options` module, then `export` for operations you want to expose |
14:18:21 | leorize | for the macro to generates call to those unexported procs, bindSym them |
14:18:45 | leorize | for templates, `bind` should be enough |
14:21:10 | * | clyybber joined #nim |
14:21:26 | PMunch | Hmm, how do I export a type? |
14:21:38 | PMunch | export Option doesn't seem to work.. |
14:22:33 | leorize | pretty sure you can `export except`, no? |
14:23:54 | FromDiscord_ | <kodkuce> sorry for editing in discord i alwes frogot 😦 , hi narimiran my psu died so i ordered new one, then it worked for 2 days then PC died again then i went to PC service they changed my eprom chip and now it works |
14:24:17 | PMunch | Hmm, I get undeclared identifier: 'Option' when i use import options; export Option in my safeoptions file |
14:25:04 | leorize | hmm, just tried on the playground and it's not yelling at me |
14:25:33 | PMunch | Link? |
14:25:44 | leorize | https://play.nim-lang.org/#ix=1N0H |
14:26:24 | PMunch | Ah yeah, that works fine. But importing from that doesn't work.. |
14:26:44 | leorize | possible bug then? |
14:27:10 | PMunch | Hmm, could be.. |
14:27:12 | leorize | for now you can do this I guess: https://play.nim-lang.org/#ix=1N0I |
14:28:02 | PMunch | Ugh, I'm an idiot.. |
14:28:11 | PMunch | Forgot I was working in a Nim module |
14:28:16 | PMunch | And I forgot to re-install it.. |
14:28:41 | leorize | nimble develop |
14:30:44 | PMunch | Hmm, bindSym doesn't seem to work.. |
14:31:05 | * | envoyt quit (Ping timeout: 258 seconds) |
14:31:14 | * | hoijui joined #nim |
14:31:32 | * | envoyt joined #nim |
14:32:28 | leorize | PMunch: https://nim-lang.github.io/Nim/manual.html#macros-bindsym |
14:34:22 | PMunch | Hmm, maybe it's an issue with quote do: |
14:34:44 | PMunch | I tried to let x = bindSym"isSome" and then use `x` in my quote statement |
14:35:09 | leorize | possibly |
14:36:02 | PMunch | Hmm, looking at the macro output it does appear as Sym "isSome" |
14:40:02 | PMunch | Oh well |
14:40:04 | * | PMunch quit (Remote host closed the connection) |
14:53:19 | * | envoyt quit (Ping timeout: 258 seconds) |
14:55:26 | * | envoyt joined #nim |
15:00:29 | * | dwdv quit (Quit: quit) |
15:25:02 | * | brakmic_ quit (Ping timeout: 245 seconds) |
15:26:01 | * | brakmic_ joined #nim |
15:29:14 | FromGitter | <alehander42> huh i guess it makes sense |
15:29:16 | FromGitter | <alehander42> for func |
15:29:21 | FromGitter | <alehander42> but still a bit weird |
15:29:31 | FromGitter | <alehander42> so this means it can have far reaching effects |
15:29:40 | FromGitter | <alehander42> and change e.g. my global variables |
15:30:06 | FromGitter | <alehander42> @arnetheduck one optimization can be that you can automemoize some pure functions |
15:30:24 | FromGitter | <alehander42> but i am not sure if this is done a lot: maybe if a hint is given or for small inputs |
15:30:36 | FromGitter | <alehander42> <3 |
15:30:38 | FromGitter | <alehander42> ops |
15:30:42 | FromGitter | <alehander42> you can lose memory |
15:31:31 | FromGitter | <arnetheduck> loop invariant hoisting is pretty common, ie you move constant expressions out of loops, something you can only do with pure functions |
15:32:03 | FromGitter | <arnetheduck> constant, in the sense of constant for the loop duration |
15:32:20 | FromGitter | <alehander42> yeah |
15:32:36 | FromGitter | <alehander42> but global? |
15:35:23 | FromGitter | <arnetheduck> not really, unless the variables passed in are constant |
15:35:56 | FromGitter | <arnetheduck> so basically, it could replace `sin(20)` with the resulting float |
15:36:02 | FromGitter | <alehander42> yeaah my point was |
15:36:07 | FromGitter | <alehander42> that you can have a runtime table |
15:36:12 | FromGitter | <alehander42> but its better to use a |
15:36:14 | FromGitter | <alehander42> pragma for that indeed |
15:36:18 | FromGitter | <alehander42> so its obvious in the code |
15:36:19 | * | tjmac left #nim ("-bye") |
15:36:20 | FromGitter | <alehander42> the payoff |
15:36:37 | FromGitter | <alehander42> tradeoff* |
15:41:50 | FromGitter | <arnetheduck> don't think compilers will be smart enough to do that automagically at least :) |
15:42:20 | * | theelous3 joined #nim |
15:48:46 | * | laaron joined #nim |
15:49:00 | * | laaron- quit (Remote host closed the connection) |
15:50:04 | FromGitter | <alehander42> well: i see a func(int8), i say : ok lets create a table FUNC_RESULTS and patch it to cache stuff there (or to directly check the table) if the code size of the func is big enough so we know that it might be slower than accessing a table |
15:50:27 | FromGitter | <alehander42> but yeah its a choice thats best left to the user |
16:10:09 | * | deech__ quit (Ping timeout: 248 seconds) |
16:32:30 | * | nsf joined #nim |
16:38:08 | * | Trustable joined #nim |
16:40:01 | * | vlad1777d__ quit (Ping timeout: 248 seconds) |
16:42:57 | * | hoijui quit (Ping timeout: 245 seconds) |
16:52:14 | * | vlad1777d__ joined #nim |
16:57:58 | * | vlad1777d__ quit (Ping timeout: 245 seconds) |
16:59:03 | * | vlad1777d__ joined #nim |
17:11:35 | * | narimiran quit (Remote host closed the connection) |
17:31:36 | * | abm quit (Quit: Leaving) |
17:42:06 | * | deech__ joined #nim |
17:51:54 | * | hoijui joined #nim |
18:02:20 | * | ehmry quit (Remote host closed the connection) |
18:03:22 | leorize | what is the preferred way to create cli interfaces? |
18:03:34 | leorize | last time I check there's docopt and cligen |
18:03:45 | solitudesf | cligen |
18:05:13 | solitudesf | docopt parses help string at startup so it bloats binary size at slows startup. |
18:05:17 | solitudesf | *and |
18:08:46 | FromGitter | <kaushalmodi> +1 for cligen |
18:09:35 | leorize | I could write a parser generator for docopt... |
18:10:04 | FromGitter | <arnetheduck> lol I'm impressed if you've come so far that parsing the command line is truly the performance bottleneck in your application |
18:10:19 | leorize | I'm wondering if I could have as much the ability to customize the help string with cligen than docopt |
18:10:36 | leorize | @arnetheduck: docopt uses nim-regex which is super slow :p |
18:11:14 | * | mrgaturus joined #nim |
18:12:19 | FromGitter | <arnetheduck> that's quite the achievement then, if you manage to make parsing ~200 chars perceptively slow |
18:13:21 | solitudesf | in the program i was testing it, docopt added 10ms startup time and ~100kb binary size. |
18:13:48 | solitudesf | its not much for a single launch, but it can add up depending on usage. |
18:14:02 | FromGitter | <arnetheduck> for the record, I've got nothing against cligen, perf just doesn't seem like the first option I'd judge it on, unless the options are really terribly bad |
18:14:11 | FromGitter | <arnetheduck> release build? |
18:14:30 | leorize | the Nim way is for docopt to be a macro that generates a parser :) |
18:14:49 | * | stefanos82 joined #nim |
18:16:02 | FromGitter | <arnetheduck> ah yes, I guess you have a point there, macros are an easy way to make things extremely bloated and terribly bad |
18:24:01 | * | mrgaturus quit (Remote host closed the connection) |
18:41:43 | * | sealmove joined #nim |
18:48:10 | * | krux02 quit (Remote host closed the connection) |
19:03:48 | * | hoijui quit (Ping timeout: 245 seconds) |
19:04:07 | * | nsf quit (Quit: WeeChat 2.4) |
19:09:56 | * | zargot joined #nim |
19:11:33 | federico3 | meh |
19:16:56 | * | zargot quit (Quit: leaving) |
19:18:28 | * | ehmry joined #nim |
19:43:52 | * | Snircle quit (Read error: Connection reset by peer) |
19:44:44 | * | Snircle joined #nim |
19:50:58 | FromDiscord_ | <Erik> What is the easiest way to convert an (ASCII) string to uppercase? |
19:52:10 | Araq | strutils.toUpper |
19:52:19 | Araq | strutils.toUpperAscii |
20:03:25 | FromDiscord_ | <Erik> Thanks, somehow I missed that 🤔 |
20:23:14 | Zevv | What is the nim term for an "automatic variable" living on the stack? |
20:26:52 | lqdev[m] | what's an automatic variable? |
20:27:09 | Zevv | a variable or object living on the stack |
20:27:24 | Zevv | it's C speak |
20:27:34 | clyybber | Zevv: Why would nim have an extra name for that? |
20:27:36 | Zevv | but I don't see it in the Nim manual, so I wondered if there was an actual name for it in nimland |
20:27:58 | clyybber | I don't think so |
20:28:01 | lqdev[m] | I think we just call it "variable" |
20:28:09 | Zevv | make sense |
20:28:12 | lqdev[m] | for objects living on the heap we call them "ref objects" |
20:28:54 | Zevv | yeah, but 'objects' is abigious here. a ref int is not a ref object, or is it |
20:29:34 | lqdev[m] | you can just call them "refs" if you want to be more generic |
20:29:41 | Zevv | right, thanks |
20:30:00 | lqdev[m] | but what monster allocates an int on the heap anyway |
20:31:18 | FromGitter | <alehander42> so auto variables are local variables but in smaller scopes? |
20:32:56 | Zevv | scope can be more limited, but the most important is that auto variables go away autoamticcaly as the call stack unwinds |
20:33:16 | FromGitter | <alehander42> but this is true for local |
20:33:56 | Zevv | Sure, but there is no rule saying that locals should be allocated on a stack. |
20:33:57 | FromGitter | <alehander42> or you mean that int* a = malloc.. can't be possibly automatic |
20:34:02 | FromGitter | <alehander42> i see |
20:34:14 | Zevv | in scripting languages like python, even locals live in the heap |
20:34:14 | FromGitter | <alehander42> so those locals that are allocated on stack |
20:34:25 | FromGitter | <alehander42> "allocated" |
20:34:26 | Zevv | rught |
20:34:37 | FromGitter | <alehander42> btw if you |
20:34:50 | FromGitter | <alehander42> debug and want to see the previous values of such variables |
20:34:52 | Zevv | that's because of the C runtime legacy. Even the C standard does not speak of stacks and heaps - it just happens to be a convenient way to implement that |
20:35:00 | FromGitter | <alehander42> would you expect to see only the values in the current call |
20:35:06 | FromGitter | <alehander42> or in all the calls |
20:35:11 | FromGitter | <alehander42> of the given function |
20:35:53 | Zevv | I don't quite get your question. But when a function returns, it just abandons its locals. They stay behind outside the current stack. |
20:35:54 | FromGitter | <alehander42> (i am interested in what people see as "history" of the values of a variable/expression) |
20:36:00 | * | Trustable quit (Remote host closed the connection) |
20:36:16 | Zevv | You could fire up your debugger and look outside the current stack, and find the old data from some time ago. |
20:36:30 | Zevv | But as soon as your code will start going 'deeper' that part will be overwritten |
20:37:09 | FromGitter | <alehander42> eh you have reverse debuggers |
20:37:15 | FromGitter | <alehander42> e.g. rr |
20:37:27 | FromGitter | <alehander42> you can put a reverse watchpoint for example |
20:37:37 | Zevv | I'm doing a writup of memory management in Nim - basically explaining stacks, heaps, where stuff is stored - what does a string or a seq really look like, what happens if you grow a string, stuff like that. |
20:38:10 | FromGitter | <alehander42> awesome: are you going to include the difference between nim1 and nim2 strings/seq-s |
20:38:16 | FromGitter | <alehander42> or is it off-topic |
20:38:28 | FromGitter | <alehander42> (gc and new-runtime nim) |
20:38:52 | Zevv | it's in my todos, but it does not really matter for most of these things. |
20:44:55 | * | sealmove quit (Quit: WeeChat 2.5) |
20:47:37 | * | nsf joined #nim |
21:00:55 | * | al_ joined #nim |
21:00:57 | FromDiscord_ | <djazz> Yay, with a script I wrote in Nim, I made Celeste playable on a Raspberry Pi 3 (the script shrinks the texture sizes) https://twitter.com/daniel_hede/status/1144711813495439360 |
21:02:56 | * | al_ quit (Client Quit) |
21:08:00 | * | brakmic_ quit () |
21:11:11 | FromDiscord_ | <lmariscal> I'm readin the nep1 but there's no guide for nim file naming |
21:11:19 | clyybber | Araq: When I make it insert a `=destroy` in place of a wasMoved, the =destroy call causes a SIGSEV |
21:11:28 | FromDiscord_ | <lmariscal> should I go with camelCase, PascalCase or snake_case? |
21:11:33 | FromDiscord_ | <lmariscal> stb seams to combine some of them |
21:11:38 | FromDiscord_ | <lmariscal> std* |
21:12:20 | clyybber | manually replacing the call to eqdestroy in the C code with "colontmpD_.p = NULL; colontmpD_.len = 0;" fixes the segfault |
21:12:27 | FromGitter | <alehander42> snake_case |
21:19:33 | Araq | clyybber: hmm what's the involved type? |
21:19:58 | clyybber | Its a string |
21:20:23 | Zevv | alehander42: first draft: http://zevv.nl/div/nim-memory.html |
21:20:55 | Zevv | feedback appreciated. Not sure if I'm starting at a too high or too low level. |
21:21:12 | FromDiscord_ | <djazz> https://www.twitch.tv/daniel_hede/ |
21:21:17 | clyybber | It also works when I replace the destroy implentation in ccgexprs with "if ($1.p && $1.p->allocator) { $1.p = NULL; $1.len = 0; }" |
21:21:36 | Zevv | in the end it should be able to explain things like https://forum.nim-lang.org/t/4850#30396 |
21:26:44 | Araq | clyybber: that means you have a double free, ask valgrind |
21:27:44 | federico3 | any way to format strigs using a dynamic formatter (as: stored in a variable)? |
21:29:04 | * | nsf quit (Quit: WeeChat 2.4) |
21:31:19 | * | lf-araujo joined #nim |
21:35:03 | * | solitudesf quit (Ping timeout: 258 seconds) |
21:48:41 | * | PMunch joined #nim |
21:56:00 | Zevv | printf :) |
21:57:16 | federico3 | with variable replacing tho... |
21:57:30 | federico3 | it's quite limiting not having something like this in the stdlib |
22:00:33 | * | clyybber quit (Quit: WeeChat 2.5) |
22:05:19 | FromGitter | <alehander42> $1 $2 |
22:05:37 | FromGitter | <alehander42> and "$1" % [variable] |
22:05:39 | FromGitter | <alehander42> iirc |
22:08:17 | FromGitter | <alehander42> Zevv after all its good to point out that local variables can have |
22:08:38 | FromGitter | <alehander42> yeah nvm |
22:08:57 | FromGitter | <alehander42> btw when do they get optimized in a register? |
22:09:07 | FromGitter | <alehander42> i think it happens in some -O levels |
22:16:22 | rayman22201 | @Zevv, I love the styling on your blog :-) |
22:20:19 | PMunch | Zevv, which is your blog? |
22:20:42 | xace | PMunch: linked a few lines above: http://zevv.nl/div/nim-memory.html |
22:20:43 | rayman22201 | 2:20 PM <Zevv> alehander42: first draft: http://zevv.nl/div/nim-memory.html |
22:20:50 | rayman22201 | beat me to it |
22:21:18 | PMunch | Ah, just logged on. First line from Zevv I saw was "printf :)" |
22:21:32 | rayman22201 | The article is good. It reads like my "introduction to computer architecture" class from college lol |
22:21:49 | PMunch | Ooh cool, I've been meaning to write that exact article! |
22:23:50 | federico3 | alehander42 - I'm trying to use fmt with staticRead at least |
22:26:03 | FromGitter | <alehander42> static vars or const variables? |
22:26:32 | * | Vladar quit (Remote host closed the connection) |
22:26:49 | FromGitter | <alehander42> for the formatter |
22:27:22 | FromGitter | <alehander42> not really sure what you want to do: if its dynamic, like changing on runtime it cant probably work on ct |
22:29:04 | FromDiscord_ | <treeform> @djazz did you make Celeste originally? Is it an open source project? Is it written in nim? |
22:29:46 | * | disruptek quit (Ping timeout: 268 seconds) |
22:32:32 | FromDiscord_ | <treeform> Zevv, my feed back: `repr(x)` explanation seems to be out of place in the "Memory organization in Nim" section. |
22:33:10 | * | disruptek joined #nim |
22:35:57 | FromDiscord_ | <djazz> @treeform no, no and no. I made a script in nim that patches the textures so it works on a raspberry pi |
22:52:15 | PMunch | What was wrong with the original textures? |
22:52:25 | PMunch | Too large to load onto the GPU? |
22:55:43 | * | natrys quit (Quit: natrys) |
22:57:44 | * | envoyt quit (Ping timeout: 244 seconds) |
23:02:59 | FromDiscord_ | <djazz> yep |
23:05:17 | PMunch | What is the maximum texture size on the RPi? |
23:05:23 | PMunch | Probably depends on the model I guess |
23:05:24 | FromDiscord_ | <djazz> 2048x2048 |
23:05:37 | PMunch | Huh, that's pretty reasonable |
23:05:38 | FromDiscord_ | <djazz> celeste uses 4096x4096 and some other sizes |
23:05:46 | PMunch | Aaah, right |
23:05:55 | FromDiscord_ | <djazz> so i extract all sprites, repack to smaller atlases |
23:06:01 | PMunch | I remember doing games for phones and couldn't go above 512x512 |
23:06:01 | FromDiscord_ | <djazz> works actually |
23:06:10 | FromDiscord_ | <djazz> played through first chapter on stream ^^ |
23:06:14 | FromDiscord_ | <djazz> yeah |
23:06:19 | PMunch | Yeah, if it loads on run-time that should work fine :) |
23:25:08 | PMunch | Oh joy, best part of writing a library, documentation! |
23:31:10 | * | PMunch quit (Remote host closed the connection) |
23:33:13 | shashlick_ | I now have a basic implementation of shared string and shared seq to use across threads |
23:33:47 | shashlick_ | Still lots of work to do but curious who would be interested in checking it out |
23:47:58 | Araq | shashlick_: I can take a quick look |
23:48:04 | Araq | but I should be sleeping |
23:48:27 | * | stefanos82 quit (Quit: Quitting for now...) |
23:53:51 | shashlick_ | I need to get it into github - ya it's really late for you |