00:02:03 | * | gsingh93_ quit (Ping timeout: 276 seconds) |
00:02:13 | ZZZZZZZZZ | you::can::go::play::with::rust::if::you::want::cool::namespacing.unwrap |
00:02:18 | ZZZZZZZZZ | nothx |
00:02:21 | dom96 | lol |
00:04:30 | ZZZZZZZZZ | java could be a good choice too: if (5 com.nim-lang.www.prelude.int.operators.+ 7 == 12) ... |
00:05:14 | ZZZZZZZZZ | i really dont see why we need more namespacing, we can already do: from x import y |
00:06:05 | ZZZZZZZZZ | and since its not a class language, it only imports what you ask to import, cant just pull everything that could act on the type |
00:07:53 | ZZZZZZZZZ | is there any play on a standard typesafe interface for DB? the general one is stringly typed |
00:07:53 | ZZZZZZZZZ | plan* |
00:08:14 | * | gokr quit (Remote host closed the connection) |
00:09:14 | ldlework | I think the thing I like least about Nim is that it is classless. |
00:09:21 | ZZZZZZZZZ | LOl |
00:09:26 | ZZZZZZZZZ | its the thing i like most |
00:09:30 | ldlework | Alright. |
00:09:34 | ZZZZZZZZZ | structs + functions |
00:09:54 | ldlework | Yeah sounds nice. |
00:10:00 | ZZZZZZZZZ | and sometimes inheritance for dynamic dispatch is fun |
00:10:34 | ZZZZZZZZZ | but working with insane inheritance for everything is a pain in the ass, i work with that all day and its not fun |
00:10:36 | ldlework | If only it didn't create problems. |
00:10:54 | vbtt_ | I like classless too |
00:10:56 | ldlework | I'll take no-inheritance classes. :) |
00:11:14 | ZZZZZZZZZ | i specially like that you can just extend the types everywhere |
00:11:17 | Varriount | ZZZZZZZZZ: FactoryBuilderFactory extends MetaFactory |
00:11:24 | ZZZZZZZZZ | pretty much |
00:11:35 | ZZZZZZZZZ | i work a lot with PHP + magento |
00:11:37 | ZZZZZZZZZ | omg |
00:11:40 | ZZZZZZZZZ | what a fucking pain |
00:11:42 | ldlework | Varriount: I know, this is how every single one of my Python games ends up |
00:11:48 | ldlework | With a FactoryBuilderFactory |
00:11:48 | Varriount | ZZZZZZZZZ: My condolances |
00:11:51 | ZZZZZZZZZ | 20 inherit deep |
00:12:09 | ZZZZZZZZZ | takes 20 minutes to setup the inherit to be able to override something simple omg |
00:12:16 | ldlework | Its like, I can't even type the word class the first time in my editor unless its followed by FactoryBuilderFactory |
00:12:25 | ZZZZZZZZZ | 30 min later you just.. fuck it ill just patch the core and be done with it |
00:12:39 | ldlework | I'm glad we don't make our criticisms based on ad reductio absurdium |
00:12:54 | Varriount | ZZZZZZZZZ: Have fun with the '==' operator? |
00:12:59 | ZZZZZZZZZ | === ftw |
00:13:14 | ZZZZZZZZZ | but tbh i like php |
00:13:33 | ldlework | at least it has classes |
00:13:35 | ZZZZZZZZZ | but i mostly just work with associative array instead of classes most of the times |
00:13:36 | ZZZZZZZZZ | lol |
00:13:52 | ldlework | s/classes/methods |
00:13:58 | ZZZZZZZZZ | since its gonna die on runtime anyway, why waste your time with classes |
00:14:41 | ZZZZZZZZZ | i just wish there was named tuples like in python, that way you can get easy 'typed' structs |
00:17:32 | def- | ZZZZZZZZZ: what are we missing about named tuples? |
00:18:22 | ZZZZZZZZZ | easy way to declare 'struct like' objects |
00:18:24 | Varriount | def-: I think he means PHP |
00:18:27 | ZZZZZZZZZ | in php |
00:18:32 | def- | oh, ok |
00:18:32 | ZZZZZZZZZ | not in nim |
00:18:48 | def- | I didn't read most of the discussion and assumed we're talking about Nim |
00:18:49 | ZZZZZZZZZ | in php you always have to create a damn class etc.. in python, just name a type and bingo |
00:19:14 | ZZZZZZZZZ | nah im satisfied with nim, it just needs dependant types :) |
00:21:06 | dom96 | Dependent types? What for? |
00:24:32 | Varriount | What exactly are dependant types? |
00:25:31 | Varriount | And are they related to Nim's concepts? |
00:25:36 | ZZZZZZZZZ | https://www.youtube.com/watch?v=fVBck2Zngjo |
00:25:38 | ZZZZZZZZZ | no |
00:26:00 | ZZZZZZZZZ | dependant types are types that depends on value |
00:26:29 | ZZZZZZZZZ | we can emulate some of it with macros in nim |
00:26:49 | def- | yep, for example a typesafe printf: http://nim-lang.org/docs/manual.html#special-types-typedesc |
00:26:55 | ZZZZZZZZZ | exactly |
00:27:46 | vikaton | and to think I thought Ruby was flexibler |
00:27:48 | ZZZZZZZZZ | its just more coherant, but more restrictive i guess |
00:27:52 | vikaton | flexible* |
00:28:02 | ZZZZZZZZZ | lol |
00:28:27 | ZZZZZZZZZ | ruby is all runtime T_T, whats fun with idris etc is the type safety, same with nim |
00:28:56 | vikaton | yeah, thats why I went to an alternative |
00:29:16 | ZZZZZZZZZ | you can do anything in php too, its just not typesafe, so everything breaks a week later in prod, or when you refactor something |
00:29:30 | * | johnsoft quit (Ping timeout: 272 seconds) |
00:29:46 | ZZZZZZZZZ | once you taste to haskell for refactoring.... you just want to punch your screen when you work with something else |
00:30:00 | * | johnsoft joined #nim |
00:30:32 | ZZZZZZZZZ | and by looking at idris, it looks like it makes everything even simpler, like their effects system are built in, not bolted on like states etc |
00:31:26 | ZZZZZZZZZ | but nim is a good middle ground i find, easy to wrap C code, etc |
00:31:35 | ZZZZZZZZZ | low level + high level |
00:32:24 | * | bjz joined #nim |
00:32:26 | ZZZZZZZZZ | i still like to go full retard with php: http://pastebin.com/LapEYT4j |
00:34:41 | * | gsingh93_ joined #nim |
00:35:15 | vikaton | lol |
00:36:12 | ZZZZZZZZZ | idris even compiles to php LOL |
00:36:39 | * | Senketsu joined #nim |
00:37:00 | vikaton | why is this red? https://github.com/Araq/Nim/blob/master/lib/pure/math.nim#L110 |
00:37:23 | def- | vikaton: bad syntax highlighting, it thinks ' denotes the start of a character literal, like 'a' |
00:37:36 | vikaton | ah |
00:38:21 | vikaton | does Nim have embedded Nim? like erb? |
00:38:25 | def- | Would probably be useful to fix it in pygments (which github uses) |
00:38:47 | ZZZZZZZZZ | its server side probably |
00:38:50 | ZZZZZZZZZ | never used it |
00:39:06 | def- | vikaton: http://nim-lang.org/docs/filters.html |
00:39:59 | def- | And blaxpirit reimplemented something similar: https://github.com/BlaXpirit/nimception |
00:40:21 | ZZZZZZZZZ | i touched a bit to filters while experimenting on the forums to add 'new posts' information etc |
00:40:50 | ZZZZZZZZZ | all i remember is i didnt get much compile time nor runtime errors if i had mistyped a variable T_T |
00:41:53 | def- | ZZZZZZZZZ: i just tried and i do get nice compile errors |
00:42:14 | vikaton | so, it only generates? |
00:42:24 | def- | vikaton: i don't understand |
00:42:29 | vikaton | you cant filter another external file? |
00:43:19 | vikaton | hmmm |
00:43:36 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
00:44:29 | def- | Source Code Filters are supposed to be external files |
00:45:39 | vikaton | ok so I have a file with "<title> $t </title>" in it |
00:45:59 | vikaton | what would be the Nim code to replace $t with Hello |
00:48:34 | vikaton | def- ? |
00:48:56 | Varriount | import strutils; "<title> $t </title>" % ["Hello"] |
00:49:12 | def- | Looks like you have to wrap it in a proc indeed with source code filters |
00:49:29 | def- | Yeah, if you jut want templates it's easy: https://github.com/onionhammer/nim-templates |
00:49:48 | * | taesoo_ joined #nim |
00:50:33 | Varriount | Since Araq isn't here... anyone know why implicit conversion of a regular procedure to a closure/procvar is limited to the module the procedure implementation is in? |
00:50:44 | taesoo_ | stupid question, how can I convert/cast a float to an int? |
00:50:54 | * | yglukhov_ joined #nim |
00:51:01 | def- | taesoo_: int(2.3) |
00:52:28 | def- | Varriount: https://github.com/Araq/Nim/issues/2172 |
00:52:29 | taesoo_ | nice! could you also explain 'cast[int](float)' if don't mind? |
00:52:41 | * | gsingh93_ quit (Ping timeout: 265 seconds) |
00:52:49 | taesoo_ | (how to interpret cast operation?) |
00:53:02 | def- | taesoo_: cast just reinterprets the bits as the int type, that's totally unsafe |
00:53:16 | def- | type conversions, like int(2.3) are type-safe |
00:53:55 | Varriount | def-: How does procvar restrict aliasing? |
00:54:25 | Varriount | I thought it was just a pragma marking that the procedure can be used in a variable. |
00:54:31 | ZZZZZZZZZ | there the toInt(f: float): int function |
00:54:32 | taesoo_ | nice. I see cast in rust is a bit-to-bit conversion. thanks! |
00:54:51 | ZZZZZZZZZ | or round in math |
00:55:09 | def- | Varriount: all i know is that code would break when you suddenly add a new parameter with a default value to a proc |
00:55:15 | * | yglukhov_ quit (Ping timeout: 250 seconds) |
00:55:19 | vikaton | def-, doesnt seem to work on external files |
00:55:21 | ZZZZZZZZZ | i dont know the difference between int(float) and toInt(float) |
00:55:30 | def- | Varriount: which is a common way to extend a proc without breaking backwards-compatibility |
00:56:20 | vikaton | Is there an IRC bot framework layin around? |
00:56:23 | Varriount | def-: But couldn't you just introduce auto-wrapper generation? |
00:56:25 | vikaton | :P |
00:56:28 | Varriount | vikaton: irc module |
00:56:31 | def- | ZZZZZZZZZ: toInt throws an exception when the value is Inf (infinite), int doesn't |
00:56:38 | ZZZZZZZZZ | ok |
00:56:39 | def- | Varriount: yes, that's what would be perfect |
00:56:41 | vikaton | o ? |
00:57:17 | ZZZZZZZZZ | does int(float) just tries to call the converter ? |
00:57:26 | ZZZZZZZZZ | i guess |
00:57:26 | vikaton | right |
00:58:01 | vikaton | any docs on it? |
00:58:22 | def- | vikaton: I guess that's how you're supposed to use it: https://gist.github.com/def-/a3c4dd03b07aef6fe43c |
00:59:04 | Varriount | vikaton: https://github.com/nim-lang/irc/blob/master/src/irc.nim |
00:59:12 | vikaton | def- still no idea on external files? |
00:59:17 | vikaton | I have some pretty large html files |
00:59:21 | vikaton | thanks Varriount |
00:59:39 | def- | vikaton: you would just have to add a header like in foo.tmpl to them |
01:00:09 | ZZZZZZZZZ | you can look at nimforums for plenty of examples |
01:00:22 | ZZZZZZZZZ | its uses them a lot |
01:01:49 | ZZZZZZZZZ | the biggest pain point with using them in sublime text, is the lack of syntax highlight, since its all a big comment + string |
01:02:08 | * | saml_ joined #nim |
01:03:10 | def- | ZZZZZZZZZ: need to add syntax highlighting for them. literate programming has similar problems |
01:04:28 | Varriount | ZZZZZZZZZ: If you're using sublime text, are you using the NimLime Plugin? |
01:04:31 | * | xificurC_ joined #nim |
01:04:32 | ZZZZZZZZZ | I hope visual studio code gains traction, it looks like a nice replacement to sublime text. I just cant wait til the plugin system works |
01:04:37 | * | Kingsquee joined #nim |
01:04:49 | ZZZZZZZZZ | Varriount: i think so |
01:04:57 | ZZZZZZZZZ | there was 2 plugin i think, 1 outdated |
01:05:01 | ZZZZZZZZZ | and 1 working |
01:05:31 | ZZZZZZZZZ | Varriount: yes i just checked Nimplime |
01:05:34 | ZZZZZZZZZ | nimlime* |
01:05:35 | Varriount | ZZZZZZZZZ: If you want, you could help me test the next version of the plugin. |
01:06:12 | * | pregressive joined #nim |
01:06:32 | ZZZZZZZZZ | Varriount: o lol its your plugin :D nice |
01:07:17 | * | xificurC quit (Ping timeout: 256 seconds) |
01:07:27 | ZZZZZZZZZ | i only use the syntax highlight part of it, i just use the shell for everything else |
01:07:55 | ZZZZZZZZZ | but yes ill try to update to the latest version and report anything i find |
01:08:13 | Varriount | ZZZZZZZZZ: Uh, the latest version isn't 'released' as of yet. |
01:08:40 | Varriount | It's the latest version in the repository, however it hasn't been released on Package Control |
01:09:27 | ZZZZZZZZZ | sure, but its probably not rocket science to install it with git :D |
01:09:39 | ZZZZZZZZZ | i might do that this weekend |
01:09:56 | Varriount | Thanks. |
01:11:17 | * | bjz joined #nim |
01:14:36 | taesoo_ | def-: then I expected to have string(int) implemented? (I know $ operator from the tutorial though) |
01:26:41 | * | drewsrem quit (Quit: Leaving) |
01:27:09 | * | vikaton quit () |
01:27:22 | * | taesoo_ quit (Ping timeout: 244 seconds) |
01:31:05 | * | jbomo joined #nim |
01:33:26 | * | darkf joined #nim |
01:33:38 | * | darkf quit (Changing host) |
01:33:38 | * | darkf joined #nim |
01:35:41 | ZZZZZZZZZ | http://qr.ae/fU2Ti |
01:35:51 | ZZZZZZZZZ | ./facepalm |
01:37:13 | * | Pisuke quit (Read error: Connection reset by peer) |
01:38:56 | ZZZZZZZZZ | i like rust a lot, ive been using it since 0.6, but so much 'durr not safe this not safe that' everywhere since its being promoted like crazy |
01:41:22 | flaviu | Lets stay civil, no matter how irritating certain people may be. |
01:42:33 | ZZZZZZZZZ | thats how i like my programming language: https://www.youtube.com/watch?v=QNgc5_1wOFM&t=143 |
01:46:28 | dom96 | I wonder who this Captain McRetard is. |
01:47:42 | * | vikaton joined #nim |
01:47:48 | vikaton | how can I type without a new line? |
01:49:13 | * | Senketsu quit (Ping timeout: 256 seconds) |
01:49:46 | dom96 | vikaton: what do you mean? |
01:50:14 | vikaton | like in Ruby, puts always ends with \n |
01:50:26 | vikaton | but print doesnt end in \n |
01:50:47 | vikaton | is there a way in Nim to print with ending in \n ? |
01:51:03 | notfowl | vikaton, stdout.write() |
01:51:17 | vikaton | thanks |
01:54:03 | * | Senketsu joined #nim |
01:54:08 | vikaton | str() casts to string right? |
01:55:42 | notfowl | $ |
02:11:23 | filwit | just reading logs, FWIW, I think people are complaining about a problem that doesn't exist in practice with the 'import foo' being "unclean" and needing a better 'from foo import nil' option. "Jump to definition" is a much more practical solution to the "where's this symbol from" problem than enforcing module prefixes on every imported type/proc you use. I think even if we had a better 'from a import b' solution people would inevitably |
02:11:24 | filwit | just use the regular 'import a' solution eventually. |
02:15:00 | ZZZZZZZZZ | plus you can already prefix everything if you want anyway |
02:15:31 | ZZZZZZZZZ | and if theres a conflict you have to prefix it, so i dont see the problem |
02:15:46 | filwit | exactly |
02:15:53 | ZZZZZZZZZ | its just not enforced, and as someone mentioned before, you can use a linter |
02:16:17 | ZZZZZZZZZ | use it in your build system and it will just like if it were in your compiler |
02:16:21 | filwit | and i especially don't like the idea of adding a whole new 'use module' syntax (even though I like the syntax in general, it's a very bad and confusing thing to add a whole different system like that) |
02:16:49 | ZZZZZZZZZ | i just dont see any benefits to it either |
02:17:00 | filwit | anyways, just my 2 cents on the topic |
02:18:08 | ZZZZZZZZZ | (its the same for the constructors, its fine as it is ;) (with the eventual new pragma for 'private construct') ) |
02:19:33 | filwit | well i disagree with that, actually.. i think they can be improved without having really breaking backwards compat or increasing complexity too much. My arguments in this gist: https://gist.github.com/PhilipWitte/0ca58b9655a6f3fd8ff0 |
02:21:00 | filwit | i think `TypeName()` is the most direct syntax to construct and object, so we should run with it and expand it a little to be more practical for complex types and types which want to enforce specific pathways to instantiation |
02:21:45 | notfowl | vikaton, the $ operator, $1 == "1" |
02:22:21 | ZZZZZZZZZ | i disagree, hide the type constructor, and a named constructor if you you need runtime checks |
02:22:29 | ZZZZZZZZZ | add* |
02:24:18 | filwit | you disagree on what ground? I made my reasoning clear: TypeName() is the most direct syntax.. what is your counter to that? |
02:25:09 | ZZZZZZZZZ | you will have to override it and it will become a mess imo |
02:25:12 | filwit | also, not sure exactly what solution you're proposing, but it's been proposed to limited T() syntax outside the type's module.. which is actually far more backwards incompat |
02:25:22 | ZZZZZZZZZ | JsonStream(x: file) |
02:25:28 | ZZZZZZZZZ | JsonStream(x: url) |
02:25:30 | ZZZZZZZZZ | etc etc |
02:25:45 | ZZZZZZZZZ | JsonStream(x: url, maxlenght) |
02:25:46 | ZZZZZZZZZ | etc etc |
02:25:57 | filwit | no, that's exactly where you want named constructors: JsonStream.load() vs JsonStream(), etc |
02:26:07 | ZZZZZZZZZ | thats what im saying |
02:26:22 | filwit | but the *majority* of the time you just want a single (or few) ways to make a type |
02:26:41 | ZZZZZZZZZ | yes and its already there |
02:27:07 | ZZZZZZZZZ | all we need is a pragma to hide the type constructor |
02:27:14 | filwit | no, because it's too easy to create an invalid object (eg, an object which needs to be properly constructed or allocated specially) |
02:27:26 | ZZZZZZZZZ | yes, thats why you have to create the right types |
02:27:36 | filwit | and there's no way to prevent people from using T() when they should be using your 'initT()' instead |
02:27:43 | ZZZZZZZZZ | there is |
02:27:46 | ZZZZZZZZZ | there will be* |
02:27:54 | ZZZZZZZZZ | a pragma to hide the type constructor |
02:28:00 | filwit | i understand |
02:28:07 | filwit | it's still not as good a solution as mine |
02:28:23 | ZZZZZZZZZ | you will end up with 20 overloaded constructor |
02:28:31 | ZZZZZZZZZ | plus yours can raise exceptions |
02:28:31 | ZZZZZZZZZ | etc |
02:28:39 | filwit | i make the standard syntax better because there's no reason not too.. preventing the standard syntax is artificially limiting |
02:28:54 | filwit | exceptions aren't a problem |
02:29:00 | ZZZZZZZZZ | its runtime |
02:29:18 | filwit | i'm not sure what you mean by "it's runtime" |
02:29:23 | ZZZZZZZZZ | ... |
02:29:48 | ZZZZZZZZZ | with your new constructors, your T(x: string) or whatever can raise an exception at runtime |
02:29:49 | filwit | i don't understand what point your trying to make with saying something is runtime? exceptions? |
02:30:14 | filwit | okay.. but how is that any different than a 'initT(x:string)' ? |
02:30:15 | ZZZZZZZZZ | or do whatever it wants |
02:30:43 | ZZZZZZZZZ | it doesnt not replace the standard type constructor |
02:30:49 | filwit | so? |
02:31:16 | filwit | that's a bad thing.. having a universal syntax everyone can expect to use for any type everywhere throughout the code is a good thing for learning curve |
02:31:55 | ZZZZZZZZZ | its already standard imo |
02:31:59 | ZZZZZZZZZ | newT |
02:32:00 | ZZZZZZZZZ | initT |
02:32:04 | filwit | plus, it means you can first try to make a type with T() and get compiler errors about not providing the correct params and suggestions about which params to use (vs now where everything just gets caught at runtime) |
02:32:07 | ZZZZZZZZZ | init -> stack new -> heap |
02:32:34 | ZZZZZZZZZ | with the pragma it will tell you, you cant use it. |
02:33:02 | filwit | i understand it's "idiomatic" that way (even thought the stdlibs are still inconsistent on that).. but again, T() is the most direct and obvious syntax, period |
02:33:29 | filwit | it doesn't make sense *not* to make T() useful |
02:33:37 | ZZZZZZZZZ | yes to allocate memory |
02:33:42 | ZZZZZZZZZ | not to check params etc |
02:33:55 | filwit | no, often types want to be cached or something |
02:34:14 | filwit | so often you definitely don't want objects to use T() |
02:34:25 | filwit | so we add the {.noConstructor.} pragma |
02:34:43 | ZZZZZZZZZ | yes |
02:34:46 | filwit | and things give you errors, but they still can't tell you want to use 'initT', 'newT', etc |
02:35:12 | * | endragor joined #nim |
02:35:20 | filwit | plus, we now have a syntax T() which is good for somethings, but completely useless for others.. even though it's the most obvious syntax choice |
02:35:34 | ZZZZZZZZZ | it would be even more confusing with T() vs named etc if they all do the same |
02:35:41 | * | gsingh93_ joined #nim |
02:35:57 | filwit | i don't follow, all do the same thing? |
02:36:03 | ZZZZZZZZZ | no |
02:36:15 | ZZZZZZZZZ | named can do runtime checks |
02:36:16 | filwit | i was asking what you meant by "all do the same thing" |
02:36:18 | ZZZZZZZZZ | T() cant |
02:36:29 | filwit | yes T() can do runtime checks... |
02:36:34 | ZZZZZZZZZ | with your proposal they would tbe the same |
02:36:40 | ZZZZZZZZZ | right now they cant |
02:36:45 | ZZZZZZZZZ | its a different thing |
02:37:07 | filwit | no no, right now they just *dont* execute anything beyond "allocate in this standard way" |
02:37:13 | ZZZZZZZZZ | thats it |
02:37:22 | ZZZZZZZZZ | constant between all types |
02:37:34 | ZZZZZZZZZ | no need to read anything or know anything specific to your type |
02:37:39 | filwit | so instead "allocate in the standard way + call your ctor" is barely different and not confusing at all |
02:38:06 | filwit | especially if everything in Nim worked like that |
02:38:42 | filwit | it's like Nim's "useful defaults" on everything else.. if you don't provide a 'create' your get a useful default T().. if you want to customize that, use 'create' |
02:39:00 | filwit | 1 syntax for everything (most of the time) |
02:39:25 | vikaton | yeah thanks |
02:39:30 | ZZZZZZZZZ | i just dont see why its needed |
02:39:52 | ZZZZZZZZZ | i prefer how it is right now, treat every proc the same |
02:39:56 | * | endragor quit (Remote host closed the connection) |
02:40:09 | ZZZZZZZZZ | there is no 'self' either... |
02:40:15 | filwit | *except destroy, and other special funcs* |
02:40:38 | ZZZZZZZZZ | destroy is : new(T, finalizer) |
02:40:42 | ZZZZZZZZZ | its not special |
02:40:49 | ZZZZZZZZZ | its per instance |
02:41:11 | filwit | my system addresses the same problems as limiting T() from outside a module, but it's more consistent at the end of the day (eg, T() is useful for everything and can be expected for any type you use) |
02:41:26 | * | notfowl quit (Remote host closed the connection) |
02:41:33 | ZZZZZZZZZ | how does it adress the same thing? |
02:41:44 | ZZZZZZZZZ | if you want to hide the constructor |
02:41:49 | ZZZZZZZZZ | but let them use the type |
02:41:51 | filwit | because you can enforce type construction goes though a specific path |
02:41:54 | ZZZZZZZZZ | you still cant with your system |
02:42:07 | filwit | sure you could |
02:42:12 | ZZZZZZZZZ | how so |
02:42:26 | ZZZZZZZZZ | raise an exception on create? |
02:42:33 | filwit | wait.. how would you 'use' a type without allocating it anyways? |
02:42:41 | * | endragor joined #nim |
02:42:51 | ZZZZZZZZZ | you wouldnt directly construct it |
02:43:11 | filwit | you mean you want to specifically avoid T() syntax? |
02:43:14 | filwit | then avoid it |
02:43:20 | filwit | call a proc instead |
02:43:27 | ZZZZZZZZZ | all im saying is |
02:43:28 | filwit | but 'create' just allows you do overload that default |
02:43:40 | ZZZZZZZZZ | if you want to hide it , but still let your library users use the type |
02:43:43 | ZZZZZZZZZ | but with no constructor |
02:44:08 | filwit | okay, but that could be addressed with a pragma.. if it was actually wanted, which it's not.. maybe only in the most rare of places |
02:44:15 | ZZZZZZZZZ | what? |
02:44:30 | ZZZZZZZZZ | its a big part of why its wanted imo |
02:44:38 | filwit | no |
02:44:47 | filwit | you're confused about what I meant |
02:44:53 | ZZZZZZZZZ | no im not |
02:45:03 | * | fowl joined #nim |
02:45:52 | ZZZZZZZZZ | lets say you just want a type factory |
02:45:59 | ZZZZZZZZZ | .... |
02:46:07 | ZZZZZZZZZ | how would you do that with your method |
02:46:19 | ZZZZZZZZZ | you wouldnt be able to witouth the pragma |
02:47:14 | filwit | yes, that's a good point.. and the only place I can think of where you'd want either a pragma to completely restrict T() syntax |
02:47:19 | ZZZZZZZZZ | (you could still have the factory, but they could bypass it with your constructors) |
02:47:31 | ZZZZZZZZZ | factories can have many forms |
02:47:43 | ZZZZZZZZZ | lets say you want to build some html templates |
02:47:45 | ZZZZZZZZZ | etc etc, |
02:48:05 | filwit | yes, but let's count the amount of times you really want that vs all the places you just want a common syntax to construct types from modules you're unfamiliar with |
02:48:23 | ZZZZZZZZZ | new and init + prama for hiding |
02:48:29 | filwit | so you have a pragma for those rare cases, and you make the default syntax useful for the common case |
02:48:51 | filwit | or T() + 'create' + pragma for hiding |
02:49:13 | ZZZZZZZZZ | your create your override the T() right? |
02:49:19 | ZZZZZZZZZ | even in your own module... |
02:49:24 | filwit | yes |
02:49:35 | ZZZZZZZZZ | so you couldnt even construct it yourself |
02:49:43 | ZZZZZZZZZ | with a named constructor |
02:49:52 | filwit | well by default it does allocation before calling 'create', but that can be changed with a pragma so the 'create' can allocate specifically |
02:49:54 | ZZZZZZZZZ | you would be stuck with all that overhead |
02:50:39 | filwit | which in turns eliminates the confusion about needing to call 'new' on ref types, cause it's done by default before your 'create' code is called |
02:50:48 | filwit | wait what? |
02:50:53 | filwit | there is zero overhead |
02:50:58 | * | Perelandric quit (Ping timeout: 246 seconds) |
02:51:11 | filwit | named constructors and what i'm proposing are identical performance wise |
02:51:13 | ZZZZZZZZZ | there is, if you want a named constructor with a different set of checks |
02:51:32 | filwit | what? |
02:51:51 | filwit | each unique set of parameters used with T() determines what 'create' proc to invoke (statically) |
02:52:07 | * | fowl left #nim ("Leaving") |
02:52:45 | ZZZZZZZZZ | yes, you wouldnt be able to use the standard constructor yourself if you override if for your external API |
02:52:56 | ZZZZZZZZZ | it* |
02:53:23 | ZZZZZZZZZ | thats no good imo |
02:53:48 | filwit | sure, when would you want to? you can always go out of your way to allocate the type and avoid the 'create' function.. the entire point is to make T() more useful |
02:54:22 | ZZZZZZZZZ | how would you be able to allocate it on the stack? |
02:54:26 | ZZZZZZZZZ | since T() is the only way |
02:54:32 | ZZZZZZZZZ | and if you overrride it... |
02:54:37 | ZZZZZZZZZ | as per your proposal |
02:54:58 | ZZZZZZZZZ | you got no way to do it, except by playing with alloc + gc |
02:55:02 | ZZZZZZZZZ | i mean not even |
02:55:43 | ZZZZZZZZZ | it greatly limits what you can do |
02:55:46 | filwit | well you could always allocate a byte array and cast it for stack allocation, and then just wrap that up into a system lib proc |
02:55:52 | ZZZZZZZZZ | lol |
02:55:56 | ZZZZZZZZZ | yes sure but.. |
02:56:10 | filwit | no 'lol' really, that's pretty standard if there's a proc do to it |
02:56:24 | filwit | remember, you want to make it hard to do something which T() does not provide |
02:56:29 | filwit | that's the entire point of this |
02:56:40 | ZZZZZZZZZ | im talking in library code |
02:56:43 | filwit | you'd have the same problem with limiting the T() outside of the module and then trying to do this |
02:56:46 | ZZZZZZZZZ | you are the type owner |
02:56:51 | filwit | i understand |
02:56:51 | ZZZZZZZZZ | you can do whatever you want to do with it |
02:57:03 | ZZZZZZZZZ | you know your implementation details |
02:57:03 | filwit | you still could |
02:57:22 | ZZZZZZZZZ | you would just mix internal api with external api |
02:57:35 | ZZZZZZZZZ | and thats not good |
02:58:01 | filwit | often you want to use 'external' api inside your own module |
02:58:18 | filwit | i agree sometimes you might not want that, which is a good point (i hadn't considered) |
02:58:21 | ZZZZZZZZZ | you can if you want to right now, |
02:58:27 | ZZZZZZZZZ | with your proposal you wouldnt have any other choice |
02:58:57 | filwit | yes you would.. Nim is a systems programming language you can always cast memory and have a safe system function which does that for you |
02:59:07 | ZZZZZZZZZ | thats why i think the prama for .privateCtor. is the best way to deal with it |
02:59:27 | ZZZZZZZZZ | yes but no need to cast, we have something perfectly fine right now |
02:59:42 | filwit | well i will admit that my system does have more moving parts |
02:59:49 | ZZZZZZZZZ | (with the addition of the .privateCtor. pragma) |
02:59:53 | filwit | but the trade off is universal syntax |
03:00:29 | ZZZZZZZZZ | universal syntax but, confusing with the overrding imo |
03:00:41 | filwit | which is a big improvement to learning curve and general utility (when you don't have to lookup what proc to call to instantiate something) |
03:00:48 | ZZZZZZZZZ | and then when its too confusing you would have half named constructor |
03:00:50 | ZZZZZZZZZ | and half not named |
03:01:22 | filwit | yes, but those constructors could look like this: Foo("bar") and Foo.load("bar") which is clean |
03:01:56 | ZZZZZZZZZ | prefix arent clean |
03:01:56 | filwit | that said, i do agree that the simplest path which addresses the most concerns makes most sense... and you raised some good points |
03:02:01 | ZZZZZZZZZ | since its not enforced |
03:02:18 | ZZZZZZZZZ | some would use it, some wouldnt |
03:02:24 | filwit | well it is enforced.. the def looks like: 'proc new(T:type Foo, s:string)' |
03:02:37 | filwit | which is what I use in my code now |
03:03:03 | ZZZZZZZZZ | thats confusing to me T_T |
03:03:59 | filwit | I think it's much cleaner than 'newT()', and works better with generic code to some degree (which is another point where my proposal beats named constructors) |
03:04:29 | ZZZZZZZZZ | imo it is not more generic |
03:04:42 | ZZZZZZZZZ | you still have to know the exact parameters for instantiation |
03:04:48 | ZZZZZZZZZ | so theres nothing generic to it |
03:05:10 | ZZZZZZZZZ | right now, the real type constructor are more generic |
03:05:10 | filwit | well it's Type + Params vs Type + Call + Params, so one down |
03:05:44 | filwit | "right now, the real type constructor are more generic" - exactly, and my proposal is an extension of those |
03:05:53 | ZZZZZZZZZ | no i mean |
03:06:11 | ZZZZZZZZZ | right now they always have 1:1 underlying memory -> to params |
03:06:16 | ZZZZZZZZZ | not so much with yours |
03:06:33 | ZZZZZZZZZ | Type(fieldn: Typen) |
03:06:41 | ZZZZZZZZZ | yours will just be random |
03:06:49 | ZZZZZZZZZ | to whatever the library maker wants |
03:06:58 | ZZZZZZZZZ | so it will be confusing |
03:07:01 | filwit | no more random than what your forced to do now, which is use 'newT()' anyways |
03:07:17 | ZZZZZZZZZ | but T() right now is always the same |
03:07:23 | * | pregressive quit (Remote host closed the connection) |
03:07:27 | filwit | so? |
03:07:27 | ZZZZZZZZZ | named constructor do as they please |
03:08:17 | ZZZZZZZZZ | with newT, initT you expect it to require some special care |
03:08:52 | ZZZZZZZZZ | aka, might have to try, or watch if it return null |
03:08:56 | ZZZZZZZZZ | or whatever else |
03:09:01 | filwit | the main issue is "i want to construct a *valid* object".. there's a couple solutions to that which Nim is lacking a bit on right now.. there's a reason we're even talking about a {.noCtor.} pragma, because people are so attracted to T() that they end up using it when they shouldn't and get runtime validation errors |
03:09:23 | ZZZZZZZZZ | yes |
03:09:31 | ZZZZZZZZZ | the privatector is all thats needed |
03:09:34 | * | dtscode joined #nim |
03:10:27 | ZZZZZZZZZ | with your proposal, if i want bypass by external API , i would have to use named constructor anyway |
03:10:31 | filwit | so my solution means the syntax people are very attracted too would be useful and could be expected to be used for any and all types throughout the code.. so our solution to "i want to construct a valid object" is always clear.. just call the TypeName |
03:10:31 | ZZZZZZZZZ | my* |
03:10:56 | filwit | yes, but this isn't the *majority* of what code wants to do |
03:11:21 | filwit | it makes most sense to make what people want to do, and what they want *most often* to do the way to actually do it |
03:11:24 | ZZZZZZZZZ | isnt nim called a systems language programming? |
03:11:34 | filwit | then have things which help with the corner cases |
03:12:08 | ZZZZZZZZZ | new and init are fine |
03:12:17 | ZZZZZZZZZ | rust doesnt have constructor |
03:12:31 | ZZZZZZZZZ | checkmate ! |
03:12:46 | filwit | yeah, was going to say that's irreverent |
03:12:57 | filwit | irrelevant* |
03:13:25 | filwit | and what i'm proposing doesn't limit Nim from being a systems programming language in any way |
03:13:51 | filwit | you say 'new' and 'init' are fine.. i saw "the situation could be better" I don't see how my point is invalid |
03:14:04 | ZZZZZZZZZ | it would be worse with your proposal imo |
03:14:21 | filwit | not in the majority of code |
03:14:44 | ZZZZZZZZZ | to me it seems like it would |
03:14:55 | filwit | only none-common could would require a little more depth.. only on a tad more than {.noCtor.} |
03:14:58 | ZZZZZZZZZ | you always would have to look at the type definition + the constructors |
03:15:07 | filwit | no |
03:15:09 | ZZZZZZZZZ | to know if you really have params -> underlying structure matching |
03:15:32 | filwit | the compiler would say "can't use those params.. try one of *these*" |
03:16:12 | filwit | which it could do better because 'create' is tied to T(), unlike new/init |
03:16:35 | ZZZZZZZZZ | yes, mixing 2 things together |
03:16:40 | ZZZZZZZZZ | type creation + validation |
03:17:40 | filwit | which is exactly what we want. the whole reason for {.noCtor.}, etc |
03:18:01 | ZZZZZZZZZ | yes, while being able to create the type as you wish inside your own library |
03:18:08 | ZZZZZZZZZ | you just hit the nail on the head |
03:18:10 | filwit | which you still could |
03:18:28 | ZZZZZZZZZ | with only the pragma it would be fine |
03:18:31 | filwit | just you have to go further out of your way to do it, which is a feature, not a limitation |
03:18:34 | ZZZZZZZZZ | your proposal has nothing to do with it |
03:19:06 | ZZZZZZZZZ | you dont want to make it harder in your own private code |
03:19:14 | ZZZZZZZZZ | yes you want to make it harder externally |
03:19:16 | ZZZZZZZZZ | but not internally |
03:19:20 | filwit | either the {.noCtor.} or my solution would address the main concerns.. but mine does it with keeping syntax people are obviously attracted too |
03:19:22 | * | endragor quit (Remote host closed the connection) |
03:19:46 | ZZZZZZZZZ | yours hide the standar ctor to yourself |
03:19:48 | filwit | "but not internally" this isn not always true |
03:20:08 | ZZZZZZZZZ | you know what you can and cannot do with your own type |
03:20:16 | ZZZZZZZZZ | if you shouldnt do it in some instance, dont do it |
03:21:01 | filwit | actually, no what am i thinking... you just use an internal named constructor if you want an "allocate without setup" inside your module |
03:21:04 | filwit | so simple |
03:21:13 | ZZZZZZZZZ | you couldnt |
03:21:19 | filwit | yeah you could |
03:21:32 | filwit | sorry.. i'm getting annoyed, i should be |
03:21:34 | ZZZZZZZZZ | since you just override the constructor |
03:21:59 | filwit | no, you'd just have a 'proc customNew: Foo' |
03:22:10 | filwit | internally |
03:22:54 | ZZZZZZZZZ | so wait, with your proposal what would happen with a 'proc customNew: Foo' outside of your module? |
03:23:03 | * | endragor joined #nim |
03:23:12 | ZZZZZZZZZ | ... |
03:23:21 | ZZZZZZZZZ | it wouldnt fix anything if it allows it |
03:23:25 | ZZZZZZZZZ | and if it doesnt its even worse |
03:23:49 | dtscode | What proposal? |
03:24:10 | filwit | dtscode: https://gist.github.com/PhilipWitte/0ca58b9655a6f3fd8ff0 |
03:24:29 | ZZZZZZZZZ | filwit, what would happen with a 'proc customNew: Foo' outside of your module |
03:24:43 | filwit | ZZZZZZZZZ: idk actually.. but to what is supposed to happen here with {.noCtor.} either? |
03:24:54 | * | endragor quit (Remote host closed the connection) |
03:25:08 | filwit | that's a flaw with both systems i think... |
03:25:15 | filwit | and they probably have the same solution |
03:25:25 | dtscode | hmmm |
03:25:38 | ZZZZZZZZZ | i think it would disalow the result auto instanciation i guess or something |
03:25:58 | ZZZZZZZZZ | no clue how that would be implemented tho |
03:26:17 | ZZZZZZZZZ | but its clear, since its a noctor pragma |
03:26:27 | ZZZZZZZZZ | with your system... we still need the private imo |
03:26:32 | ZZZZZZZZZ | otherwise.. |
03:27:10 | filwit | i don't see how mine would be any worse here, really. |
03:27:26 | ZZZZZZZZZ | because yours is with different parameters |
03:27:51 | ZZZZZZZZZ | mine is just to disallow instanciation of the type completly outside of the module |
03:28:02 | ZZZZZZZZZ | it does nothing else |
03:28:09 | * | dddddd quit (Ping timeout: 245 seconds) |
03:28:35 | filwit | well yeah, but the solution is the same, you simply cannot do "proc f: Foo =" unless Foo is proven to be setup in a valid way or something |
03:28:44 | ZZZZZZZZZ | you could still do 'proc customNew: Foo', but would have do do = 'initT' |
03:28:58 | ZZZZZZZZZ | yes anything that return a Foo would work |
03:29:08 | ZZZZZZZZZ | and since the only valid way is inside the module.. |
03:29:25 | ZZZZZZZZZ | as i said im not versed with the internals of the compiler |
03:29:37 | ZZZZZZZZZ | but it would prefer auto instanciation of result |
03:29:42 | ZZZZZZZZZ | or something |
03:30:09 | filwit | i don't see your point (against my proposal) in your last few sentences. Having to do 'initT' or whatever is exactly the same solution to mine |
03:30:25 | ZZZZZZZZZ | how so? |
03:31:03 | filwit | in mine you could do 'initT' or T() or whatever else at your disposal, the semantic checking would be the same |
03:32:42 | filwit | anyways, you've raised some good points I hadn't considered before (about using T() within a module).. so thanks for that |
03:32:45 | ZZZZZZZZZ | right now, everyone implements newT initT, so everyone uses that method, nothing would break |
03:33:16 | ZZZZZZZZZ | if you implement a new named constructor it doesnt change anything |
03:33:22 | * | taesoo joined #nim |
03:33:30 | filwit | i don't find that very compelling.. i'm not throwing that out of the equation, but from a long-distance standpoint I don't see how that makes mine solution any worse |
03:33:35 | ZZZZZZZZZ | but with your proposal, if you ovverrride the constructor, boom |
03:34:06 | filwit | yes, mine solution is not fully backwards compat |
03:34:25 | filwit | but it could actually be mostly |
03:34:29 | ZZZZZZZZZ | and would still need the pragma |
03:34:45 | ZZZZZZZZZ | if you really dont want to expose your constructor |
03:35:01 | filwit | you enable it via {.experimental.} and give compiler warnings about the upcoming change when a 'create' function is found in existing code |
03:35:31 | ZZZZZZZZZ | sure, but as i said the pragma would be needed anyway to hide the constructor, if you really dont want to expose any |
03:35:42 | ZZZZZZZZZ | so the 2 arent competing with each other |
03:35:49 | ZZZZZZZZZ | yours is an addition |
03:36:00 | filwit | "if you really dont want to expose your constructor" - yes, but again, lets measure the amount of times you want to do that compared to types which have 1 or few ways to construct |
03:36:00 | ZZZZZZZZZ | to the pragma |
03:36:27 | ZZZZZZZZZ | sure, all im saying is they arent the same, the pragma doesnt prevent your feature |
03:36:34 | filwit | and also, I'm not fully convinced there isn't some other solution to that problem |
03:36:38 | ZZZZZZZZZ | they are for different purpose |
03:36:51 | ZZZZZZZZZ | hide ctor / force checks |
03:37:04 | filwit | that's actually true.. |
03:37:35 | ZZZZZZZZZ | they arent mutually exclusive |
03:37:39 | ZZZZZZZZZ | you could have both |
03:37:46 | filwit | my system is all about extending T() functionality to be more useful to types.. while {.noCtor.} kinda stands by itself.. even if they address a similar problem |
03:38:09 | filwit | similar *set* of problems that is |
03:38:12 | ZZZZZZZZZ | (for the purpose you would use noctor) |
03:38:50 | ZZZZZZZZZ | and it would be better as privateCtor or something, since you still want to be able to construct it somewhere ;) |
03:39:31 | filwit | in fact.. that's convinced me. bravo. We should add the .noCtor. pragma first.. it's easier and accomplishes the same thing without breaking code.. then eventually add my constructor extensions for some later compiler 2.0 or whatever |
03:39:38 | ZZZZZZZZZ | :) |
03:39:48 | ZZZZZZZZZ | great success! |
03:39:53 | ZZZZZZZZZ | viva nim! |
03:40:40 | * | endragor joined #nim |
03:40:46 | filwit | i still like T(..) as a 'universal' syntax for constructions, but from where we are now, {.noCtor.} makes more sense and is best ATM.. I don't actually care about this a ton either (my code works and is clean right now), so this gives us more time to debate it and more time for me to make it. |
03:41:49 | ZZZZZZZZZ | yes, the .privateCtor. would be simpler to add, and i think everyone could agree, your proposal is ok on the basis |
03:42:00 | ZZZZZZZZZ | but some details.. |
03:42:07 | ZZZZZZZZZ | it would need to be reworked |
03:42:24 | * | gsingh93_ quit (Ping timeout: 256 seconds) |
03:42:37 | ZZZZZZZZZ | to not restrict the internal use |
03:43:22 | ZZZZZZZZZ | anyway i think i filled enough irc log pages for today |
03:43:40 | ZZZZZZZZZ | time to watch some iZombie + Veep |
03:43:46 | ZZZZZZZZZ | later |
03:43:49 | filwit | later, thanks for the debate |
03:43:54 | ZZZZZZZZZ | u2 <3 |
04:00:50 | ZZZZZZZZZ | + interfacing with c would be harder, while overrriding default constructor for your external api |
04:08:32 | * | endragor quit (Remote host closed the connection) |
04:16:26 | * | kokozedman_ joined #nim |
04:18:35 | * | saml_ quit (Remote host closed the connection) |
04:23:35 | * | vendethiel joined #nim |
04:25:21 | * | endragor joined #nim |
04:49:41 | * | vendethiel quit (Ping timeout: 250 seconds) |
04:57:39 | * | dtscode quit (Ping timeout: 244 seconds) |
05:07:16 | * | vendethiel joined #nim |
05:15:52 | * | yglukhov_ joined #nim |
05:22:17 | * | jbomo left #nim (#nim) |
05:24:36 | * | ddl_smurf quit (Quit: ddl_smurf) |
05:30:04 | * | vendethiel quit (Ping timeout: 256 seconds) |
05:36:41 | * | kokozedman_ quit (Quit: Leaving) |
05:36:57 | * | yglukhov_ quit (Quit: Be back later ...) |
05:41:13 | * | intra quit (Ping timeout: 255 seconds) |
06:08:05 | * | pregressive joined #nim |
06:10:33 | * | taesoo quit (Ping timeout: 240 seconds) |
06:12:43 | * | pregressive quit (Ping timeout: 256 seconds) |
06:18:31 | * | dtscode joined #nim |
06:28:03 | * | polde joined #nim |
06:29:24 | dtscode | Can someone tell me why https://bpaste.net/show/d2e54b56762a is producing: |
06:29:24 | dtscode | nimbus.nim(22, 54) Info: template/generic instantiation from here |
06:29:24 | dtscode | lib/pure/asyncdispatch.nim(1331, 44) Error: index out of bounds |
06:31:01 | * | BitPuffin|osx quit (Ping timeout: 264 seconds) |
06:34:50 | filwit | dtscode: no idea, could always be a bug in asyncdispatch.. if line 22 is the culprit, it looks like the {.async.} macro is hitting an error with semantically analyzing your code. I would suggest commenting-out parts of it to isolate what section .async. is having trouble with, then make a bug report when you've narrowed it down. |
06:35:03 | dtscode | Thanks |
06:36:34 | * | yglukhov_ joined #nim |
06:39:53 | filwit | dtscode: looking that the asyncdispatch code (here: https://github.com/Araq/Nim/blob/devel/lib/pure/asyncdispatch.nim#L1331), it looks like the {.async.} macro has a bug with handling 'discard' statements.. perhaps this is related to the recent change where 'discard' can now be used instead of 'nil' for empty 'of' blocks? |
06:40:19 | dtscode | Oh did I use discard? |
06:40:22 | dtscode | Silly me |
06:40:27 | filwit | no you used 'nil' |
06:40:40 | dtscode | That should work though |
06:40:50 | dtscode | I was using it before and it compiled |
06:40:54 | * | Matthias247 joined #nim |
06:41:58 | filwit | yeah I'm just guessing here, but I know something recently changed with that, so perhaps there's a bug where the 'nil' now looks like a 'discard' stmt, but doesn't have correctly structured AST and thus hits the index-out-of-range due to the {.async.} macro assuming an AST structure. |
06:42:16 | dtscode | Oh well. I'll debug it in the morning |
06:42:42 | filwit | k. make sure you ask dom96 when he's around. He's the asyncdispatch author |
06:42:52 | dtscode | Yeah. Thanks for the tips :D |
06:43:09 | filwit | oh.. pfft |
06:43:32 | filwit | dtscode: you are using the discard block to comment out the large string of code.. try running it without that |
06:44:16 | dtscode | Oh... hmmm... That could also be an issue |
06:44:17 | filwit | there's probably a bug in {.async.} where it doesn't properly handle discard statements witch parameters (just a guess) |
06:48:38 | filwit | yeah, that's gotta be it.. looking at the asyncdispatch code it looks like it assumes all 'discard' statements will either appear as an empty statement or one followed by a call.. so when it's followed by a string it passes the 'isEmpty' check but then tries to check the call's child nodes, which a string doesn't have, thus the out-of-bounds |
06:49:54 | * | Matthias247 quit (Read error: Connection reset by peer) |
07:01:01 | * | lyro quit (Read error: Connection reset by peer) |
07:01:29 | * | polde quit (Quit: q) |
07:01:57 | * | polde joined #nim |
07:02:33 | * | Ven joined #nim |
07:06:29 | * | BlaXpirit joined #nim |
07:07:03 | * | Ven quit (Ping timeout: 250 seconds) |
07:08:52 | * | endragor_ joined #nim |
07:12:13 | * | endragor quit (Ping timeout: 256 seconds) |
07:17:35 | * | jubalh joined #nim |
07:17:37 | jubalh | hi |
07:19:01 | * | gokr joined #nim |
07:21:56 | filwit | jubalh: hello |
07:22:47 | * | endragor_ quit (Remote host closed the connection) |
07:22:58 | jubalh | found nim today, thinking about checking it out :) just started with go 3 months ago though |
07:23:15 | jubalh | and now i stumbled upon the famous go vs rust vs nim discussion...still reading my way through it |
07:27:59 | filwit | dtscode: fixed your bug: https://github.com/Araq/Nim/pull/2767 |
07:28:46 | filwit | jubalh: welcome to #nim, let us know if you have questions.. though this time of night most of Nim's community is sleeping. |
07:28:56 | dtscode | filwit: :D |
07:29:02 | dtscode | <3 |
07:29:27 | filwit | :) |
07:32:31 | jubalh | its 9:30 am here :) |
07:34:57 | filwit | 00:32 here :) |
07:34:57 | filwit | most of #nim is on UK/US time i think.. some of us just stay up late |
07:35:25 | jubalh | i see |
07:35:35 | jubalh | i suppose many of you already went through the rust/go/nim thing? |
07:35:46 | filwit | link? |
07:36:51 | filwit | i came from D (use C# and Javascript a lot too).. only barely tried both Rust and Go, though I've learned about Rust a lot lately (cause of it's unique take on memory safety) |
07:38:35 | jubalh | i am coming from C (was embedded programmer) not work as a php dev |
07:38:43 | jubalh | but in my free time i try to look at other languages |
07:38:59 | jubalh | link..well among others i just read http://goran.krampe.se/2014/10/20/i-missed-nim/ |
07:39:38 | gokr | Just read an interesting article why the Cog guys aren't that hot on LLVM, not really "nim" stuff, but very interesting read: https://clementbera.wordpress.com/2014/05/28/the-sista-chronicles-viii-integrating-llvm-in-cog/ |
07:40:04 | gokr | jubalh: Oh, that's my article ;) |
07:40:20 | gokr | There's more at http://goran.krampe.se/category/nim |
07:40:52 | gokr | jubalh: You are in my tz then, country? |
07:49:13 | * | gokr coffee... |
07:53:51 | jubalh | gokr, germany / switzerland |
07:55:06 | jubalh | gokr, hehe you noted it already in the article, i will say it anyway: i am also one of those who prefers return values to exceptions. i really like that Go has the way of returning multiple values and so can return "err" |
07:55:40 | synthmeat | to be perfectly honest, i skipped go and rust seeing that it would be very hard to keep text width under 80 columns :D |
07:55:47 | synthmeat | in nim that's easy :) |
07:55:52 | * | OnO joined #nim |
07:56:06 | jubalh | on the first glance, nim looks eaiser to read than rust |
07:56:10 | synthmeat | (morning, nim-people) |
07:56:44 | jubalh | i dont believe in the 80 columns thing :) doesnt suit wide monitors |
07:57:18 | synthmeat | sure does, just put many of them! :) |
07:57:24 | jubalh | hmm after basic, a second langauge was object pascal, that makes me like nim too :) |
07:57:51 | filwit | i don't follow 80 width, but i do keep my code short enough to put two side-by-side easy on a 1080p |
07:57:52 | synthmeat | i can squeeze in 3 80-column editors on 11" laptopt |
07:58:20 | jubalh | oh my :D |
07:58:26 | jubalh | for me even 14" is too small |
07:58:43 | jubalh | hmm nim community seems nice, and website and information too |
07:58:45 | synthmeat | when i used external display, i was mostly keeping it pivoted too |
07:59:09 | jubalh | go community is also very nice. and rust i didnt look at yet |
07:59:12 | jubalh | will be a hard choice |
08:00:52 | synthmeat | whadaya wanna build with it? |
08:01:33 | filwit | jubalh: just try writing some small program (related to the work you want to do) in all three and see which one feels best to you |
08:05:45 | synthmeat | i'm a gonna do games with it! :) |
08:05:55 | filwit | both Nim and Rust are very fast and have good memory control (Nim's GC is not like Go's, or so I've heard), and Go has excellent web features (again, only heard) |
08:05:56 | jubalh | filwit, thats what i planned to do :) |
08:05:57 | * | coffeepot joined #nim |
08:06:06 | synthmeat | just need to evaluate emscripten webgl output first |
08:06:21 | gokr | jubalh: Regarding communities, I don't know the Go/Rust communities really (although I have only heard good things) - but Nim has one "advantage" in my book and that's the fact that its smaller and "grass root". |
08:06:32 | jubalh | actually i also thought about starting with an web application (since that what i do at my day job in php right now), so anybody ever tried jester? |
08:06:35 | jubalh | https://github.com/dom96/jester |
08:06:52 | jubalh | "grass root", gokr ? |
08:06:59 | filwit | I like Nim because it's syntax is clearer than the others IMO, combined with it's GC which makes it perfect for Game Engines/Scripting |
08:07:11 | gokr | jubalh: The web forum is written using Jester etc, its the best example of a fairly large web app in Nim. |
08:07:36 | * | Trustable joined #nim |
08:07:43 | synthmeat | gokr: i had some luck with few of you guys being awesome, but in general, the community is slightly leaning on "hostile to newcomers/n00bs" |
08:07:46 | gokr | jubalh: What I meant is that in Nim - decisions are made here basically, Araq being top dog of course - but there is no Mozilla or Google pulling shots. |
08:07:47 | synthmeat | just a bit! |
08:07:48 | jubalh | gokr, interesting :) |
08:08:07 | jubalh | gokr, ah i see |
08:08:12 | synthmeat | it's fine though, i like no-nonsense approach to answering questions, particulary silly ones |
08:09:01 | jubalh | i will first read as much about go/rust/nim as i can, to get a picture and then start implementing the same program in all of them, i guess |
08:09:03 | gokr | Well, I agree that some people here (nudge, nudge) can be a bit ... "less patient" sometimes, but I wouldn't call it hostile. |
08:09:14 | * | Ven joined #nim |
08:09:28 | synthmeat | gokr: "slightly leaning on 'hostile [...]'" is what i said though :) |
08:11:19 | gokr | jubalh: Go is very "practical" with a good toolset (so I have heard) but seems... very boring. And not as wide in covering domains I would guess. |
08:11:42 | jubalh | i did some small console applications in go, and a simple web wiki |
08:11:48 | gokr | Nim also has one killer advantage sometimes missed - and that is integration with C/C++ eco systems. |
08:11:55 | jubalh | what domains would you put nim in? |
08:11:59 | synthmeat | games! |
08:12:05 | jubalh | oh it does? hmm but go can also use c/c++ |
08:12:14 | synthmeat | fast pseudo-scripts |
08:12:39 | gokr | jubalh: "Use" is one thing, but since Nim compiles via C or C++ - integration is VERY good. |
08:12:53 | * | vendethiel joined #nim |
08:13:10 | gokr | Araq wrapped Urho3D using c2nim in a week or so - mostly fully automated. That's a fairly big C++ game engine. |
08:13:12 | synthmeat | i can't read the generated C code though, and i kinda like to think i know a bit of C |
08:13:33 | jubalh | hmm but will it be syntactic nice nim then? |
08:13:35 | jubalh | or c style nim? |
08:13:47 | gokr | It can be made very nice Nim indeed. |
08:14:41 | gokr | As an example, in Urho3D there is a vector container - and with a bit of simple code you can iterate over them just like a normal Nim container. |
08:15:07 | * | strcmp1 quit (Ping timeout: 256 seconds) |
08:15:10 | filwit | use some form of prettifier on the C code to make it more readable.. but mostly when you're looking at the C code it's to look at a specific function, so just using 'find' and then reading the code is often enough. |
08:15:50 | synthmeat | filwit: actually, yeah, that's what i ended up doing (just looking up particular functions) |
08:15:53 | synthmeat | so no biggie |
08:16:13 | gokr | jubalh: Example: https://github.com/3dicc/Urhonimo/blob/master/examples/huge.nim#L175 |
08:16:39 | jubalh | go integrates very nicely into vim. nim too? |
08:17:11 | gokr | jubalh: The "magic" that makes that work are here: https://github.com/3dicc/Urhonimo/blob/master/examples/huge.nim#L22-35 |
08:17:14 | filwit | IDE support is still a more rocky situation than the others (it's a smaller community) |
08:17:32 | filwit | but that's been improving well lately |
08:17:38 | synthmeat | filwit: vim plugin is amazing though |
08:17:57 | synthmeat | i don't even know how in the world it catches all that via syntastic |
08:17:59 | jubalh | well i just need stuff like "jump to definition" and maybe autocompletion. |
08:18:03 | filwit | synthmeat: am linux user for a few years now but have only use vim like 5 times in my life :P |
08:18:36 | gokr | jubalh: Regarding domains, I think Nim covers basically what C/C++ would cover plus ability to write scripts and web stuff quite nicely. So its a very wide net. |
08:19:08 | filwit | synthmeat: i should probably try the vim nim plugin though, just to see what it's like |
08:19:12 | * | notfowl joined #nim |
08:19:13 | gokr | jubalh: Both those Nim has via nimsuggest (compiler running in service mode) |
08:19:21 | jubalh | this looks nice https://github.com/ckkashyap/nim-xv6 |
08:19:29 | synthmeat | what it sucks a bit is parallelism, right? |
08:20:36 | jubalh | also i think that this is quite a nice read https://news.ycombinator.com/item?id=9050114 |
08:21:05 | synthmeat | yeah, that was a big event in nim history :) |
08:21:12 | gokr | Eh... Nim as a language has a lot of ammunition when it comes to concurrency. Some of it is not that mature perhaps. |
08:21:25 | jubalh | hm actually i joined #rust at moznet |
08:21:39 | jubalh | and i have to say, community here seems a lot nicer (at least the last 10 minutes :) ) |
08:21:58 | jubalh | what do you guys think i an advantage of rust that nim doesnt have? |
08:22:08 | filwit | synthmeat: parallelism is a pretty good situation in Nim. You should ask Araq or Jehan about it for more detail. There are some things that are challenging you need to be aware of though. Like thread-local only GC. |
08:22:19 | jubalh | would be interesting to hear your opinions on it, though i probably know gokr already from his blog :) |
08:22:38 | gokr | The obvious advantage of Rust is its memory model - but I would only consider it an advantage if you really *need* it - and I argue most of us really don't. |
08:22:39 | jubalh | hmm Araq studied at KIT in germany? |
08:22:56 | jubalh | not yet familiar with its memory model, will read up on it |
08:23:12 | synthmeat | jubalh: nah, i won't pollute with noise (= my oppinions), but gc across threads is a biggie kinda |
08:23:28 | gokr | That's the key thing in Rust - the absence of a GC and a system of lifecycle/pointer ownership to know when stuff can be deallocated or not. |
08:23:43 | jubalh | synthmeat, and gc across threads is what nim has? |
08:23:57 | jubalh | hmmm i see gokr |
08:24:02 | gokr | No, Nim has GC per thread. |
08:24:08 | gokr | Which I personally think is brilliant. |
08:24:39 | filwit | jubalh: Rust's memory design is nice for concurrency, but IMO it's life-time var and strict ownership rules aren't good for some domains, it's a lot of mental overhead which Nim's GC doesn't have |
08:24:41 | gokr | So Nim has been leaning towards shared nothing concurrency so far - GC per thread and copy between threads. |
08:25:56 | gokr | Although it sure is worth noting that: a) The GC is written in Nim, you can actually run with two different GCs and... b) There are ideas of also adding shared structures for non copying sharing between threads. |
08:26:11 | filwit | jubalh: by "nice for concurrency" i mean they currently have a bit more *free* safety features than Nim in parallel code.. but I'm actually new to this stuff and am not the best person to talk about it (could be giving some misinformation out) |
08:26:15 | gokr | But the base idea - let threads communicate over channels with "messages" - is sound IMHO. |
08:26:58 | gokr | Also, Nim has the automagic parellell stuff - which I know nada about. But it sure looks cool :) |
08:27:34 | gokr | jubalh: I wrote a simple TCP server using spawn/threadpool - one of my articles describe it. Very simple, worked great, good performance IMHO. |
08:28:12 | filwit | jubalh: that said, Nim and Rust are very comparable in performance in general on almost every benchmark so far, and actually most of Rust's ownership system could be eventually applied to Nim's ptr model.. and viseversa, where Rust could gain better GC support (though i don't think their syntax can be fixed so easily :\ but that's pretty subjective) |
08:28:34 | jubalh | actually i have to say i never used threads/paralellism. i was a embedded c dev most of the time. on quite limited hardware. first time i used channels was in the last 3 months with go. and actually just one time to test it out but not in an actual program where it was needed |
08:29:23 | jubalh | hmm if its so much the same i also prefer the syntax of nim over rusts (just from a quick look) |
08:29:26 | notfowl | jubalh, thanks for the link |
08:29:34 | jubalh | okay, will be back later |
08:29:36 | gokr | As a sidenote, we are betting on Nim at 3DICC - we hired Araq so... :) |
08:29:38 | jubalh | notfowl, which one? ;) np |
08:29:46 | filwit | jubalh: I never really played with parallel code before Nim either.. and it was really easy with Nim's parrallel/spawn system |
08:29:48 | notfowl | this ycombinator post |
08:29:58 | jubalh | filwit, 3DICC? |
08:30:00 | jubalh | notfowl, :) |
08:30:13 | jubalh | filwit, okay cool, that i will check it out soon |
08:30:36 | gokr | jubalh: http://forum.nim-lang.org/t/870#5166 |
08:31:21 | filwit | jubalh: out of curiosity, where/how did you hear about Nim? |
08:33:47 | gokr | jubalh: So welcome to Nim, and feel free to ask anything. |
08:37:26 | * | endragor joined #nim |
08:39:09 | * | strcmp1 joined #nim |
08:42:13 | * | BlaXpirit quit (Remote host closed the connection) |
08:42:35 | synthmeat | gokr: i'd assume HN, like me and most others |
08:42:56 | filwit | synthmeat: think you meant me |
08:43:07 | synthmeat | ah, yeah, sorry |
08:43:24 | synthmeat | still sippin' morning coffee :P |
08:44:04 | * | BlaXpirit joined #nim |
08:50:12 | gokr | Quite a lot of cool code being written out there - just perused bluenote's github repos |
08:51:05 | gokr | Wonder if we would benefit from "harvesting" a few really good things into the base - especially say collection implementations like bluenote's heap etc. |
08:52:10 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
08:54:12 | jubalh | no not HN :) |
08:55:14 | jubalh | i heard about nim several times, dont know where exactly. probably because i was learning go or on some news site. but didnt pay much attention. but today i have my free day (and thus some time), and then Copyfree posted about nim, and i thought "okay lets get informed about this now" |
08:56:34 | gokr | def has lots of cool articles on Nim: http://hookrace.net/blog/ |
08:56:46 | jubalh | cool thanks |
08:58:04 | * | vendethiel quit (Ping timeout: 272 seconds) |
08:58:06 | * | xificurC_ quit (Quit: WeeChat 1.1.1) |
08:58:26 | * | xificurC joined #nim |
08:59:48 | * | ddl_smurf joined #nim |
09:00:32 | * | TEttinger joined #nim |
09:09:35 | * | jubalh quit (Quit: Leaving) |
09:10:51 | * | ddl_smurf quit (Quit: ddl_smurf) |
09:21:23 | dom96 | dtscode: yes, report it as a bug if you haven't already. |
09:22:10 | filwit | dom96: i already fixed it: https://github.com/Araq/Nim/pull/2767 |
09:27:26 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:33:33 | dom96 | filwit: I don't think that's the right way to fix it. |
09:33:45 | dom96 | You should only need to touch the discard code |
09:33:56 | * | Kingsquee quit (Quit: Konversation terminated!) |
09:33:59 | dom96 | and I think you've introduced bugs by changing the other code |
09:34:49 | dom96 | that check for nnkIdent is not pointless |
09:35:11 | filwit | er, yeah I meant to ask in the PR to double check the nnkIdent checks I removed.. but as far as I'm aware a nkCall and nkCommand will always have a nkIdent as a first child after that, so those checks where pointless |
09:35:32 | filwit | oh i see, you said it wasn't pointless.. in that case there was a different bug |
09:36:08 | filwit | you checked for nkIdent after one command, but not the other (which is also part of why I assumed it was pointless) |
09:36:11 | dom96 | The case is more clear too, and sets it up to be extensible. |
09:36:46 | filwit | err.. okay, sorry.. just not how I code and figured it was just left-over from when it had more options |
09:37:00 | dom96 | As for separating the website and async changes. |
09:37:06 | dom96 | You should create a branch for each PR |
09:37:13 | dom96 | and commit the changes to the branch |
09:37:34 | filwit | I think i had already pushed those changes and meant to make a PR before.. |
09:37:47 | filwit | but I'll fix everything |
09:38:49 | filwit | er no wait, i did include those changes here.. i figured I had meant to make a PR and figured I'd just include it now.. but if you want two PRs for testing purposes that's cool |
09:38:53 | * | Senketsu quit (Ping timeout: 246 seconds) |
09:39:45 | * | vendethiel joined #nim |
09:40:27 | dom96 | The only change that's really needed is to check for nnkCommand I think |
09:40:59 | filwit | i thought you said it was needed |
09:41:05 | filwit | so should I revert or not? |
09:41:38 | filwit | wait you wanted the case/of, nevermind |
09:42:08 | dom96 | if node[0].kind != nnkEmpty -> if node[0].kind == nnkCommand |
09:42:58 | gokr | Hehe, fixed my first bug in Nim ;) |
09:43:10 | filwit | what if you use with 'discard await(..)` which will be nnkCall not nnkCommand |
09:43:51 | filwit | it needs to be if node[0].kind in {nnkCall,nnkCommand} but i wasn't sure you wanted both calls and commands.. |
09:44:05 | filwit | though i did choose the wrong one (nnkCall).. not sure why i did that |
09:44:50 | dom96 | filwit: You can do that, but I don't think I support nnkCall anywhere else. |
09:45:38 | filwit | okay well I'll just make it == nnkCommand then (to be consistent).. just support nnkCall later if it's requested i suppose |
09:46:16 | filwit | but with nkCommand, wont the first child always be nnkIdent? |
09:46:28 | filwit | i'm pretty sure it is.. cause that defines it's name |
09:46:35 | filwit | in fact I'm positive it is |
09:47:56 | dom96 | I added that as a response to an error |
09:48:03 | dom96 | perhaps I am being over cautious |
09:48:05 | filwit | even the `of nnkAsgn:` block I changed doesn't check for `if .kind == nnkIdent` in the original code |
09:48:08 | dom96 | but it doesn't hurt to leave it in |
09:48:43 | dom96 | gokr: yay :) |
09:59:49 | * | ddl_smurf joined #nim |
10:00:16 | filwit | shit i was trying to reset my Nim branch and accidentally reset my Aporia one :S |
10:00:32 | filwit | with --hard... |
10:00:50 | filwit | anyways to get back from that.. i forgot.. |
10:01:41 | * | vendethiel quit (Ping timeout: 250 seconds) |
10:02:18 | filwit | nevermind, i'll just repull that repo cause I'd already pushed those changes |
10:03:13 | * | synthmeat quit (Quit: WeeChat 1.2-rc2) |
10:03:36 | * | ddl_smurf quit (Client Quit) |
10:04:11 | * | the9to5 quit () |
10:04:20 | gokr | Woa! 500 open issues! Nice that I can push it down to 499 then ;) |
10:05:28 | * | synthmeat joined #nim |
10:07:22 | * | vendethiel joined #nim |
10:07:27 | gokr | I am such a github n00b. |
10:10:43 | coffeepot | I'm dreading setting up a github account to publish my sql server module for nim, never done any open source stuff before o_O |
10:11:37 | gokr | Its actually not that hard |
10:11:47 | gokr | Lots of guides to follow |
10:12:14 | coffeepot | I don't doubt it, it's more the fact that I've never published my code for all eyes to see! :D |
10:12:32 | gokr | Hehe, yeah |
10:12:51 | coffeepot | I'm sure if people are interested they'll give me some better ways to do stuff, I'm writing very 'simple' nim code, no macros, templates etc |
10:13:04 | gokr | coffeepot: Simple is good IMHO |
10:13:41 | coffeepot | I tend to agree, I'm impressed with some of the macro stuff, but I find it hard to get my head around. I'm getting there though, it's starting to make sense! |
10:14:21 | gokr | It does open up a lot of ways to evolve Nim. That doesn't mean everyone need to use them. |
10:14:25 | coffeepot | I just figure if there's a module for sql server it allows people like me who want to hack a script for work can do so with nim |
10:14:50 | gokr | Yup, those things are quite important. And often a brute of work. |
10:15:18 | coffeepot | I find templates particularly awesome because I've found that sometimes when you tell a language inline it has its own ideas! |
10:15:34 | gokr | Did you wrap something or did you write something directly to their protocol? |
10:16:15 | coffeepot | I'm using odbcsql.nim (yes, odbc is the preferred protocol to MSSQL, unless you use ADO.NET) |
10:16:34 | coffeepot | ODBC is awkward to work with. What I've got atm is quite different from the other higher level wrappers |
10:16:55 | coffeepot | for instance I'm using object variants to store data atm, whereas the other higher level modules use strings |
10:17:53 | coffeepot | so far I have queries running, fetching results. So, it's "usable" in the most basic sense. Am working on implementing parameters atm |
10:18:30 | * | gokr realizing I should add a test to my PR... |
10:18:51 | gokr | nice! |
10:19:23 | coffeepot | well, I hope so - only doing it when i have spare moments at work so it's going slowly but getting there! |
10:20:21 | coffeepot | wondering if I should use the `%` operator for parameters a la strutils |
10:20:31 | coffeepot | might be confusing tho |
10:29:24 | * | vendethiel quit (Ping timeout: 252 seconds) |
10:36:34 | * | the9to5 joined #nim |
10:37:03 | * | lyro joined #nim |
10:42:50 | * | the9to5 quit () |
10:43:44 | filwit | dom96: updated the Nim PR to only include the needed change: https://github.com/Araq/Nim/pull/2767 |
10:44:08 | dom96 | filwit: tested it? |
10:44:22 | Xaseron | how can i do a *2 increment in nim? like in c "for (int i = 1; i <= array.Length / 2 + 1; i *= 2)" |
10:44:23 | filwit | yeah |
10:44:31 | filwit | dom96: using the code in the PR |
10:44:45 | dom96 | filwit: Merged. |
10:44:54 | dom96 | filwit: have you tested whether discard await ... works? |
10:45:36 | filwit | no, which is stupid of me (not thinking well, been up all night) |
10:45:40 | filwit | let me test it real quick |
10:52:01 | * | Ven joined #nim |
10:54:26 | filwit | dom96: it works fine |
10:54:34 | dom96 | good |
10:54:59 | filwit | btw, why doesn't the {.async.} macro automatically convert the return type to Future[T]? |
10:55:00 | coffeepot | Xaseron can you do for i in countup(0, max, increment)? |
10:56:13 | coffeepot | sorry that's probably not what you want :/ |
10:56:41 | gokr | Xaseron: var a = [1,2,3,4,5,6] |
10:56:44 | gokr | Xaseron: for i in countup(1, a.len, 2): echo(a[i-1]); echo(a[i]) |
10:57:09 | gokr | But yeah, perhaps we have some other ... thing to use :) |
10:59:37 | Xaseron | hmm, perhaps i should use while loops instead |
10:59:51 | * | ddl_smurf joined #nim |
11:00:15 | coffeepot | doesn't countup work for what you want? |
11:02:03 | gokr | Oh... wait, *2? |
11:02:22 | * | gokr smacks forehead |
11:02:26 | dom96 | filwit: Because I opted for that to be explicit. |
11:03:05 | gokr | Xaseron: Make your own iterator |
11:04:05 | Xaseron | thats a good idea |
11:05:25 | * | boopisaway is now known as boop |
11:09:38 | * | coffeepot realises *2 not same as +1 :3 |
11:09:44 | coffeepot | +2 even lol |
11:10:29 | gokr | Xaseron: Something like: https://gist.github.com/gokr/a14df619dca672cdea8b |
11:10:53 | * | gokr and there I go back to work... |
11:11:10 | Xaseron | gokr: thx |
11:11:37 | gokr | Iterators are quite slick in Nim |
11:13:53 | pigmej | gokr: just like in python :-) |
11:14:28 | gokr | Well, in Nim they are inlined |
11:16:28 | gokr | But yes, similar to Python using yield etc. In Smalltalk we don't need that - we just use closures ;) |
11:17:47 | * | OnO joined #nim |
11:18:05 | * | synthmeat quit (Quit: WeeChat 1.3-dev) |
11:19:37 | * | synthmeat joined #nim |
11:21:52 | * | emilsp left #nim (#nim) |
11:37:00 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:49:47 | * | OnO quit (Quit: Textual IRC Client: www.textualapp.com) |
11:53:46 | * | OnO joined #nim |
11:57:02 | vikaton | BlaXpirit: does nimm-csfml accept mp3 files? |
11:58:46 | BlaXpirit | on |
11:58:47 | BlaXpirit | no |
11:58:58 | vikaton | o :( |
12:00:05 | * | Ven joined #nim |
12:04:42 | * | vendethiel joined #nim |
12:11:46 | * | dddddd joined #nim |
12:19:37 | * | OnO is now known as ono |
12:39:32 | * | Senketsu joined #nim |
12:40:39 | coffeepot | has anyone tried to build a windows service in Nim? Not sure where to start |
12:42:18 | BlaXpirit | yes, someone has tried |
12:43:37 | coffeepot | don't suppose they left some code breadcrumbs for me to pick through? |
12:48:12 | coffeepot | BlaXpirit, can you say who tried maybe? Perhaps they have a github or something I can look at |
12:48:38 | r-ku | coffeepot: all you need for windows service is msdn docs. its totally same as c api. |
12:48:48 | BlaXpirit | i dont remember, they gave up probably |
12:49:07 | coffeepot | ah okay... guess I'll be making a wrapper for that then somewhen! |
12:49:12 | coffeepot | :) |
12:50:00 | coffeepot | can't be that difficult (he says)... ! |
12:50:01 | r-ku | quite possibly some funcs wont be wrapped yes |
12:50:11 | r-ku | services are not difficult at all actually |
12:50:13 | * | vendethiel quit (Ping timeout: 264 seconds) |
12:50:18 | r-ku | just bit different entry point |
12:50:34 | r-ku | and installing procedure, but it depends if you do it yourself in code or use command line utils |
12:51:04 | coffeepot | I'd probably have command line to install/uninstall |
12:51:41 | r-ku | even less coding then :) |
12:52:11 | coffeepot | just looking at what's required in C/C++, doesn't look too bad. I suppose the main thing is the structure of the wrapper to make it nice to use |
12:53:49 | * | vendethiel joined #nim |
13:02:55 | * | yglukhov__ joined #nim |
13:05:18 | * | taesoo joined #nim |
13:06:36 | * | yglukhov_ quit (Ping timeout: 276 seconds) |
13:15:52 | * | vendethiel quit (Ping timeout: 252 seconds) |
13:21:56 | * | zaquest joined #nim |
13:26:17 | * | ono is now known as OnO |
13:28:41 | * | ingsoc quit (Quit: Leaving.) |
13:31:55 | * | darkf quit (Quit: Leaving) |
13:37:15 | * | intra joined #nim |
13:46:48 | * | BlaXpirit_ joined #nim |
13:46:48 | * | BlaXpirit quit (Killed (cameron.freenode.net (Nickname regained by services))) |
13:46:48 | * | BlaXpirit_ is now known as BlaXpirit |
13:47:58 | * | OnO is now known as ono |
13:48:57 | * | ono quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
13:50:49 | * | yglukhov__ quit (Remote host closed the connection) |
13:51:25 | * | yglukhov__ joined #nim |
13:54:58 | * | OnO joined #nim |
13:55:44 | * | taesoo quit (Ping timeout: 272 seconds) |
13:58:42 | * | vendethiel joined #nim |
13:59:30 | * | pregressive joined #nim |
14:18:01 | vikaton | does rand work now? |
14:24:07 | def- | vikaton: when did it not work? |
14:24:46 | vikaton | def-, I think i needed to import a lib from nimble |
14:24:56 | def- | import math |
14:25:26 | vikaton | BlaXpirit had a rand lib |
14:28:38 | def- | that seems to work for me |
14:32:41 | vikaton | math.random(4.0) |
14:32:47 | vikaton | gives the same number |
14:33:15 | Xaseron | vikaton: have you called randomize() before? |
14:34:26 | vikaton | ok |
14:34:31 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:40:42 | * | yymoto2 joined #nim |
14:41:31 | * | taesoo joined #nim |
14:45:10 | dtscode | dom96: Ping |
14:45:14 | * | vendethiel quit (Ping timeout: 245 seconds) |
14:45:16 | dom96 | dtscode: sup |
14:45:55 | dtscode | Do you still want me to report the bug even though filwit made a fix? |
14:52:04 | * | vendethiel joined #nim |
14:52:04 | dom96 | dtscode: nope |
14:53:35 | * | yymoto2 quit (Quit: leaving) |
14:53:55 | dtscode | Yay. Less work for me |
14:55:45 | * | yglukhov__ quit (Ping timeout: 256 seconds) |
14:59:33 | * | Perelandric joined #nim |
15:10:20 | * | bluenote_ joined #nim |
15:13:30 | * | vendethiel quit (Ping timeout: 265 seconds) |
15:15:16 | * | vendethiel joined #nim |
15:20:58 | * | gsingh93_ joined #nim |
15:29:29 | * | gokr quit (Quit: Leaving.) |
15:37:41 | * | vendethiel quit (Ping timeout: 256 seconds) |
15:44:17 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
15:51:52 | * | taesoo quit (Ping timeout: 255 seconds) |
15:59:06 | * | milosn quit (Quit: leaving) |
16:00:14 | * | xender left #nim ("WeeChat 1.0") |
16:08:05 | * | Ven joined #nim |
16:09:03 | * | gokr_ joined #nim |
16:09:55 | * | gokr joined #nim |
16:10:32 | * | vikaton quit () |
16:12:54 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:13:08 | * | xificurC quit (Quit: WeeChat 1.1.1) |
16:24:25 | * | endragor quit (Ping timeout: 264 seconds) |
16:25:25 | * | OnO joined #nim |
16:26:17 | * | synthmeat quit (Quit: WeeChat 1.3-dev) |
16:28:16 | * | synthmeat joined #nim |
16:37:02 | * | endragor joined #nim |
16:44:23 | bluenote_ | dom96: by the way, at first I had exactly the same concern like you regarding none/some, i.e., I was favoring a symmetric function signature |
16:44:40 | bluenote_ | but the assymmetric function signature leads to more symmetry on call site |
16:44:46 | bluenote_ | so I changed my mind |
16:45:51 | bluenote_ | I now have code where I have e.g. `shader: Shader` and it looks pretty nice to have `some(shader)` or `none(Shader)` |
16:46:47 | bluenote_ | do I understand you correctly: using typedesc as a parameter is not discouraged per se? |
16:50:20 | * | filwit quit (Quit: Leaving) |
16:51:29 | * | vendethiel joined #nim |
16:53:27 | dom96 | bluenote_: no idea |
16:53:37 | dom96 | Araq needs to clarify. |
16:54:15 | * | jbomo joined #nim |
16:55:15 | bluenote_ | ok, than I just might have read too much into your comment |
16:55:37 | * | keypusher quit (Remote host closed the connection) |
16:56:06 | * | keypusher joined #nim |
16:56:28 | * | xyz_ joined #nim |
16:58:14 | * | Ven is now known as Guest24686 |
17:00:18 | * | gokr quit (Quit: Leaving.) |
17:00:49 | * | Guest24686 is now known as Ven_ |
17:07:02 | * | brson joined #nim |
17:11:45 | * | endragor quit (Remote host closed the connection) |
17:13:28 | * | vendethiel quit (Ping timeout: 252 seconds) |
17:18:16 | * | vendethiel joined #nim |
17:20:34 | * | Jesin quit (Quit: Leaving) |
17:24:26 | * | Jesin joined #nim |
17:34:12 | * | ddl_smurf quit (Quit: ddl_smurf) |
17:34:50 | * | gsingh93_ quit (Ping timeout: 256 seconds) |
17:37:02 | * | taesoo joined #nim |
17:41:53 | * | vendethiel quit (Ping timeout: 264 seconds) |
17:43:45 | * | vendethiel joined #nim |
17:46:54 | * | gokr_ quit (Ping timeout: 245 seconds) |
17:53:25 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:55:20 | * | milosn joined #nim |
17:57:25 | * | gokr_ joined #nim |
18:02:04 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
18:05:34 | * | vendethiel quit (Ping timeout: 265 seconds) |
18:09:15 | * | zahary joined #nim |
18:12:31 | * | filcuc joined #nim |
18:16:54 | * | NhanH quit () |
18:17:03 | * | NhanH joined #nim |
18:23:36 | * | xyz_ quit (Quit: Konversation terminated!) |
18:25:58 | * | vendethiel joined #nim |
18:26:41 | * | filcuc quit (Ping timeout: 246 seconds) |
18:39:01 | * | themagician joined #nim |
18:41:21 | * | fizzbooze joined #nim |
18:52:03 | * | Climenty joined #nim |
18:52:53 | * | notfowl is now known as fowl |
18:54:52 | * | bluenote_ quit (Ping timeout: 246 seconds) |
19:02:07 | * | boydgreenfield joined #nim |
19:18:04 | * | filcuc joined #nim |
19:25:14 | * | dddddd quit (Ping timeout: 245 seconds) |
19:27:55 | * | vikaton joined #nim |
19:28:10 | vikaton | Err, is Nimble not included in the Nim tarball? |
19:34:25 | BlaXpirit | nnope |
19:35:01 | ldlework | hi BlaXpirit |
19:35:06 | BlaXpirit | hi |
19:49:10 | * | boydgreenfield quit (Quit: boydgreenfield) |
19:49:35 | * | fizzbooze quit (Ping timeout: 276 seconds) |
19:56:34 | * | boydgreenfield joined #nim |
20:03:12 | * | flaviu quit (Read error: Connection reset by peer) |
20:04:09 | vikaton | BlaXpirit: How can I get nimble then? |
20:04:28 | def- | Windows download here: https://github.com/nim-lang/nimble/releases |
20:04:33 | def- | Instructions here: https://github.com/nim-lang/nimble |
20:04:45 | vikaton | for Linux |
20:05:08 | dtscode | https://github.com/nim-lang/nimble |
20:05:17 | vikaton | thanks both of u |
20:07:03 | vikaton | should I then add .nimble/bin to my PATH ? |
20:07:41 | def- | yes |
20:07:59 | def- | then all binary packages you install with nimble will be available automatically (and nimble itself) |
20:08:57 | vikaton | thanks |
20:09:48 | def- | It would probably be nicer if nimble came bundled with nim |
20:10:52 | ldlework | or if we had packages for the popular distros |
20:13:19 | pigmej | def-: I'm not sure if package manager should be bundled with language |
20:14:12 | def- | pigmej: everywhere I installed nim I also installed nimble. would be more convenient for me |
20:14:26 | pigmej | def-: yeah, but what about weird python situation ? |
20:14:48 | pigmej | where once you had 3 competiting 'managers' + default one which was not used at most scenarios |
20:14:56 | ldlework | 3? |
20:15:15 | def- | our community isn't that big. we should improve nimble instead of starting our own managers |
20:15:18 | pigmej | ldlework: probably even more... there was a time when there was a fork of fork which was a fork |
20:15:31 | dtscode | I was going to make a repo for ubuntu for nimble and nim |
20:15:31 | ldlework | If I remember setuptools, got forked into distutils (which was eventually merged) which was then forked to distribute (which was eventually merged) |
20:15:37 | ldlework | It sounds exactly how it should work |
20:15:48 | ldlework | the community extends standard features until they are incorporated first class |
20:15:53 | pigmej | ldlework: what about distutils2 ? |
20:16:07 | ldlework | Right, that would be the next step |
20:16:13 | ldlework | there will always be community extension |
20:16:28 | pigmej | ldlework: my point was that this python situation was quite weird |
20:16:48 | pigmej | where one 'idea' was having compatibility layer with other 'just because' |
20:16:51 | ldlework | pigmej: Right, I don't know why it is supposed to be wierd and not 'exactly what you want' |
20:16:51 | pigmej | etc |
20:17:00 | ldlework | pigmej: to support migration of production systems? |
20:17:06 | fowl | We don't have competing package managers though, nimble is supported in the compiler |
20:17:06 | ldlework | IE backwards compatible |
20:17:10 | pigmej | ldlework: sure, but look from other way |
20:17:23 | ldlework | pigmej: I think you're being dramatic |
20:17:34 | pigmej | well, for me python2 vs python3 is dramatic ;-) |
20:17:42 | ldlework | Sure but that's entirely irrelevant |
20:18:25 | pigmej | ldlework: yeah this one, but ... |
20:19:34 | ekarlso | nimble is meh... |
20:19:40 | ekarlso | get me a regsitry -,,- |
20:19:40 | vikaton | nimble is nice |
20:19:45 | Climenty | It is really nice, that "nimbled" packages in my home directory automatically picks by compiler. |
20:19:47 | ekarlso | then it's more fun :) |
20:19:58 | def- | ekarlso: what's a registry? |
20:20:20 | ekarlso | def-: uhm, something like I started on def- like crates.io for nim |
20:20:22 | pigmej | I mean... for me, nimble should be separated (in the same way as pip is not included with python, same as hex is not a part of elixir, rebar3 is not a part of erlang etc) |
20:20:52 | Climenty | And nimble is just one file. |
20:21:17 | ldlework | ekarlso: that's just a web-frontend to Cargo |
20:21:31 | ekarlso | ldlework: uh, it's more like pypi actually :) |
20:21:51 | ldlework | that's ... what I'm saying? |
20:21:54 | * | vikaton quit () |
20:21:55 | jackv | https://aur.archlinux.org/packages/nimble-git/ |
20:21:57 | ekarlso | ldlework: yeh ;p |
20:22:01 | ldlework | ekarlso: ...? |
20:22:02 | jackv | why I love arch |
20:22:14 | ekarlso | ldlework: I allmost had registry support done in nimble btw :) |
20:22:27 | ekarlso | would allow you to push new versions via a REST api etc |
20:22:42 | ldlework | ekarlso: ah you're saying a service instead of a file inside of a git repo |
20:22:49 | ekarlso | ldlework: yeah.. |
20:22:56 | ekarlso | that's what crates.io is.. |
20:23:10 | ldlework | ekarlso: I just remembered that all nimble uses is a flat file |
20:23:13 | fowl | ekarlso: that would be great |
20:23:44 | ekarlso | https://github.com/ekarlso/nimble/tree/registry < has some of it |
20:24:05 | ekarlso | and https://github.com/ekarlso/nim-packages |
20:24:24 | * | Matthias247 joined #nim |
20:36:55 | gokr_ | idiotic question: what are the advantages compared to single file? |
20:37:14 | dtscode | advantages of what? |
20:37:29 | pigmej | gokr_: what if there will be a lot of packages ? |
20:37:43 | fowl | gokr_: merging PRs is not fun |
20:38:27 | fowl | There's an open PR that I didn't merge yet because I have to do it manually |
20:38:36 | fowl | Well. I didn't check if its still open today |
20:51:20 | pigmej | ekarlso: that registry looks quite cool ;) |
20:54:52 | * | filcuc_ joined #nim |
20:55:13 | * | filcuc quit (Ping timeout: 265 seconds) |
20:55:41 | * | Kingsquee joined #nim |
20:56:32 | ekarlso | gokr_: programmatic access? easier to publish libraries ? |
20:57:25 | ekarlso | gokr_: if you have libraries you could set it up so that when you push a release tag CI builds / tests it and has nimble autopublish it to the registry |
20:59:49 | * | taesoo quit (Ping timeout: 264 seconds) |
21:07:32 | * | intra quit (Ping timeout: 272 seconds) |
21:10:53 | * | n1ftyn8 quit () |
21:11:04 | * | n1ftyn8 joined #nim |
21:14:25 | * | vikaton joined #nim |
21:22:05 | * | Matthias247 quit (Read error: Connection reset by peer) |
21:22:13 | * | filcuc_ quit (Ping timeout: 256 seconds) |
21:23:10 | * | gokr joined #nim |
21:33:24 | gokr | ekarlso: Just for the record - I know quite a bit about package managers - since I wrote the first one for Squeak - SqueakMap. |
21:33:56 | * | Mat4-coding joined #nim |
21:33:58 | Mat4-coding | hello |
21:34:00 | * | Matthias247 joined #nim |
21:34:24 | gokr | The idea with SqueakMap was to have the full "map" in a Smalltalk domain model inside your image. So that you could query it using Smalltalk. |
21:35:16 | gokr | So the single master copy is hosted on a server - and it has a web UI to modify it. The map has much more than packages though, it also has accounts, co-maintained packages, releases etc etc |
21:36:08 | gokr | But the nice thing with SqueakMap was the fact that the whole map is downloaded in a serialized form and then deserialized into the Smalltalk image. |
21:36:40 | Mat4-coding | so this is some kind of compression |
21:37:15 | * | BlaXpirit left #nim ("Quit Konversation") |
21:37:45 | * | banister joined #nim |
21:38:45 | gokr | But it was a fairly complex piece of code, and I like the simplicity of nimble. Instead of making an advanced web UI to manipulate some database - and then spend a lot of time making a REST ful API to query it etc... I would perhaps experiment with a "federated" model instead. So why not have a "master list" of URLs, like now in git. Each URL points to a partial JSON file with packages, and has a person associated with that URL. |
21:39:23 | gokr | Just a thought. |
21:42:16 | dom96 | gokr: You mean a master list of URLs pointing to different packages.json files? |
21:42:24 | gokr | Yeah |
21:42:31 | dom96 | others have suggested that as well |
21:42:43 | dom96 | it's a nice idea |
21:42:55 | gokr | So one main use case for that: Public repo and "company wide" repo and even "personal repo". |
21:43:53 | gokr | One thing I like with Nimble compared to many other systems - is that its dead simple. |
21:44:05 | dom96 | It will be more difficult to control package name conflicts that way though. |
21:44:40 | ZZZZZZZZZ | require some prefix per creator or something |
21:44:43 | dom96 | gokr: I'm glad you like it. |
21:45:30 | gokr | I do. I also like Lunar Linux with its similarly dead simple system with metadata textfiles in a directory tree. |
21:45:55 | gokr | I really should help out with it. |
21:47:09 | gokr | Regarding package name conflicts - I would just make sure that nimble can use some kind of "prefix" when a duplicate name is discovered. |
21:48:13 | gokr | Btw, one thing SqueakMap did was to actually cache the contents of the actual package URL on the SqueakMap server. |
21:48:18 | ZZZZZZZZZ | it would be consitant with the import syntax in nim |
21:48:24 | ZZZZZZZZZ | consitatn |
21:48:27 | ZZZZZZZZZ | * |
21:48:40 | gokr | So when some package after a year or so - falls off the internet - then the SqueakMap server would have a backup copy. |
21:50:03 | * | intra joined #nim |
21:50:27 | * | BlaXpirit joined #nim |
21:54:26 | gokr | dom96: Is there some support in nimble for... having a "per project" env? |
21:54:44 | gokr | You know like... bundler or what the heck its called in Ruby. |
21:54:53 | * | boop is now known as boopisaway |
21:55:46 | dom96 | gokr: Could you elaborate a bit on what you mean by that? |
21:56:02 | gokr | I wouldn't create a separate tool for it - just make nimble be able to a) have different "homes" and b) take some list of packages to install/update |
21:56:56 | gokr | So with bundler you basically have your ruby project - and in that dir you have a file where you list all your dependencies that this projects wants. And then you run bundler some-command and it sucks it all down - but... just for that project - not globally. |
21:57:00 | gokr | IIRC |
21:57:11 | gokr | Some Ruby fella can probably put me straight. |
21:57:57 | fowl | Gokr Bundler is used like that because gem can't support multiple versions of the same package installed |
21:58:10 | dom96 | I don't think this is really needed for nimble. |
21:58:15 | gokr | Mmm, good point |
21:59:14 | * | gsingh93_ joined #nim |
21:59:25 | dom96 | After looking at Rust's Cargo, I think it may be a good idea to implement a dependency locking mechanism. |
22:05:00 | gokr | I would also consider adding say .. email to the package metadata |
22:05:22 | dom96 | That's part of the author metadata. |
22:05:28 | gokr | Hum... |
22:05:31 | dom96 | But I need to document that |
22:07:30 | * | endou_________ quit () |
22:07:44 | * | endou_________ joined #nim |
22:08:52 | * | pregressive quit (Remote host closed the connection) |
22:08:53 | * | vendethiel quit (Ping timeout: 264 seconds) |
22:08:59 | gokr | Ok, so... yes, its in the nimble file - but not in packages.json |
22:09:07 | gokr | The author I mean |
22:09:58 | gokr | So author can be like "Göran Krampe <[email protected]>" I suppose? |
22:14:45 | dom96 | yes |
22:17:05 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:20:07 | vikaton | whats wrong with this C FFI? |
22:20:15 | vikaton | https://www.irccloud.com/pastebin/XuD1bcKS |
22:21:43 | fowl | vikaton, array and x params are both int32 proc itoa(f: char, array, x: int32) |
22:22:05 | fowl | plus array is probably a reserved identifier |
22:22:47 | vikaton | fowl, I get test.nim(7, 13) Error: expression 'itoa('A', x, 2)' has no type (or is ambiguous) |
22:22:57 | vikaton | after I fix the array param that i did by accident |
22:23:00 | fowl | that is also true |
22:23:02 | fowl | it doesnt return anything |
22:23:52 | reactormonk | vikaton, why the varargs? |
22:24:05 | vikaton | reactormonk: Its on the front page of Nim |
22:24:25 | reactormonk | vikaton, yes, but that's for scanf. |
22:24:40 | reactormonk | varargs does exactly what you expect it to do. |
22:25:41 | * | Trustable quit (Remote host closed the connection) |
22:25:50 | reactormonk | vikaton, the signature you want is proc (input: int, str: cstring, radix: int) |
22:26:05 | reactormonk | without the varargs pargma, but with the rest |
22:26:14 | reactormonk | no need for int32 IIRC |
22:26:52 | fowl | int might by 8 bytes |
22:27:22 | reactormonk | don't hold me on the int32, not sure about that one |
22:27:24 | vikaton | still get a ambigious type error |
22:27:34 | reactormonk | code plz |
22:27:46 | fowl | vikaton, if you have a function that doesnt return anything, how can you set its return value (nothing) to a variable |
22:28:34 | vikaton | ohh i forgot |
22:29:19 | reactormonk | vikaton, so it works? |
22:29:47 | vikaton | almost |
22:29:48 | * | Mat4-coding quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
22:29:49 | vikaton | code: |
22:29:51 | vikaton | https://www.irccloud.com/pastebin/zn9Tv4jk |
22:31:10 | dom96 | remove the = at the end of the first line |
22:31:20 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:31:51 | vikaton | finally worked |
22:31:59 | vikaton | thanks dom96, reactormonk and fowl :P |
22:32:03 | vikaton | had to chnage echo too |
22:32:45 | fowl | those ints should be "cint" |
22:32:57 | fowl | thats "c's int" |
22:36:45 | * | Sembei joined #nim |
22:37:55 | gokr | dom96: So nimble does read ~/.config/nimble/nimble.ini - if I have it. It could also check in $PWD ... or git toplevel. That would create "per project nimble", right? |
22:38:59 | dom96 | gokr: not really. It would need to look for ~/.nimble/ in your $PWD |
22:39:11 | dom96 | I don't understand why you would want that though. |
22:39:26 | gokr | the idea being that I can have a fully local "nimble" in a project |
22:41:09 | * | Deesleexia joined #nim |
22:46:36 | * | TEttinger quit (Ping timeout: 258 seconds) |
22:47:32 | dom96 | gokr: why would you want that? |
22:47:36 | def- | gokr: that's the hack Haskell's package manager uses because of dependency hell. do we really need that? |
22:48:04 | gokr | To me it seems fairly reasonable to be able to have a fully isolated project environment. |
22:48:06 | * | BlaXpirit quit (Quit: Quit Konversation) |
22:48:30 | gokr | But sure, I can use docker or whatever to achieve it |
22:48:38 | def- | gokr: in that case I would just manually add the libraries I depend on and add their local paths to a nim.cfg |
22:49:26 | * | Deesleexia left #nim (#nim) |
22:49:47 | gokr | For example, I just read that nim will only use the latest version when compiling. |
22:50:05 | gokr | So if one project needs an older version of package X - it gets complicated. |
22:50:10 | gokr | Or? |
22:52:06 | gokr | Using Smalltalk I really appreciate the fact that I can have a fully isolated env in a directory. Things doesn't break because I update some library in another project. |
22:52:39 | Climenty | Or you can put the project somewhere and create symlink to home .nimble. And change symlinks for different projects. Just weird idea :) |
22:53:22 | gokr | Ok, time to sleep. Fun codebase though, I like reading it |
22:55:16 | dom96 | I think most people don't realise that Nimble sorts about the dependencies for you. |
22:55:27 | dom96 | s/about/out/ |
22:57:48 | gokr | I do |
22:58:18 | gokr | But as I said - your doc says nim will only use the latest when compiling. |
23:05:49 | * | BitPuffin|osx joined #nim |
23:07:53 | fowl | the isolation can be nice |
23:08:06 | dom96 | nim will |
23:08:14 | dom96 | doesn't mean you have to use nim |
23:09:54 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:11:31 | * | zahary quit (Ping timeout: 265 seconds) |
23:15:25 | * | sdw_ joined #nim |
23:18:09 | * | sdw quit (Ping timeout: 250 seconds) |
23:25:34 | fowl | dom96, oh you mean nimble emits --path".." for each used package? |
23:25:43 | dom96 | yes |
23:26:40 | fowl | it may be useful to have an isolate command that makes a nim.cfg for the packages isolated. not sure its really necessary though because bundler wouldn't exist if rubygems worked with multiple packages |