00:11:16 | FromGitter | <Varriount> Anyone here know some fast/efficient xml libraries, possibly in C, that I could use? |
00:11:32 | krux02 | tinyxml |
00:11:40 | FromGitter | <Varriount> Right now I've plans to use Nim's xmlparser, however I would like to compare alternatives. |
00:11:43 | krux02 | but I don't know it, i just heared about it |
00:12:27 | krux02 | well when you want a fast one it should not translate the entire file into a tree structure with xml node objects on parsing |
00:12:52 | FromGitter | <Varriount> Sorry, I meant parsexml: https://nim-lang.org/docs/parsexml.html |
00:18:13 | FromDiscord | <claude> oh i see, the pragma for allowing unused is `used` |
00:57:46 | * | user1101_ joined #nim |
00:59:46 | * | user1101 quit (Ping timeout: 264 seconds) |
00:59:46 | * | user1101_ is now known as user1101 |
01:45:08 | FromGitter | <gogolxdong> How to let the proc spawn but return something first ? |
01:45:45 | FromDiscord | <claude> defer: spawn? |
01:46:44 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ad400845f188ccc156b4cd3] |
01:47:16 | FromGitter | <gogolxdong> want it return "done" and execute the spawn proc in background. |
01:48:56 | * | rockcavera joined #nim |
01:53:37 | FromGitter | <Varriount> You need to use flowvars |
01:59:00 | FromGitter | <gogolxdong> what's that? |
02:08:05 | FromGitter | <gogolxdong> @Varriount can you show me an exmaple code of how to new and operate this type? |
02:24:17 | FromGitter | <gogolxdong> I want to return something first than the spawning proc. |
02:26:22 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ad409ce7c3a01610de6f97b] |
02:27:24 | FromGitter | <gogolxdong> Learned from Nim source code of how to use FlowVar type but didn't find out how to achieve my goal. |
02:38:54 | * | dddddd quit (Remote host closed the connection) |
03:02:37 | petersjt014[m] | sometimes I run a comamnd with `exexCmdEx` and get a single newline back. Is there a common way to replace it with the null string to make error handling less obnoxious? |
03:09:00 | * | krux02 quit (Remote host closed the connection) |
03:15:28 | petersjt014[m] | the main thing I'm doing is validating the length later, so I was planning on using `.replace(re"^\s+$", "")` if there is nothing more appropriate |
03:16:12 | FromGitter | <Varriount> Why not just use setlen? |
03:17:27 | FromGitter | <Varriount> petersjt014[m]: You might also think about using the strip() procedure from strutils to clip whitespace off the ends of a string |
03:17:48 | * | tiorock joined #nim |
03:17:48 | * | tiorock quit (Changing host) |
03:17:48 | * | tiorock joined #nim |
03:17:48 | * | rockcavera is now known as Guest8634 |
03:17:48 | * | Guest8634 quit (Killed (karatkievich.freenode.net (Nickname regained by services))) |
03:17:48 | * | tiorock is now known as rockcavera |
03:17:49 | FromGitter | <Varriount> I also have a version I can post which modifies the string in-place. |
03:26:38 | petersjt014[m] | Can I end up doing something like `var (r0, _) = execCmdEx interp"ping $idklol[0].strip"` then? |
03:27:18 | FromGitter | <Varriount> Remind me again, what values does execCmdEx return? |
03:30:25 | FromGitter | <Varriount> petersjt014: You can do that, if you want to discard the exit code (which is usually bad practice) |
03:30:47 | petersjt014[m] | A string (or TaintedString I'm told) which I (I think) am then turning into a seq of strings with split(). |
03:34:24 | petersjt014[m] | and it becomes just " " if nothing is returned, which has length > 0 which is throwing me off. |
03:36:00 | petersjt014[m] | Would a case statement be reasonable here? |
03:36:01 | FromGitter | <Varriount> why not use a `if` to check then? or if you're doing it multiple times, use a template? |
03:36:18 | petersjt014[m] | or that |
03:36:28 | FromGitter | <Varriount> `````` |
03:37:04 | FromGitter | <Varriount> ```var (r0, _) = execCmdEx ... ⏎ if r0 == "": ... ⏎ else: ...``` [https://gitter.im/nim-lang/Nim?at=5ad41a6015c9b03114fe76f2] |
03:38:08 | petersjt014[m] | Yeah, I'll try that |
03:39:23 | FromGitter | <Varriount> Hm, now to fix doc-comment continuation in NimLime |
03:40:35 | petersjt014[m] | sounds fun |
03:54:58 | FromDiscord | <claude> i'd like an option for nim check arguments in NimLime, for example i need `-d:ssl` for my project to work, so i have to do `nim check -d:ssl` manually |
04:06:38 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ad4214d109bb04332c75fe3] |
04:08:50 | FromGitter | <gogolxdong> type mismatch. |
04:15:00 | FromGitter | <gogolxdong> Is that FlowVar type doesn't support table? |
05:10:21 | * | yglukhov quit (Remote host closed the connection) |
06:12:04 | * | PMunch joined #nim |
06:17:00 | * | nsf joined #nim |
06:37:25 | FromGitter | <Varriount> I don't believe so. |
06:38:03 | FromGitter | <Varriount> claude: Right now I'm in the process of a major refactor. If you need extra arguments though, you should probably put it into a project file |
06:39:13 | FromGitter | <Varriount> claude: https://nim-lang.org/docs/nims.html |
06:40:37 | FromGitter | <Varriount> My priorities right now are: fixing/refactoring the "nim check" feature, fixing doc-comment completion, fixing the project settings code, then adding project creation and build support. |
06:41:14 | FromGitter | <Varriount> Also, I'm removing Sublime Text 2 support, so if you're still using that, I recommend switching to Sublime Text 3 |
06:58:27 | * | yglukhov joined #nim |
07:01:12 | yglukhov | treeform: aye, pure nim ttf support would be awesome! But lately I was more thinking about using platform native api for bitmap generation. |
07:11:25 | * | yglukhov quit (Remote host closed the connection) |
07:13:35 | * | rokups joined #nim |
07:43:35 | * | floppydh joined #nim |
07:45:01 | FromGitter | <alehander42> @krux02 I don't like this def, non-turing completeness is a thing, also stuff like powerpoint is turing complete and it's not a proglang |
07:46:47 | FromGitter | <gogolxdong> `ambiguous call; both tables.[]=(t: OrderedTableRef[[]=.A, []=.B], key: A, val: B)[declared in lib\pure\collections\tables.nim(770, 5)] and tables.[]=(t: TableRef[[]=.A, []=.B], key: A, val: B)[declared in lib\pure\collections\tables.nim(428, 5)] match for: (Error Type, string, Future[json.JsonNode])` |
07:50:43 | FromGitter | <gogolxdong> It's ambiguous even specify to OrderedTableRef. |
07:59:55 | FromGitter | <abijahm> @gogolxdong example using tableand flowvar ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ad457fb270d7d3708cff71d] |
08:05:10 | FromGitter | <gogolxdong> could it be newTablestring,FlowVar[Future[JsonNode () ? |
08:09:59 | * | sendell joined #nim |
08:15:24 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ad45b9c109bb04332c84a51] |
08:15:30 | * | Vladar joined #nim |
08:15:45 | FromGitter | <gogolxdong> type mismatch: got <JsonNode> ⏎ ⏎ but expected one of: ⏎ template `^`(x: int): BackwardsIndex ⏎ proc `^`T (fv: FlowVar[T]): T ... [https://gitter.im/nim-lang/Nim?at=5ad45bb12b9dfdbc3a956b4c] |
08:24:55 | * | xkapastel quit (Quit: Connection closed for inactivity) |
08:27:12 | FromGitter | <gogolxdong> Does FlowVar conflict with Future? |
08:27:23 | FromGitter | <abijahm> @gogolxdong using future ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ad45e6b27c509a77417af34] |
08:29:35 | FromGitter | <mratsim> I need a set/hashset with the following properties: ⏎ ⏎ 1) Can store up to `~500 elements` at most (covered by `set` and `Hashset`) ⏎ 2) `Incl` and `Excl` as fast as possible (in hot path) (covered by `set` and `Hashset`) ⏎ 3) Can take the `length` without iterating (in hot path) (covered by `Hashset`, can use a `int16 length field` with `set`) ... [https://gitter.im/nim-lang/Nim?at=5ad45eef2dfcfffd2b2c7148] |
08:30:54 | FromGitter | <mratsim> It can be on stack or heap, it’s only allocated once per thread and can be reused for the lifetime of the program. |
08:31:12 | FromGitter | <mratsim> This is for my Go playing bot. |
08:46:07 | * | yglukhov joined #nim |
08:46:33 | Araq | mratsim: use an array |
08:48:01 | FromGitter | <narimiran> btw, Araq, why we don't have `pop` for sets? |
08:48:17 | FromGitter | <mratsim> you can’t pop an unordered dat structure |
08:48:27 | FromGitter | <narimiran> python can :P |
08:48:39 | FromGitter | <mratsim> it’s probably slow then :D |
08:49:01 | FromGitter | <narimiran> `pop` == "take a random value" ;) |
08:49:13 | FromGitter | <ChristianWitts> nah, it removes and returns an arbitrary set element |
08:49:22 | FromGitter | <ChristianWitts> so it’s O(1) |
08:49:35 | FromGitter | <mratsim> oh, I’ll check out their implementations then. |
08:50:46 | * | yglukhov quit (Ping timeout: 264 seconds) |
08:51:44 | Araq | narimiran: because nobody wrote it |
08:52:06 | FromGitter | <mratsim> I see how I can do it with 2 arrays but with a single array I don’t see how to take a random value in the set without allocating a temporary with only the set values. |
08:52:09 | Araq | features have that nasty tendency to start in the "not implemented" state |
08:52:56 | Araq | lol that PR queue will never get below 50 anymore |
08:53:06 | FromGitter | <narimiran> ok, i might give it a shot and try to implement it, but i'm not sure i understand how it should be done.... |
08:53:09 | Araq | or the issues below 1000 |
08:53:49 | FromGitter | <ChristianWitts> @mratsim https://github.com/python/cpython/blob/master/Objects/setobject.c#L705 ⏎ for the set.pop implementation |
08:54:00 | FromGitter | <narimiran> issues below 1200 seems impossible too |
08:54:22 | FromGitter | <mratsim> you beat me to it 👍 |
08:57:54 | FromGitter | <mratsim> @ChristianWitts @miranPython is using a HashSet, that can be added to Nim Hashsets. |
08:58:36 | FromGitter | <mratsim> However nim “sets” are bitset, I don’t think you can pop at random efficiently on them |
08:59:25 | FromGitter | <narimiran> adding it only to HashSets would be a nice step forward! |
09:01:55 | FromGitter | <gogolxdong> @abijahm thanks very much. |
09:45:43 | * | user1101_ joined #nim |
09:46:59 | * | user1101 quit (Ping timeout: 256 seconds) |
09:46:59 | * | user1101_ is now known as user1101 |
09:47:17 | * | rockcavera quit (Ping timeout: 260 seconds) |
09:55:22 | Araq | ugh, I want to remove overloaded dot operators, they don't work. |
09:56:40 | Araq | myjson.key.getStr # myjson["key"]["getStr"] or myjson["key"].getStr ? |
09:57:44 | Araq | we can instead introduce a binary operator that binds like '.' such as '.?' |
09:57:54 | Araq | myjson.?key.getStr |
09:59:20 | Araq | or myjson.@key or whatever |
09:59:48 | Araq | overloaded dot operators turn the static guarantees Nim gives into a loophole fest |
10:02:20 | FromGitter | <alehander42> `.?` looks like a safe navigation operator |
10:04:29 | FromGitter | <alehander42> also, I don't think the json module overloads `.` ? |
10:04:45 | Araq | no my coworker did :P |
10:05:50 | FromGitter | <alehander42> well, one should just use op overloading with care :D each operator can be overloaded in a very confusing way |
10:06:18 | FromGitter | <alehander42> a lot of the existing js backend code depends on some kinf of `.` overloading somewhere deep :D |
10:06:24 | Araq | it's overloaded in the way the manual suggests is a good idea |
10:06:36 | dom96 | This is why all those people saying "But what if someone does this..." might have a point :P |
10:07:20 | Araq | dom96: no they have a point when my nose tells me the same :P |
10:07:40 | dom96 | Yes, but if it wasn't for this you wouldn't have known |
10:07:45 | Araq | I never liked overloading '.' to begin with. |
10:07:49 | FromGitter | <narimiran> `myjson@key`? (without the dot) |
10:09:14 | Araq | the underlying design problem here is the goal to find a "consistent" interpretation for everything that otherwise has none. |
10:09:23 | FromGitter | <alehander42> I don't think this is such a huge problem for the js overload `.` |
10:09:45 | FromGitter | <alehander42> because it can happen when you have `.x` and `proc x(s: js)` |
10:10:02 | FromGitter | <alehander42> but you shouldn't really write most of your functions to accept `js`: they should expect normal nim types |
10:10:22 | Araq | these interpretations that otherwise have no meaning are really important. These are the bug catchers. |
10:10:28 | FromGitter | <alehander42> so naturally your code should "close" the dynamic `.` usage in a cast or something like that |
10:14:31 | Araq | when I read Nim code I want to read Nim code and not some shit that is as fragile as JavaScript... |
10:15:06 | dom96 | Actually, when I think about it |
10:15:16 | dom96 | Shouldn't jsgen be a macro? |
10:15:30 | dom96 | If your weird `.` overloading is in a macro then at least you know it's limited to that macro invocation |
10:16:15 | Araq | dom96: I'm not following. 'jsgen' ? |
10:17:09 | dom96 | er, jsffi is what I mean |
10:17:41 | FromGitter | <alehander42> so `jsffi(a.b.c)` ? |
10:17:48 | Araq | oh look I found a meaning for "foo" "bar". it should be an implicit concatenation. handy, huh? no, it sucks. ("abc" "def", "xyz") |
10:18:04 | * | xet7 joined #nim |
10:19:26 | FromGitter | <alehander42> honestly I think this whole `.` thing can be resolved by a good editor plugin/IDE which highlights in a special way overloaded `.`-s |
10:20:16 | Araq | no, we can use the Unicode mid-dot instead of the dot and let the editor render it as a colored '.' |
10:21:00 | FromGitter | <alehander42> still better than `@` :D |
10:21:15 | Araq | or something I happen to be able to reach on my keyboard, foo∞bar |
10:21:18 | dom96 | no, semantic highlighting is difficult |
10:21:51 | Araq | foo…bar |
10:22:10 | FromGitter | <alehander42> that just looks like the range operator |
10:22:26 | Araq | foo/bar |
10:22:40 | Araq | foo\bar |
10:22:56 | * | yglukhov joined #nim |
10:23:06 | Araq | so many options, but no, we have to use the freaking same character. |
10:23:13 | * | couven92 joined #nim |
10:23:31 | FromGitter | <alehander42> `/` can be fine, also incredibly surprising for everybody who has used `/` as divide |
10:23:47 | FromGitter | <narimiran> `|` |
10:23:48 | * | yglukhov quit (Read error: Connection reset by peer) |
10:23:55 | Araq | I use os.`/` much more often than devide… |
10:24:02 | FromGitter | <alehander42> the php people use `\` for namespaces indeed, that could work |
10:24:37 | * | yglukhov joined #nim |
10:24:40 | FromGitter | <alehander42> you use os.`/` when the args are strings/paths |
10:24:58 | FromGitter | <alehander42> but the problem is more complicated |
10:25:01 | Araq | yeah my code usually uses paths more often than divisions |
10:25:12 | FromGitter | <alehander42> jsffi also needs to overload `.=` and `.()` |
10:25:39 | Araq | which is why tying operators to math is academic. |
10:26:09 | Araq | well jsffi can use a macro once my 'semityped' macros are a thing |
10:26:37 | FromGitter | <alehander42> :D do you have an example semityped macro somewhere |
10:26:56 | Araq | I've been wanting to write an RFC for quite some time now |
10:28:33 | FromGitter | <alehander42> still, I can hardly find enough benefit in that, the manual should just outline the dangers of overloading `.` and to motivate people to wrap /convert most of their js "dynamic" code/values to typed stuff |
10:30:04 | FromGitter | <alehander42> even if you use a macro `.` you can easily cast it in the wrong way and overally all that casting/conversion should be centered in as few places as possible |
10:30:52 | * | yglukhov quit (Read error: Connection reset by peer) |
10:31:03 | FromGitter | <alehander42> maybe if the js `.` wasn't existing until now, adding a diff operator would be great, but I am afraid this can break a lot of code |
10:31:33 | Araq | well there will be a deprecation period |
10:32:01 | * | yglukhov joined #nim |
10:32:50 | Araq | but Nim in a nutshell is/should be "simple core for systems programming" + "macro system". |
10:33:43 | dom96 | Araq: Why does jsffi need semityped? |
10:33:45 | FromGitter | <alehander42> obvsly + "type safety" :D |
10:34:35 | Araq | dom96: it doesn't but 'semityped' allows overloading of '.' within a macro implementation. unfortunately, but unavoidably. |
10:34:58 | Araq | it would be like |
10:35:24 | Araq | proc foo() {.jsdots.} = j.foo.bar |
10:36:17 | FromGitter | <mratsim> I’m all for removing ‘.’ overloading, but remember the poor guys remoting and only having “vi” without nimsuggest hints (i.e. remoting in a raspberry Pi or a server) |
10:36:39 | FromGitter | <mratsim> we can’t always rely on a “modern editor" |
10:36:58 | FromGitter | <mratsim> especially when those always come with 200MB of chrome dependencies ... |
10:37:07 | dom96 | yep |
10:37:09 | Araq | that's a different problem, but yes, I remember these poor souls. |
10:38:14 | dom96 | Araq: Isn't it just a case of rewriting the expression? |
10:38:43 | dom96 | jsffi(j): j.foo.bar -> j["foo"]["bar"] |
10:39:23 | Araq | dom96: sure. depending on how we do it. |
10:39:32 | Araq | but it's a good point, it doesn't even need semityped. |
10:40:19 | Araq | jsffi(j.foo.bar.()) |
10:40:25 | Araq | jsffi(j.foo.bar()) |
10:50:33 | FromGitter | <zacharycarter> https://www.youtube.com/watch?v=_ahvzDzKdB0 - interesting talk |
10:56:00 | * | arecaceae quit (Remote host closed the connection) |
10:56:23 | * | arecaceae joined #nim |
11:06:14 | * | Torro joined #nim |
11:17:51 | dom96 | Thanks for the invite niv :D |
11:17:53 | * | BitPuffin joined #nim |
11:19:32 | FromGitter | <Bennyelg> @dom96 whats wrong with the hierarchy of the project ? looks like nimble not recognise my new version ⏎ https://github.com/Bennyelg/nimPresto |
11:20:23 | dom96 | Bennyelg: nimble will download the latest tagged version by default |
11:20:25 | dom96 | not HEAD |
11:20:44 | FromGitter | <Bennyelg> but my tag refered to the master which is updated |
11:20:44 | dom96 | if you want to install HEAD then use `nimble install db_presto@#head` |
11:20:46 | FromGitter | <Bennyelg> but still |
11:20:55 | FromGitter | <Bennyelg> version 1.0.0 is downloaded somehow |
11:21:05 | * | Vladar quit (Ping timeout: 240 seconds) |
11:21:31 | FromGitter | <Bennyelg> I refreshed my tag |
11:21:34 | FromGitter | <Bennyelg> now its working |
11:21:37 | FromGitter | <Bennyelg> thanks. |
11:22:06 | dom96 | Here is a handy command for you: nimble search --ver db_presto |
11:22:35 | FromGitter | <Bennyelg> Fantastic, thanks. |
11:23:39 | * | Vladar joined #nim |
11:23:56 | couven92 | Shouldn't Nim also look for nim.cfg in %ALLUSERSPROFILE% (i.e. C:\ProgramData) which basically is C:\Users\username\AppData\Roaming for all users on Windows? |
11:24:03 | couven92 | I'd say yes! :P |
11:24:56 | couven92 | It would be like having nim.cfg in /etc/nim.cfg on Linux... |
11:25:09 | niv | dom96: araq told me to |
11:26:19 | dom96 | great :) |
11:27:21 | couven92 | The benefit would be that it would present a machine-wide Nim configuration location that is not overwritten by a Nim install... My easy Nim install procedure on Windows is: Delete C:\Program Files\Nim download binaries from nim-lang.org and unzip into C:\Program Files and then rename nim-<version> to Nim |
11:28:04 | couven92 | Point is: The download from nim-lang.org contains the default nim.cfg, and I do not want to change that every time with a new install... |
11:29:59 | couven92 | On Windows other programs (e.g. Git, Java JRE, Docker, ...) also place their machine-wide configuration into C:\ProgramData (if they do not use the registry) |
11:30:40 | dom96 | couven92: sounds good to me |
11:31:20 | couven92 | PR it is then... :P |
11:32:43 | dom96 | Araq: https://www.youtube.com/watch?v=_ahvzDzKdB0 |
11:34:15 | dom96 | couven92: Note: Araq might disagree |
11:35:37 | couven92 | dom96, nah! Maybe he'll just be happy to get one of my crazy no-one-ever-uses-this PRs again! :P |
11:35:54 | couven92 | it's been a while... :O |
11:38:15 | Araq | dom96: already know it |
11:39:09 | dom96 | Araq: Oh good, cause I got bored of it much quicker than I thought I would |
11:44:21 | Araq | it's the old "I invented Java and regret it's not a lisp" point |
11:50:08 | Araq | couven92: use a nim.cfg in your $HOME ? |
11:51:47 | couven92 | Araq, not machine-wide and I definitely do not want to redploy a magic nim.cfg for every new user! |
11:53:30 | Araq | huh? |
11:56:21 | Araq | mratsim: tried the for-loop macros? |
11:57:05 | * | dddddd_ joined #nim |
11:57:16 | FromGitter | <arnetheduck> http://www.informit.com/articles/article.aspx?p=2425867 |
11:58:10 | * | dddddd_ is now known as dddddd |
12:07:20 | * | Vladar quit (Remote host closed the connection) |
12:07:41 | * | Vladar joined #nim |
12:15:36 | Araq | "Looking back at my top 10 list, more than half of these annoyances are a direct result of including a feature primarily because it would be familiar to users of other languages." |
12:16:07 | Araq | Copying bad design is not good design. |
12:16:32 | FromGitter | <mratsim> @Araq not yet |
12:17:49 | Araq | come on, an arraymancer that works with an officially released Nim version is boring. |
12:23:53 | niv | question: is there a way to have "do" block syntax on a proc work for both with and without return type? |
12:24:29 | niv | example: proc whatever[T](cb: proc(): T). i can do "discard whatever() do -> int: ...", but i cannot do "whatever() do:" [assuming void] |
12:24:50 | niv | basically, i want a generic proc that works for both void and return types |
12:26:12 | FromGitter | <tim-st> I already asked this two times but it's still not clear: if I have two procs that are exactly the same but on one the param is declared `static`eg. `mult(x,y: int):int` and `mult(x,y: static[int]): int` is it necessary to overload it if I call it sometimes with static values? or does the compiler "sees" it? My example in release mode generated binaries that differ in only one byte |
12:29:44 | FromGitter | <tim-st> (regarding performance) |
12:29:45 | FromDiscord | <treeform> Araq, familiarity could be important, main reason I chose nim is that I wanted python but better. |
12:30:08 | Araq | sorry you got the best PL out there instead. |
12:30:46 | Araq | ;-) |
12:31:12 | Araq | nah, I'm not serious. but we're getting there, slowly but steadily. |
12:31:19 | FromDiscord | <treeform> 😃 |
12:32:10 | Araq | tim-st: static[T] is supposed to match better than T |
12:32:34 | FromGitter | <tim-st> ok, so it's not a performance optimization? |
12:32:36 | Araq | if you only sometimes provide static values, don't bother and look at the produced asm. |
12:32:48 | FromGitter | <tim-st> ok, thanks for the answer! |
12:33:18 | FromGitter | <tim-st> I thought it's because of performance, for example bool flags could be completely removed in loops |
12:33:34 | FromGitter | <tim-st> when static |
12:33:48 | FromGitter | <tim-st> strutils often doesnt use static bool flags |
12:33:55 | Araq | yeah but optimizers have a specialization pass |
12:34:09 | Araq | always look at the produced machine code |
12:34:20 | FromGitter | <tim-st> ok, thanks! |
12:35:03 | * | Torro left #nim ("-bye") |
12:36:09 | Araq | niv: write whatever() do -> void: ? |
12:37:04 | FromGitter | <krux02> dom96: that talk is quite interesting, even though his definition of a cathedral is wrong. |
12:39:05 | FromGitter | <krux02> he basically explains how important operator overloading and metaprogramming is. |
12:39:11 | FromGitter | <krux02> And I totally agree. |
12:40:17 | FromGitter | <krux02> if he would have had more saying, Java might have been a better language today. |
12:44:09 | * | Lord_Nightmare quit (Ping timeout: 264 seconds) |
12:45:05 | niv | Araq: sorry, can't figure it out: https://gist.github.com/niv/d6807322d4296ccc4cde3d9758771280 |
12:45:17 | * | krux02 joined #nim |
12:48:37 | * | Lord_Nightmare joined #nim |
12:56:01 | FromGitter | <krux02> well the problem is that void is not a real type |
12:56:38 | FromGitter | <krux02> your interface wants you to return someting of type T, but void is a fake type that says, hey I am not a type |
12:56:52 | FromGitter | <krux02> so just return an int |
13:01:50 | niv | yeah, that's what im doing. but the syntax is more fugly than it needs to be, imo. |
13:05:01 | FromGitter | <allochi_twitter> Hi guys, I have a question about strange behaviour with `awaitAny()`, on my MacBook Pro i7, I never pass 4 results and then my code just freeze, I tried to read docs and `awaitAny()` source code to see if I’m missing something, but I reached a dead end. any insights? Thanks! |
13:06:23 | FromGitter | <krux02> @allochi_twitter what do you mean you never pass 4 results? |
13:07:13 | FromGitter | <krux02> I never used `awaitAny()` so I can't give you specific help, but I would try to dubug it with gdb and break into the application and see, where it hangs |
13:07:39 | FromGitter | <krux02> fyi: if you want to use gdb, you need the compiler flag --debugger:native |
13:08:13 | FromGitter | <allochi_twitter> If I spawn 4 or less procs, it’s fine I get the results back, and the code terminate, but if I add one extra and pass 5 tasks I 4 results and then the code freezes. |
13:09:05 | FromGitter | <allochi_twitter> thanks I will try this, I’m trying to understand threading in Nim, so far so good except at this point XD |
13:10:02 | FromGitter | <allochi_twitter> @krux02 could I paste my sample code here and you try it out? maybe its an OS or machine problem. |
13:10:55 | FromGitter | <krux02> I can try, but it should be single file |
13:11:14 | FromGitter | <krux02> use ix.io or github gist for code pastings |
13:11:27 | FromGitter | <allochi_twitter> Ok, will do |
13:11:30 | FromGitter | <allochi_twitter> thanks |
13:12:18 | euantor | or use play.nim-lang.org |
13:13:19 | FromGitter | <allochi_twitter> Ok, trying play.nim-lang.org first, thanks! |
13:13:24 | FromGitter | <krux02> well I prefer to run it locally |
13:14:06 | Araq | well it's a thread pool. |
13:14:23 | Araq | if you block all of its thread it's not gonna create more |
13:14:39 | FromGitter | <allochi_twitter> Yep, the Araq is here!!! WOOOWWW!!! |
13:15:10 | FromGitter | <krux02> Praise the Araq |
13:15:24 | Araq | hey. thanks! :-) |
13:15:27 | FromGitter | <allochi_twitter> Haha! |
13:15:32 | FromGitter | <allochi_twitter> https://gist.github.com/allochi/b8450b6e0599c15ff0b455ccec1f09a7 |
13:15:41 | FromGitter | <allochi_twitter> this is my code |
13:16:03 | FromGitter | <krux02> what does the `^` operator do? |
13:16:29 | FromGitter | <allochi_twitter> return the result of the FlowVar |
13:17:04 | FromGitter | <allochi_twitter> maybe I’m not using the right terminology here :) |
13:17:21 | FromGitter | <krux02> well it works |
13:17:39 | FromGitter | <krux02> no problem to run it at all |
13:17:43 | FromGitter | <allochi_twitter> AHA!, this is good news, not for me, but good news |
13:18:07 | FromGitter | <allochi_twitter> so you get an array with 5 elements and the code terminate properly |
13:18:10 | FromGitter | <allochi_twitter> ? |
13:18:27 | FromGitter | <krux02> yes |
13:18:37 | FromGitter | <krux02> http://ix.io/17Vj |
13:19:03 | FromGitter | <allochi_twitter> I may try to install Nim on a linux machine and try out the code then, since it’s not working on my MacBook and I have been trying this for like a month now. |
13:19:22 | FromGitter | <allochi_twitter> this is great man, thanks a lot! |
13:19:45 | Yardanico | did you try choosenim? |
13:20:25 | FromGitter | <krux02> I am on the devel branch and I compile from the git repository. |
13:20:30 | FromGitter | <allochi_twitter> Now I need to figure out why it’s not working on the Mac, any thought? |
13:20:58 | FromGitter | <allochi_twitter> are you using a Mac? |
13:21:29 | FromGitter | <allochi_twitter> nope, you are not :D |
13:21:37 | FromGitter | <krux02> well when I was a child I played frogger on the old discarded Apple ][ of my father. |
13:21:46 | PMunch | Is there a simple example of Nim GC control? |
13:21:47 | FromGitter | <krux02> but not recently |
13:22:01 | FromGitter | <allochi_twitter> Yeah, I think I’m old enough to be the age of you dad too ;) |
13:22:06 | Yardanico | allochi_twitter: as I said, did you try choosenim? :) |
13:22:25 | FromGitter | <krux02> my dad is over 70 |
13:22:28 | FromGitter | <allochi_twitter> Nope, but I will try it out, sorry for not getting back to you |
13:22:41 | FromGitter | <allochi_twitter> Ok, no then, I’m 44 |
13:22:51 | FromGitter | <krux02> I am 30 |
13:23:03 | FromGitter | <allochi_twitter> you look younger on your avatar XD |
13:23:16 | FromGitter | <krux02> thanks |
13:23:33 | FromGitter | <allochi_twitter> Anyway, I will try choosenim, hopefully it’s something resolved in the dev branch |
13:23:37 | FromGitter | <krux02> but that pitcuture is also not the newest |
13:23:41 | FromGitter | <krux02> I think 4 yers old |
13:23:59 | FromGitter | <allochi_twitter> well, this is why I said so, since you look 20ish in it |
13:24:10 | Yardanico | allochi_twitter: you can always try to install Nim using instructions from readme in github repo |
13:24:26 | Yardanico | but choosenim helps you to automate all that stuff :) |
13:24:28 | FromGitter | <krux02> I am from 1987, the year that introduced a lot of great game series |
13:25:26 | FromGitter | <allochi_twitter> Ok, I don’t know how to reply directly to Yardanico in Gitter, but I’m looking now into Choosenim |
13:25:50 | Yardanico | You just need to write my nickname, most IRC clients automatically highlight your nickname |
13:26:00 | Yardanico | and you did highlight me in your previous message :) |
13:26:12 | FromGitter | <data-man> @PMunch: tests/gc ? |
13:26:42 | FromGitter | <allochi_twitter> @Yardanico, cool thanks :) |
13:27:05 | FromGitter | <narimiran> @allochi_twitter finally i'm not the oldest here :) |
13:27:49 | FromGitter | <allochi_twitter> @narimiran don’t worry I’m ok to be everybody’s grandpa XD |
13:27:56 | FromGitter | <allochi_twitter> I’m the oldest here |
13:28:18 | FromGitter | <krux02> 1987 the year that gave us: Turrican, Mega Man, Zelda (outside japan), Great Giana Sisters, Castlevania, Metal Gear, Dungeon Master, and me |
13:28:59 | FromGitter | <krux02> @narimiran how old are you? |
13:29:15 | FromGitter | <data-man> I’m 45 and 9 months :-D |
13:29:27 | FromGitter | <allochi_twitter> Man, I just want to go back home today ruins someones day with Dota |
13:29:44 | FromGitter | <krux02> interesting, I thought that new programming languages would be more for young people |
13:29:49 | FromGitter | <allochi_twitter> @data-man you win, you are our grandpa now |
13:29:53 | FromGitter | <narimiran> (soon to be) 32 :) not that much older than you, but last time there was age-discussion here, most of the guys were in 17-25 range |
13:30:52 | FromGitter | <allochi_twitter> I had my eye on Nim since early stage, but then got involved in Go for the passed 5-6 years, now I fall in love with Nim |
13:30:56 | FromGitter | <allochi_twitter> so no, Nim is for everybody |
13:31:19 | FromGitter | <krux02> I also had my share of Go. |
13:31:25 | FromGitter | <narimiran> > interesting, I thought that new programming languages would be more for young people ⏎ ⏎ we're still young!!! right? right? |
13:31:32 | FromGitter | <krux02> I like that language, too, but by far not everything. |
13:31:49 | FromGitter | <allochi_twitter> @narimiran you are young, youth is in the heart |
13:31:55 | FromGitter | <krux02> I would even say Go is the best introductory language for beginner programmers right now on the market. |
13:32:16 | FromGitter | <krux02> we are all as old as we feel we are :P |
13:32:22 | FromGitter | <allochi_twitter> I actually don’t like Go anymore, and I build production systems in it |
13:32:59 | FromGitter | <allochi_twitter> the way that Go is Designed is, we wait for the problem to fade way instead of addressing it |
13:33:07 | FromGitter | <krux02> @allochi_twitter I don't like Go anymore either, but that doesn't change my opinion about it as an introductory language. |
13:34:20 | FromGitter | <allochi_twitter> I think Nim can also do that, I find that Nim users need to be more active on documentation and tutorials, I would be doing some when I feel comfertable with the language, although I do have production scripts written in Nim now |
13:34:30 | shashlick | ya I too feel old in this gang and i'm 39 |
13:35:03 | FromGitter | <krux02> a majority of people stick to the language they learn first. And I am ok when that language is Go. It's not a terrible language. At least it is much better than Java, and still has this minimal core to it. |
13:35:13 | subsetpark | older is better, folks |
13:35:16 | FromGitter | <krux02> is there anybody under 30 here? |
13:35:23 | FromGitter | <allochi_twitter> Hey think about it this way, if you consider your age run by a thread pool, with 4 threads, then you are about 10 years old |
13:35:56 | FromGitter | <allochi_twitter> I’m 17 in soul |
13:36:10 | FromGitter | <krux02> I am 3 years old on my ass |
13:36:18 | FromGitter | <allochi_twitter> XD |
13:36:59 | * | PMunch quit (Quit: Leaving) |
13:37:25 | FromGitter | <alehander42> I am 16 actually |
13:37:36 | FromGitter | <krux02> interesting |
13:37:40 | FromGitter | <krux02> that is young |
13:38:15 | FromGitter | <krux02> When I was 16 I learned to program Blitz Basic. |
13:38:17 | FromGitter | <allochi_twitter> you should not be here among the old one XD |
13:38:18 | FromGitter | <alehander42> never trust random people on the internet @krux02 |
13:38:22 | FromGitter | <allochi_twitter> Kidding ;) |
13:38:22 | FromGitter | <alehander42> I am 25 |
13:38:26 | FromGitter | <krux02> And I was productive in it, I made playable games. |
13:38:53 | FromGitter | <allochi_twitter> productive in what? Go? |
13:38:56 | FromGitter | <krux02> :/ |
13:39:06 | FromGitter | <krux02> productive in Blitz Basic |
13:39:19 | FromGitter | <allochi_twitter> oh |
13:39:56 | FromGitter | <alehander42> when I was 16 I didn't even know I'll become a programmer, and I think I didn't have internet |
13:40:23 | FromGitter | <allochi_twitter> for be it was 12, I used to write code on paper |
13:40:28 | FromGitter | <allochi_twitter> I didn’t have a computer |
13:40:43 | FromGitter | <allochi_twitter> until 17 |
13:42:33 | shashlick | I was neck deep in the demoscene when I was 16 |
13:42:42 | shashlick | but didn't code back then |
13:42:58 | FromGitter | <krux02> https://www.blitzforum.de/forum/viewtopic.php?t=9865&highlight= |
13:43:12 | shashlick | well maybe some basic and x86 assembly in school |
13:43:24 | FromGitter | <krux02> my game, source only |
13:43:29 | FromGitter | <krux02> no resources required |
13:43:37 | FromGitter | <krux02> everything wtih the draw line tool |
13:44:03 | FromGitter | <krux02> I love it, because it is minimal, and if you have blitz basic somewhere you could just copy paste the code to run it. |
13:44:42 | FromGitter | <krux02> the bad thing, blitz basic is windows only |
13:44:48 | FromGitter | <krux02> and I am now on Linux only |
13:45:13 | FromGitter | <krux02> hel people my recommendation, swich to linux as early as possible, so that this is not that much of a problem |
13:46:10 | FromGitter | <allochi_twitter> Hmm, a Linux advocate :) |
13:47:09 | FromGitter | <narimiran> i switched only recently, and i'm now disappointed that i didn't do that earlier.... |
13:48:37 | FromGitter | <krux02> In the past I thought windows was bad, now I think it is even toxic to have it. |
13:49:25 | FromGitter | <krux02> I honestly think that companies that deal with customer data, should not be allowed to use this data on Windows systems, because it cannot be guranteed that this data is not secretly sent to Microsoft. |
13:50:17 | FromGitter | <krux02> Well year windows has these hidden options to disable sending data, but yea I know how these things work. There is an update and secretly those switches are reset and you think you are safe but you are not. |
13:50:30 | FromGitter | <allochi_twitter> Windows we agree on, but come on OSX with it’s proprietary software system. |
13:50:46 | FromGitter | <krux02> And then there is this problem that it has integrated advertisement in the start menu. When I first saw that, I was honestly "WTF" |
13:51:12 | FromGitter | <allochi_twitter> I though Ubuntu wanted to do the same thing too |
13:51:29 | FromGitter | <allochi_twitter> didn’t they? |
13:51:34 | FromGitter | <krux02> I can't judge that much on OSX, I never used it longer than a few minutes and instantly just wanted go back to linux. |
13:51:57 | FromGitter | <krux02> well yea. But before that I left ubuntu already for other reasons. |
13:52:37 | FromGitter | <allochi_twitter> let’s be reasonable, people who write software need to pay the rent |
13:53:01 | FromGitter | <allochi_twitter> and we have the right to choose what is acceptable to us for them to pay the rent |
13:53:09 | FromGitter | <allochi_twitter> if this makes sense :) |
13:54:15 | * | couven92 quit (Quit: Client disconnecting) |
13:55:01 | FromGitter | <data-man> Linux for programmers, Windows for users :) |
13:55:16 | FromGitter | <allochi_twitter> Maybe NimOS! |
13:55:47 | FromGitter | <allochi_twitter> Come on Araq, NimOS this month :) |
13:56:15 | FromGitter | <krux02> I started with Suse. Horrible gpu support. constantly destroyed my x server config and I hand to fix it from a tty terminal. then kubuntu, because it promised an easier way to install proprietary gpu drivers. at some point ubuntu fucked up that system and replaced it with an inferior system. and kde3 was replaced by kde4 which did not work on my computer, it was just too slow. Then I switch to ubuntu with gnome. And then |
13:56:15 | FromGitter | ... gnome3 came and ubuntu also made their own DE. All horrible, I thought Xubuntu was my last resort. But the lack of updates on LTS versions of ubuntu and the constant destruction of the system on system upgrades made me just want to leave the ubuntu ship. I tested out arch. Much frustration in the installation pro ... [https://gitter.im/nim-lang/Nim?at=5ad4ab7f1130fe3d36e1d4a1] |
13:56:24 | FromGitter | <krux02> this forced on DE switching, I hate it. |
13:56:59 | FromGitter | <krux02> Linux for programmers, Windows for victims |
13:57:13 | FromGitter | <allochi_twitter> I use Debian on the server side, OSX as a desktop |
13:57:47 | FromGitter | <krux02> well when you have to use Linux anyway, you can simlify your life when you also use Linux as a desktop |
13:58:08 | FromGitter | <krux02> well year you can't use Adobe products. But they are a ripoff anyway. |
13:58:18 | FromGitter | <allochi_twitter> not really, I tried, software is not stable |
13:58:26 | FromGitter | <allochi_twitter> not the OS, the software |
13:58:38 | FromGitter | <krux02> what software does hook you to OSX? |
13:58:45 | FromGitter | <allochi_twitter> Chrome |
13:58:48 | FromGitter | <allochi_twitter> XD |
13:58:52 | FromGitter | <krux02> really? |
13:58:55 | FromGitter | <data-man> Win-users don't understand that they are victims |
13:59:07 | FromGitter | <krux02> I am on chromium here on this system. |
13:59:12 | FromGitter | <allochi_twitter> Kidding, I have a lot, beside I need to compile also for iOS |
13:59:17 | FromGitter | <krux02> chromium is by the way the superior version of chrome. |
13:59:21 | FromGitter | <allochi_twitter> and graphical packages |
13:59:50 | FromGitter | <krux02> it is chrome minus the harmful parts. |
13:59:59 | FromGitter | <krux02> what graphical packages? |
14:00:04 | FromGitter | <allochi_twitter> So let’s talk Nim, what are you doing with Nim? Any planned games? |
14:00:41 | FromGitter | <allochi_twitter> Oh, I have software that I need to use on OSX, some of them for work, and they are not available on Linux. |
14:01:17 | FromGitter | <krux02> well I am currently writing my master theses (yes I am an almost eteral student) about embedding shader programming in the outer environment |
14:01:35 | FromGitter | <allochi_twitter> And I’m not going to relearn how to do things on other software, so I just enjoy my ride, hopfully the younger generation will be full Linux powered ;) |
14:01:39 | FromGitter | <krux02> so I am until september locked to not write a game, but improve just the tooling about it. |
14:02:22 | FromGitter | <allochi_twitter> so what games you wrote, because I’m starting something in that direction. |
14:02:34 | FromGitter | <allochi_twitter> this was a question, what games you wrote? |
14:02:41 | FromGitter | <allochi_twitter> I would love to see a sample |
14:02:49 | FromGitter | <krux02> @allochi_twitter well the young generation will learn from the old generation and ask for advice. and when the old generation all can't give advice on Linux, or doesn't improve the way to actually use Linux, it is also fault of the old generation that the young generation still uses Windows. |
14:03:11 | FromGitter | <krux02> well I wrote tetris |
14:03:14 | FromGitter | <allochi_twitter> Haha, I agree |
14:03:15 | FromGitter | <krux02> no commercial games |
14:03:22 | FromGitter | <allochi_twitter> in Go? Nim? |
14:03:30 | FromGitter | <allochi_twitter> Basic? |
14:03:33 | FromGitter | <krux02> In Nim |
14:03:49 | FromGitter | <allochi_twitter> Cool, could you share it with me? Like is it on a GitHub? |
14:04:04 | FromGitter | <krux02> https://github.com/krux02/opengl-sandbox/blob/master/examples/tetris.nim |
14:04:45 | FromGitter | <allochi_twitter> This is great! thanks a lot, I will have a look at it as part of learning Nim |
14:04:48 | FromGitter | <allochi_twitter> Thanks! |
14:05:35 | FromGitter | <krux02> just look at the part "Render Code" |
14:05:44 | FromGitter | <krux02> all the rendering logic is tied together |
14:06:07 | FromGitter | <krux02> first I gather all data that is important for rendering, for examples which objects need to be rendered at what position |
14:06:38 | FromGitter | <krux02> and then I just render it all. |
14:06:46 | FromGitter | <krux02> the problem is that it doesn't run on OSX |
14:08:43 | FromDiscord | <treeform> Made some progress on font rendering in pure nim, wanted to share: |
14:08:45 | FromDiscord | <treeform> |
14:08:45 | FromDiscord | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/435441420434669593/unknown.png |
14:10:13 | FromGitter | <krux02> @allochi_twitter https://www.g-truc.net/doc/OpenGL%204%20Hardware%20Matrix.pdf this is the reason it doesn't work on OSX |
14:10:38 | FromGitter | <allochi_twitter> Oh, OpenGL stuff |
14:11:04 | FromGitter | <krux02> just look at that document and see yourself how well OpenGL works on OSX |
14:11:53 | FromGitter | <allochi_twitter> Noooooo! |
14:12:37 | FromGitter | <allochi_twitter> So use OpenGL 4? |
14:13:26 | FromGitter | <krux02> well I use a few OpenGL 4 features, not very complicated ones. Like direct state access that makes the development much smoother |
14:13:50 | FromGitter | <krux02> but that breaks MacOS compatibility already |
14:14:11 | FromGitter | <krux02> and just look at when opengl 4.1 (latest supported opengl version on mac) was released |
14:14:28 | FromGitter | <allochi_twitter> Ok, I see |
14:14:38 | Araq | if only there were an OS with an alternative to OpenGL, widely used for gaming |
14:15:02 | Araq | where can deploy executables easily and they don't break after an OS upgrade |
14:15:07 | FromGitter | <allochi_twitter> Like NimOS? |
14:15:20 | Araq | enabling something like a video game industry |
14:15:40 | FromGitter | <allochi_twitter> Come on, we already established the fact that windows is evil |
14:15:54 | FromGitter | <krux02> Araq: well I hope WebAssembly will help to improve backwards compatibility by a lot. |
14:16:30 | FromGitter | <krux02> when the majority of applications is in WebAssembly, then people can easily switch the OS without loosing any of their software |
14:16:34 | Araq | where the OS is so good it does *not* come out of the box with outdated versions of 5 half assed scripting/dynamic languages |
14:16:37 | FromGitter | <allochi_twitter> whtat about the new thing, Volcan? |
14:16:42 | FromGitter | <krux02> they can even change the CPU |
14:16:47 | FromGitter | <krux02> Vulkan |
14:16:54 | Araq | with good support for GPU programming. |
14:16:59 | FromGitter | <allochi_twitter> Vulkan, yah |
14:17:21 | Araq | and even an Unix environment for those who need it. |
14:17:25 | FromGitter | <krux02> Vulkan is just the continuation of OpenGl with broken backwards compatiblility |
14:18:15 | FromGitter | <krux02> well at the moment for webassembly you need a 10 GB development toolchain, and it doesn't even support threads. It is still young. |
14:18:21 | FromGitter | <krux02> but I think it is a great thing |
14:18:21 | FromGitter | <allochi_twitter> Come on man, we can’t win with you XD |
14:18:43 | planetis[m] | hey sup, how do I fix the ```cannot export: "dir" / module``` Error? |
14:19:35 | FromGitter | <krux02> the idea behind the opengl versions is that for each new major version you need now hardware |
14:19:51 | planetis[m] | I have an example if you want to take a look |
14:19:52 | FromGitter | <allochi_twitter> Ok, I have a meeting, but it was nice chatting with you guys, I will check in again when done. |
14:20:06 | planetis[m] | https://github.com/notTito/morpheus |
14:20:17 | FromGitter | <krux02> opengl 2 gives you shaders, so you need shader hardware, opengl3 gives you geometry shaders, so you need new hardware for that, and opengl4 gives you compute shaders I think. |
14:20:44 | FromGitter | <krux02> but you won't any hardware change for opengl4.1 to opengl4.6 it is purely a driver thing. |
14:21:15 | FromGitter | <krux02> And I really hope that we won't need any backwards compatibility breaking hardware in the near future. |
14:21:30 | FromGitter | <tim-st> is there an other keyword in nim beside `defer` that directly assumes a `:` ? |
14:22:03 | FromGitter | <krux02> else |
14:22:51 | FromGitter | <tim-st> ok, but I think it's a bit strange having a `:` behind `defer` but dont have one behind `assert`. I think it would be better to have defer without `:` |
14:25:10 | FromGitter | <tim-st> also discard `name` works without `:` |
14:25:32 | FromGitter | <tim-st> and import and so on |
14:26:33 | Araq | after a colon a list of statements follow. (or a type description) |
14:27:06 | Araq | 'assert' does not take a list of statements. the end. |
14:27:42 | FromGitter | <tim-st> ok |
14:28:57 | Araq | planetis[m]: export modulename maybe. |
14:29:57 | FromGitter | <krux02> Araq: maybe it would be a good idea to allow functions with a single argument have a stmtList as argument |
14:30:15 | planetis[m] | hey Araq, thanks I will try that |
14:30:45 | FromGitter | <krux02> sorry, I just realized it works that way |
14:30:48 | FromGitter | <krux02> did not expect that |
14:30:50 | planetis[m] | great |
14:31:36 | FromGitter | <krux02> this just compiles, I like it: http://ix.io/17VK |
14:32:30 | FromGitter | <krux02> is it in the documentation that the last argument of a call can always be written as a code block that evaluatios to the last argument? |
14:32:47 | FromGitter | <krux02> (last statement/expression) |
14:35:21 | Araq | probably not :-) |
14:35:31 | FromGitter | <tim-st> so assert allows both ways with `:` and without; but defer dont? |
14:36:22 | planetis[m] | can a module have the same name as a procedure? |
14:36:44 | FromGitter | <krux02> Araq: that is a very powerful feature of the language and it might better be documented. I instantly like it. |
14:37:22 | FromGitter | <tim-st> ok, I see it only allows one stmt |
14:37:29 | FromGitter | <krux02> lisp people will love it, because it is very common in lisp, too. |
14:37:55 | Araq | it's just the general "everything is an expression" thing |
14:38:12 | Araq | which we got rather late |
14:38:39 | Araq | and doesn't really work well with the indentation based syntax, but I love indentation based syntax too much to do anything about it |
14:38:40 | FromGitter | <krux02> @tim-st: dever is processed by the parser as a keyworld, and sadly it is not just a `template` in system that is implemented with a magic. |
14:39:16 | FromGitter | <tim-st> ok, thanks |
14:39:30 | FromGitter | <krux02> Araq: Will I don't like indentation based syntax, but I can live with it when the rest of the language is so great as in Nim. |
14:39:54 | FromGitter | <krux02> s/Will/Well |
14:41:04 | subsetpark | I was definitely thrown by defer: as well - given how block syntax works for so many other macros and keywords, I was typing defer:\n\tdoThing() and very confused when it wasn't working :/ |
14:41:15 | subsetpark | Because it's not a syntax error |
14:42:42 | FromGitter | <krux02> Araq: I think I mentioned it before, but it comes up before, `defer` as a keyword should disappear from the language, it should be just a magic proc/template in system.nim. |
14:43:25 | Araq | I tried, did not work well. I would rather remove 'defer' again. |
14:43:45 | FromGitter | <krux02> but what instead of defer? |
14:44:46 | Araq | try finally, destructors |
14:45:05 | FromGitter | <krux02> I don't like try finally at all. |
14:45:11 | FromGitter | <krux02> I think is is very ugly |
14:46:23 | Araq | I think 'defer' is much uglier. |
14:46:47 | Araq | the important thing is what is 'tried' and 'defer' doesn't even mention that |
14:46:58 | FromGitter | <krux02> just for example when you have three initalizations in a row that all might fail. Writing a try finally for all of them that covers all possible cases is just ugly. |
14:47:06 | subsetpark | I have to agree with Araq. If it obeyed block syntax it wouldn't be ugly, but `defer: foo()` is quite odd. |
14:48:02 | FromGitter | <krux02> what is so odd about defer: foo()? |
14:48:35 | Araq | for a start, it doesn't work as a toplevel statement. |
14:48:59 | FromGitter | <krux02> that is true. |
14:49:35 | * | yglukhov quit (Ping timeout: 256 seconds) |
14:49:38 | FromGitter | <krux02> but apart from that? |
14:50:26 | Araq | well that's it, it's not clear where the 'try' should be injected. that's enough to dislike it. |
14:51:09 | Araq | in procs it only sort-of-works because other constructs like 'if' and 'while' do not hide where they begin |
14:51:14 | FromGitter | <krux02> well I would compile: "defere: foo(), bar()" at top level to ``proc foobar(): void = foo(); bar();\n atexit(foobar)`` |
14:54:45 | subsetpark | krux02: what's so odd is that it's the only keyword i can think of that means one thing as `defer: foo()` but means something else, which is never what you meant, as `defer:\n\tfoo()` - but `defer foo()` is a syntax error |
14:56:42 | FromGitter | <krux02> defer:\n\tfoo() and defer: foo() do the same thing |
14:56:47 | FromGitter | <krux02> what is so weird about it? |
15:04:57 | FromGitter | <allochi_twitter> Hi, I’m back, and I also have bad news |
15:06:24 | Araq | you're injured and couldn't join the marathon? |
15:06:36 | FromGitter | <allochi_twitter> @Araq it would be lovely if you can help, I re-installed using choosenim, and tried my previous code with both stable and devel, and they both don’t work. could you please give me a hint as what to do next? |
15:06:49 | * | miran joined #nim |
15:07:28 | FromGitter | <allochi_twitter> Nah, I don’t do Marathons, but I would love if you could help with the thread pool problem I’m having, I just don’t know what to do next. |
15:07:49 | * | nsf quit (Quit: WeeChat 2.0.1) |
15:10:56 | FromGitter | <data-man> @Araq: #5898 ready for review |
15:11:31 | FromGitter | <data-man> And #7623 :) |
15:12:48 | Araq | allochi_twitter: looking at it |
15:14:02 | FromGitter | <allochi_twitter> Thanks, I know you have a lot on your plate if you give the a direction I can try myself, also I’m trying this now on a linux machine, will check how it works. |
15:14:35 | FromGitter | <krux02> for everybody who prefers try over defer, here is a counter example: http://ix.io/17VT |
15:14:52 | FromGitter | <krux02> it's just an ugly mess with try catch |
15:14:55 | shashlick | allochi_twitter: is this the gist you shared two hours ago on await? |
15:16:09 | FromGitter | <allochi_twitter> yes |
15:18:43 | shashlick | dang - need to add threadpool => --threads:on detection in snip |
15:19:31 | FromGitter | <allochi_twitter> I have it in a .nims file |
15:20:02 | shashlick | ya, i have a snippet tester I made to run such things quickly |
15:21:24 | shashlick | https://github.com/genotrance/snip |
15:23:31 | * | max3 joined #nim |
15:25:20 | FromGitter | <allochi_twitter> I just finished installing nim on my linux server, and tested the code, it works fine there |
15:26:23 | FromGitter | <allochi_twitter> it’s an OSX problem, not sure if it’s my machine, I will test this on another OSX machine tomorrow. |
15:26:47 | FromGitter | <allochi_twitter> the good news is that I wrote a working code XD, it’s not me it’s OSX |
15:27:01 | FromGitter | <krux02> well OSX tries more and more to abandon things that also would work on Linux |
15:27:30 | FromGitter | <allochi_twitter> You had to comment on that, didn’t you XD |
15:27:45 | FromGitter | <krux02> yea I had to |
15:27:46 | FromGitter | <allochi_twitter> I’m not switching man, I’m 44 |
15:28:04 | Yardanico | so what is the problem you're having on OSX? |
15:28:22 | Yardanico | You can share install logs with us, we can help |
15:28:40 | Yardanico | but try installing with instructions from repository README if choosenim doesn't work for you :) |
15:28:48 | FromGitter | <allochi_twitter> install of nim? I just re-installed it with choosenim |
15:29:02 | Yardanico | so it works? |
15:29:02 | FromGitter | <allochi_twitter> it works |
15:29:05 | Yardanico | ah, ok |
15:29:10 | FromGitter | <allochi_twitter> choosenim yes |
15:29:23 | FromGitter | <allochi_twitter> and I installed both stable and devel |
15:29:30 | euantor | I take it the mac only has 4 logical cores @allochi_twitter? |
15:29:39 | euantor | Hoe many logical cores does the Linux server have? |
15:30:06 | FromGitter | <krux02> I have 4 logical cores, and the coded did work |
15:30:10 | FromGitter | <allochi_twitter> I don’t know let me check the activity monitor |
15:30:24 | FromGitter | <allochi_twitter> this is true also :) |
15:30:52 | FromGitter | <krux02> lscpu |
15:31:02 | FromGitter | <krux02> that is the command to list the cpu s |
15:31:13 | FromGitter | <allochi_twitter> but, what even if 4 logical cores? this is not about cores |
15:31:54 | FromGitter | <allochi_twitter> I mean when I spawn, I’m creating a process right? I can have one core, and still run a thread pool |
15:32:00 | FromGitter | <allochi_twitter> am I correct? |
15:32:13 | FromGitter | <krux02> well it was a thread pool and when the thread pool is empty it doesn't have anyth more threads |
15:32:19 | FromGitter | <allochi_twitter> of course I’m correct I’m 44 |
15:32:22 | euantor | It may be something interesting to do with the Mac's scheduler if 4 tasks works, but 5 tasks doesn't |
15:32:35 | FromGitter | <allochi_twitter> my point |
15:32:39 | FromGitter | <krux02> and maybe the threadpool initialized with the amount of logical cores on the system |
15:32:47 | euantor | the thread pool module creates threads == number of logical CPUs if I remember correctly |
15:32:51 | FromGitter | <allochi_twitter> I wish if I have the skills and time to find it myself and contribute |
15:33:26 | euantor | https://nim-lang.org/docs/threadpool.html#setMinPoolSize,range[] |
15:33:26 | FromGitter | <allochi_twitter> Intersting, give me a sec, I will test something |
15:33:46 | euantor | So by default the minimum thread pool size is 4, so it starts with 4 threads when using the pool |
15:34:25 | euantor | https://github.com/nim-lang/Nim/blob/master/lib/pure/concurrency/threadpool.nim#L399 |
15:34:41 | euantor | I haven't played with the thread pool module at all, so I'm just guessing at how it works |
15:35:43 | dom96 | yglukhov created a PR to change this IIRC |
15:35:49 | dom96 | might already be in devel? |
15:35:56 | enthus1ast | is it just me or does "net.sendTo" does not support sending to ipv6? |
15:36:27 | FromGitter | <allochi_twitter> You are correct |
15:36:42 | FromGitter | <allochi_twitter> setMinPoolSize(12) solved the problem |
15:36:49 | * | xkapastel joined #nim |
15:37:29 | FromGitter | <allochi_twitter> @euantor it is about the threadpool size |
15:37:48 | euantor | Guessed it might be :) |
15:38:21 | FromGitter | <allochi_twitter> I don’t know if @Araq is following, I hope he doesn’t waist time on this anymore, but I think it worth documenting |
15:39:13 | FromGitter | <allochi_twitter> thanks a lot @euantor |
15:39:17 | euantor | Not sure why it exhibits the behaviour you are seeing though. I'd have thought that if the pool was exhausted a new thread would be created (up to max pool size, and if max size is reached new tasks would be queued) and there wouldn't be a problem |
15:39:46 | FromGitter | <allochi_twitter> It just hang |
15:40:00 | FromGitter | <allochi_twitter> doesn’t even throw an exception or anything |
15:41:20 | FromGitter | <allochi_twitter> you know it’s still a problem, since in my case this is just a sample example for me to learn nim, but if this is a production code, and I don’t know how many task I’m going to be dealing with ahead of time, it could be a problem. |
15:42:13 | dom96 | So I'm playing around with the the Nim playground frontend code |
15:42:18 | FromGitter | <exts> Can macros make my `get` and `getSeq` into a single function? I don't remember much about macros the last time I played with nim and I don't know where to even get started. https://github.com/exts/monoworkflow/blob/master/monobuild.nim |
15:42:35 | dom96 | Either Karax doesn't offer any Reactive features or the playground doesn't use them, which is a huge shame |
15:43:16 | enthus1ast | it is reactive |
15:43:21 | FromGitter | <krux02> @exts well your question is wrong, but probably is the answer to your question yes |
15:45:43 | FromGitter | <krux02> macros transform code at compile time. So if you can describe what you want as a code transformation, then it can be implemented as a macro. |
15:46:41 | FromGitter | <exts> whats the question I should be asking |
15:49:33 | * | Trustable joined #nim |
15:50:08 | * | yglukhov joined #nim |
15:51:45 | * | couven92 joined #nim |
15:52:33 | couven92 | !eval echo 42 |
15:53:34 | NimBot | Compile failed: <no output> |
15:58:38 | Araq | allochi_twitter: the flow var completes too early and doesn't trigger the awaitAny which is issued too late |
15:58:51 | Araq | looks hard to fix. |
15:59:06 | Yardanico | couven92, umm |
15:59:09 | Araq | increasing the thread pool size is merely a workaround. concurrency is hard :-) |
15:59:11 | Yardanico | poor nim playground :( |
16:00:58 | FromGitter | <allochi_twitter> @Araq it seems to be only a problem with OSX, and even if I increase the delay it’s the same thing, I did think of this. |
16:02:05 | dom96 | couven92: playground is down |
16:02:08 | FromGitter | <allochi_twitter> Thanks for giving it the time, I will try to debug from myside, I may have to nag you about it in the future, I want to replace some Go stuff with Nim and I don’t want something like this to bite me. |
16:02:31 | * | rockcavera joined #nim |
16:02:55 | couven92 | sorry... |
16:03:02 | Araq | understandable. |
16:03:54 | FromGitter | <allochi_twitter> @Araq I can’t thank you enought for all the good work you put in Nim and the other too. |
16:08:38 | FromGitter | <data-man> @allochi_twitter : Try to compile with -d:nimPinToCpu ⏎ But I'm not sure, it's a hidden magical definition. :) |
16:12:37 | FromGitter | <exts> @krux02 can you clarify what you meant by "your question is wrong" |
16:14:11 | FromGitter | <exts> because I googled and return type overloading isn't a thing in nim, only thing I seen on this topic was this https://forum.nim-lang.org/t/3025 so I didn't ask about it. So what is the question I was supposed to be asking again? |
16:22:12 | * | SenasOzys quit (Ping timeout: 260 seconds) |
16:26:43 | * | SenasOzys joined #nim |
16:31:37 | * | nsf joined #nim |
16:36:18 | * | sendell quit (Remote host closed the connection) |
16:39:18 | * | flyx quit (Quit: ZNC - http://znc.in) |
16:46:23 | FromGitter | <exts> hmm opted for generics (kind of forgot about generics) and I don't think i'm writing nim generics correctly, but it compiles so win/win I guess https://gist.github.com/exts/eb81ea1d04a964742a85813944e1b602 |
16:49:15 | Yardanico | Araq, what is the preferred count of newlines between end of the type section and start of any other section (proc, const, etc)? |
16:50:26 | Yardanico | for stdlib |
16:53:06 | FromGitter | <krux02> @exts you should probably stick to all settings being seq[string], just some are seq of length 1 |
16:53:37 | FromGitter | <krux02> or make everything a string |
16:54:06 | FromGitter | <krux02> you approach requires the programmer to know the type of a setting before looking it up. And that is not good. |
16:54:27 | FromGitter | <exts> i was going to do that, but it doesn't accomplish what im trying to do. would be pointless to have a separate container just for an array of options |
16:54:35 | FromGitter | <exts> so this does what I want, and does it well |
16:55:49 | FromGitter | <krux02> well you can also have two settings tables |
16:56:33 | FromGitter | <krux02> ``stringSettings: Table[string,string]`` and ``seqSettings: Table[string, seq[string]]`` |
16:56:45 | FromGitter | <exts> this is true, that's why programming is awesome. you can do the same thing a million different ways |
16:56:52 | FromGitter | <krux02> in that way you don't need to cast or throw exceptions |
16:56:54 | FromGitter | <alehander42> I think the simplest would be to just have SettingsTable = Table[string, seq[string]] and save the string settings internally as seq[string] but implement the logic only in `get[seq[string]]` and make get[string] call getseq[string (settings, key)[0] |
16:57:44 | FromGitter | <krux02> @alehander42 that doesn't work exactly that way |
16:57:52 | FromGitter | <alehander42> this way you have a simple internal impl, you write the logic once and have the same api |
16:57:53 | FromGitter | <alehander42> why? |
16:58:20 | FromGitter | <krux02> well you need to know if you want to look up a string setting or a seq setting |
16:58:50 | FromGitter | <alehander42> well you do anyway |
16:59:02 | FromGitter | <alehander42> you need to know if you need stringSettings or seqSettings |
16:59:11 | FromGitter | <alehander42> that's the nature of a setting, you need to know what it is |
16:59:16 | FromGitter | <alehander42> usually you even have bools, ints etc |
16:59:36 | FromGitter | <krux02> well, long story short, if you follow that route you will realize that just putting the ``[0]`` outside of the function when looking up a string setting is the shortest and best implementation |
17:00:11 | FromGitter | <alehander42> basically yeah, but having that as getString or get[string] might be more clear |
17:00:15 | FromGitter | <krux02> and then you realize you can remove the entire getSetting fuction and just operate on the table directly |
17:00:27 | FromGitter | <krux02> @alehander42 nope |
17:00:32 | FromGitter | <alehander42> nope |
17:00:40 | FromGitter | <alehander42> if I see `[0]` i don't know if this is a string setting |
17:00:47 | FromGitter | <alehander42> or I just needed only the first one |
17:00:47 | Yardanico | Araq, also, should I remove modules which were deprecated in 0.16.0 or earlier? |
17:00:50 | * | athenot joined #nim |
17:00:50 | FromGitter | <krux02> using the table directly is more clear, because nothing is more clear than inlined code |
17:00:58 | Yardanico | like asyncio/ftpclient |
17:01:37 | FromGitter | <alehander42> well you can just write the table get function inline if nothing is more clear than inline code |
17:01:42 | FromGitter | <krux02> @alehander42 well it would be best if nim had pattern matching then it would look like this: |
17:01:42 | FromGitter | <alehander42> you need a boundary |
17:01:51 | miran | Yardanico: if you ask me (and you don't), <=0.16 (inclusive) should be removed |
17:02:01 | FromGitter | <krux02> let @[`mystrngsetting`] = getsetting("...") |
17:02:38 | Yardanico | miran, Araq already said that everything which was deprecated in 0.16.0 or earlier should be removed, but I wanted to clarify about modules :) |
17:02:54 | FromGitter | <alehander42> ok, that would be good too, but I think the "just expose a good API" thing is simpler |
17:03:16 | FromGitter | <krux02> @alehander42 what boundary, he throws an exception when the setting type doesn't match, indexing into an empty array, well throws an exception |
17:03:19 | FromGitter | <alehander42> and you would need get[stuff] anyway if you have different types |
17:03:31 | FromGitter | <krux02> sor "raise" is the keyword in nim |
17:04:34 | FromGitter | <alehander42> no, the problem is, as I said without pattern matching "let a = settings.get(.)[0]" tells me nothing: I have no idea if he just needs the first setting or it is *accidentally* a way to get the only string one |
17:04:46 | FromGitter | <alehander42> it's just bad api design |
17:05:48 | FromGitter | <alehander42> having "let a = settings.getString(name) or get(string, name)" or something is just more obvious for the reader and you can do it without perf penalty (at least the first) |
17:06:52 | FromGitter | <alehander42> and later if you change all settings and make them have some weird special containers for each type, you don't need to change the api |
17:08:47 | FromGitter | <krux02> well I wouldn't |
17:15:12 | * | r3d9u11 joined #nim |
17:16:15 | dom96 | I love that I can google "jester static dir" and get the exact syntax I need to set it :) |
17:19:04 | Yardanico | dom96, how much newlines there should be between the type section and const/var/proc or any other sections (in stdlib)? |
17:19:09 | FromGitter | <alehander42> https://stars.medv.io/nim-lang/nim |
17:19:15 | FromGitter | <alehander42> i wonder what's that bump from in th emiddle :D |
17:19:20 | dom96 | Yardanico: At least one |
17:19:57 | dom96 | alehander42: that's cool. I bet it's slashdot |
17:20:25 | FromGitter | <Varriount> Yardanico: I prefer 2 |
17:20:49 | FromGitter | <alehander42> I started using 2 lines between all top level procs and sections |
17:20:53 | * | themagician joined #nim |
17:21:37 | Yardanico | I'm just removing a lot of T-prefixed types deprecations, so previously there was <type section><newline>{.deprecated....}<newline><other sections> |
17:21:54 | Yardanico | and I'm removing deprecated section and doing <type section><newline><other sections> |
17:23:18 | dom96 | Well, add 2 |
17:23:30 | Yardanico | dom96, ok |
17:23:33 | dom96 | but 1 is enough so don't kill people if they do not use 2 :) |
17:25:10 | Yardanico | dom96, also, should I remove modules which were deprecated in 0.9-0.11? |
17:25:19 | dom96 | I'd say so |
17:26:38 | Yardanico | we can then remove `deprecated` directory altogether :D |
17:26:59 | Yardanico | (but I think it should be kept) |
17:27:17 | Yardanico | well, IDK, future.nim was deprecated but it wasn't moved into this directory.. |
17:29:23 | Yardanico | dom96, and we'll finally remove those implicit (without client) get/post procs from httpclient! |
17:31:04 | FromGitter | <data-man> @Varriount: You've found xml-library? |
17:32:06 | FromGitter | <data-man> https://github.com/aleksandar-todorovic/awesome-c#xml |
17:32:32 | * | jxy quit (Quit: leaving) |
17:35:09 | * | jxy joined #nim |
17:40:20 | FromGitter | <krux02> XML came from html which came from sml which was originally designed to structure text |
17:40:41 | FromGitter | <krux02> and it text it might be harder to see matching braces, so the end tag was a thing |
17:41:38 | FromGitter | <krux02> but when you use xml for data tables, you end up with 90 overhead for tags and stuff. it's not good for data. |
17:47:09 | FromGitter | <data-man> sml or SGML? |
17:52:16 | FromGitter | <krux02> yes might have been sgml. |
18:02:36 | * | couven92 quit (Quit: Client disconnecting) |
18:09:33 | Yardanico | Araq, should I remove deprecated stuff from system.nim (which was of course deprecated before or in 0.16.0) |
18:09:41 | Yardanico | like exceptions with E prefix |
18:14:22 | * | NoOp quit (Quit: Connection closed for inactivity) |
18:32:02 | FromGitter | <amscotti> Hi, I'm looking for a way to get an index of an item in an array. In Python I would just used `index` on a list. What would be the best way to do this in Nim? |
18:32:36 | FromGitter | <zetashift> @amscotti you coculd use find: https://nim-lang.org/docs/system.html#find,T,S |
18:32:49 | FromGitter | <zetashift> could* |
18:33:09 | FromGitter | <amscotti> Ah, nice! Thanks! |
18:33:45 | FromGitter | <krux02> @amscotti make sure to handle the -1 case, when you don't find the item |
18:34:48 | FromGitter | <amscotti> Right, will do! Thanks 👍 |
18:42:25 | * | couven92 joined #nim |
18:50:19 | FromDiscord | <geckojsc> it feels really awkward that 'nim-lang/sdl2' and 'Vladar4/sdl2_nim' both keep their modules in a directory called 'sdl2', but the inner files coincidentially have different names so they can still coexist on a single machine |
18:50:39 | * | nsf quit (Quit: WeeChat 2.0.1) |
18:50:52 | FromDiscord | <geckojsc> unless there's something more to it that I'm misunderstanding? |
18:55:01 | couven92 | why is importc not allowed in nimscript? |
18:55:12 | * | LyndsySimon joined #nim |
18:56:05 | couven92 | you could get the VM to be able to that, right? Call GetProcAddress and push the args to the stack before invoking...? |
19:00:07 | dom96 | geckojsc: yes, that's why sdl2_nim gives Nimble warnings when it's installed |
19:01:42 | jxy | you could use dlopen that way, or just use libffi, which is pretty much how other interpreters interface with shared libraries anyway |
19:02:21 | couven92 | jxy, yeah dlopen on Linux, GetProcAddress is the Windows equivalent |
19:03:13 | couven92 | basically allow dynlib for importc |
19:03:24 | couven92 | err nimscript I mean, sry |
19:11:13 | FromGitter | <exts> I hope in the future the docs will stack overloaded procs on the sidebar to make things cleaner and group those overloaded procs that are similar together for ease of finding |
19:11:43 | FromGitter | <exts> still my biggest complaint about nim since '15 |
19:18:10 | * | jxy quit (Quit: leaving) |
19:18:49 | * | jxy joined #nim |
19:21:30 | FromGitter | <mratsim> having to scroll up because the sidebar does not float is also annoying |
19:22:13 | FromGitter | <exts> I created an issue https://github.com/nim-lang/Nim/issues/7628 not sure if it's well formatted, but I put an example to make my suggestion clear |
19:23:06 | FromGitter | <exts> @mratsim I wouldn't even mind a "back to the top" button floating if that's too much |
19:24:33 | FromGitter | <zacharycarter> I'm working on the re-write of the playground - I have the whole docker in docker thing working from what I can tell |
19:24:38 | FromGitter | <exts> i think the documentation is the weakest part of nim, that's probably the biggest compliment I can give a language :P - makes sense though as nim is still an infant in the language world and documentation is hard. |
19:24:40 | FromGitter | <zacharycarter> I need to try deploying it to a VPS and see if it works |
19:25:09 | FromGitter | <mratsim> Beyond hard, people that know enough to document are probably busy building something in Nim :P |
19:25:31 | FromGitter | <exts> that and working on other stuff outside of nim, documentation is a bit tedious :P |
19:25:36 | FromGitter | <exts> but needed unfortunately |
19:26:09 | FromGitter | <exts> i think crystal has my favorite documentation/api generation atm |
19:26:16 | FromGitter | <exts> elixir's up there to |
19:26:37 | * | r3d9u11 quit (Read error: Connection reset by peer) |
19:26:47 | * | r3d9u11_ joined #nim |
19:27:24 | * | r3d9u11_ quit (Client Quit) |
19:28:22 | dom96 | exts: start adding issues suggesting how the docs could be improved :) |
19:28:36 | FromGitter | <exts> i created one above |
19:28:49 | dom96 | oh great |
19:28:58 | dom96 | Now we just need somebody that implements it :) |
19:29:37 | FromGitter | <exts> does anyone know what api generation template system this uses? <https://crystal-lang.org/api/0.24.2/> I see it everywhere nowadays |
19:29:43 | FromGitter | <exts> same template, different color |
19:30:09 | FromGitter | <exts> i like it because the sidebar doesn't move while the content still updates, makes looking at the api more enjoyable |
19:35:55 | * | yglukhov_ joined #nim |
19:36:55 | FromGitter | <exts> @mratsim that could probably solve your side menu doesn't scroll issue |
19:37:20 | * | yglukhov quit (Ping timeout: 255 seconds) |
19:40:10 | FromGitter | <zetashift> @exts doesn't look like anything I know, isn't it just markdown with some fancy CSS? |
19:40:10 | * | rokups quit (Quit: Connection closed for inactivity) |
19:48:59 | * | flyx joined #nim |
20:05:42 | * | athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:09:13 | * | Sembei joined #nim |
20:10:28 | planetis[m] | but... the anchored sidebar won't work on mobile :P |
20:22:08 | * | yglukhov_ quit (Remote host closed the connection) |
20:22:52 | * | yglukhov joined #nim |
20:27:21 | * | yglukhov quit (Ping timeout: 264 seconds) |
20:35:19 | * | miran quit (Quit: Konversation terminated!) |
20:40:38 | * | nsf joined #nim |
20:42:00 | FromGitter | <data-man> @exts: I closed your issue as duplicate #2775 |
20:44:25 | FromGitter | <Varriount> @exts I know that it doesn't always work correctly on mobile browsers. :P |
20:46:15 | * | Trustable quit (Remote host closed the connection) |
20:56:10 | * | beatmox quit (Remote host closed the connection) |
20:56:41 | * | beatmox joined #nim |
21:11:35 | dom96 | How nice of LLVM devs to add an enum value in the middle of an enum and break my wrapper :( |
21:18:28 | FromGitter | <krux02> dom96: well yea that sucks. |
21:19:08 | FromGitter | <krux02> I wish C/C++ had a better module system that would provide the entire API in a simple program readable way. |
21:20:04 | FromGitter | <krux02> Just for example OpenGL has the entire API specification in an XML document AFAIK, therefore people can just generate wrappers for any language, and wheneven there is new stuff to OpenGL added, it is just a matter of "regenerate" |
21:21:08 | dom96 | Now wishing Nim allowed a 'when' in a enum declaration |
21:22:36 | dom96 | https://github.com/nim-lang/Nim/blob/devel/tests/parser/twhen_in_enum.nim :'( |
21:32:21 | * | couven92 quit (Ping timeout: 240 seconds) |
21:33:52 | FromGitter | <exts> man that's funny, my post got deleted for duplication and the post it references has a post by me 3 years ago on my other account 😂that amuses me |
21:33:57 | * | xet7 quit (Quit: Leaving) |
21:34:01 | FromGitter | <exts> not deleted closed* excuse me |
21:34:43 | FromGitter | <exts> which also references a post by me 😄 from reddit aww man :D |
21:36:50 | * | nsf quit (Quit: WeeChat 2.0.1) |
21:38:27 | FromGitter | <mratsim> @exts did that ever happen to you: https://imgs.xkcd.com/comics/wisdom_of_the_ancients.png |
21:38:49 | FromGitter | <mratsim> Sometimes I find my own post on Nim forum, I read I look at the poster, and oh it’s me ... |
21:41:55 | FromGitter | <mratsim> Only 6 bugs away from 100 bugs on the Nim tracker! |
21:43:35 | FromGitter | <exts> let me read it lol |
21:43:51 | FromGitter | <exts> oh yeah lol |
21:44:04 | FromGitter | <exts> it reminds me of my biggest stackoverflow question i posted |
21:44:08 | FromGitter | <exts> then answered myself lol |
21:44:33 | FromGitter | <mratsim> @Araq, are https://github.com/nim-lang/Nim/issues/5053 and https://github.com/nim-lang/Nim/issues/7632 related. They sound awfully similar. |
21:45:07 | FromGitter | <exts> @mratsim i hate when I search for a problem and it's my post :( |
21:46:18 | FromGitter | <zacharycarter> I have one of those - https://social.msdn.microsoft.com/Forums/sqlserver/en-US/c2551609-5b54-46e1-a31c-05736ef9bc90/programmatically-create-a-powerpivot-data-refresh-job-in-sharepoint?forum=sqlkjpowerpointforsharepoint |
21:46:38 | FromGitter | <zacharycarter> years after I posted it I'd still get people replying and asking me questions about it |
21:46:54 | FromGitter | <zacharycarter> even though I no longer worked on .NET |
21:47:17 | FromGitter | <Varriount> I have something in a similar vein: https://forum.sublimetext.com/t/using-generators-for-fun-and-profit-utility-for-developers/14618 |
21:47:29 | FromGitter | <zacharycarter> I even had to involve MS support in the question - and they told me it couldn't be done |
21:47:49 | FromGitter | <zacharycarter> or at least they didn't have a way to do it |
21:49:02 | * | themagician quit () |
21:52:16 | * | user1101 quit (Ping timeout: 245 seconds) |
21:54:42 | * | SenasOzys quit (Ping timeout: 260 seconds) |
21:55:53 | * | Jesin joined #nim |
22:02:08 | * | SenasOzys joined #nim |
22:02:18 | FromGitter | <zacharycarter> gd - https://www.quora.com/Was-object-oriented-programming-a-failure/answer/Michael-O-Church and https://www.quora.com/Why-do-many-software-engineers-not-like-Java depress me |
22:02:56 | FromGitter | <zacharycarter> because everyone I work with seems to disregard these truths |
22:18:37 | * | rockcavera quit (Ping timeout: 260 seconds) |
22:21:19 | * | Jesin quit (Quit: Leaving) |
22:21:27 | * | Vladar quit (Quit: Leaving) |
22:32:52 | dom96 | Man do I hate HTML base URL rules |
22:34:45 | dom96 | !eval echo 42 |
22:35:06 | dom96 | zacharycarter: why is the playground down? :( |
22:35:31 | dom96 | !ping |
22:35:31 | NimBot | pong |
22:35:45 | NimBot | Compile failed: <no output> |
22:56:00 | * | rockcavera joined #nim |
22:58:50 | dom96 | We really need to get this playground onto one of the nim-lang.org VPS' |
23:05:58 | * | jjido joined #nim |
23:11:21 | FromDiscord | <jos> hey pals |
23:11:45 | FromDiscord | <jos> i'm trying to make my project multiplat |
23:11:51 | FromDiscord | <jos> there's a native C backend |
23:11:57 | FromDiscord | <jos> how can i do this elegantly with nim? |
23:12:02 | FromGitter | <zacharycarter> dom96: I don't know :/ something seems to have died with docker on the VPS |
23:12:09 | FromGitter | <zacharycarter> I'm working on a new version that's completely dockerized |
23:12:27 | FromGitter | <zacharycarter> so that as long as docker is running on the host - you should just have to launch the image w/ docker compose |
23:12:39 | FromGitter | <zacharycarter> I think I'll have it ready later this week / weekend at the latest |
23:13:27 | FromGitter | <zacharycarter> I haven't been able to get docker running again on the current VPS it's hosted on :/ I tried uninstalling and reinstalling docker but something is borked |
23:14:14 | FromGitter | <zacharycarter> sorry - I didn't mean to say VPS - I meant to say server | droplet |
23:14:38 | FromGitter | <zacharycarter> whatever the app is currently running on |
23:18:55 | * | floppydh quit (Remote host closed the connection) |
23:20:05 | * | floppydh joined #nim |
23:26:49 | * | jjido quit (Ping timeout: 265 seconds) |
23:27:35 | FromGitter | <zacharycarter> jos: use compiler arguments to change what cross compile toolchain you're using |
23:27:56 | FromGitter | <zacharycarter> https://nim-lang.org/docs/nimc.html#cross-compilation |
23:29:20 | FromDiscord | <jos> i also need to select an implementation |
23:29:35 | FromDiscord | <jos> is there a way to do that out of the box? or am i going to ifdef hell |
23:29:41 | FromGitter | <zacharycarter> you can do |
23:29:46 | FromGitter | <zacharycarter> well yeah - basically that |
23:30:07 | FromDiscord | <jos> 😃 |
23:30:18 | FromDiscord | <jos> i'd prefer to have totally separate files |
23:30:23 | FromDiscord | <jos> if that's possible |
23:30:31 | FromDiscord | <jos> a common declaration and then two separate c files |
23:30:36 | FromDiscord | <jos> without wrapping them in an ifdef |
23:31:50 | FromGitter | <zacharycarter> Not sure about that one - I've faced this issue before, but I stopped working on the project shortly after encountering it |
23:31:51 | * | krux02 quit (Remote host closed the connection) |
23:32:32 | FromGitter | <zacharycarter> I'm not sure if there's some built in functionality that allows you to do this sort of thing or what |
23:33:00 | FromGitter | <zacharycarter> a macro - which Araq prescribes for most things - doesn't seem like the right way to handle this IMO |
23:35:04 | FromGitter | <zacharycarter> well I mean a user defined one |
23:35:50 | FromGitter | <zacharycarter> I now certain existing libraries suffer from this too - so I think the best thing to do is wait for someone smarter than me to chime in ;) |
23:35:53 | * | krux02 joined #nim |
23:36:10 | FromDiscord | <jos> okey dokey |
23:36:20 | FromDiscord | <jos> thanks for the help so far, that's a reasonable temporary solution |
23:36:29 | FromGitter | <zacharycarter> sure thing! |
23:57:49 | Araq | stop poking me. |