00:04:45 | vikaton | why am I getting an expected except error here when there is one? |
00:04:48 | vikaton | https://www.irccloud.com/pastebin/7gEN43Dj/ |
00:07:25 | Varriount | vikaton: Huh? |
00:07:51 | Varriount | vikaton: I need to see more of your code, and are you sure you phrased that question correctly? |
00:07:56 | vikaton | Varriount: I get an error "expected "except" |
00:08:16 | vikaton | when there is an except* |
00:08:46 | vikaton | https://www.irccloud.com/pastebin/m6j4j56t/ |
00:08:50 | vikaton | Varriount: ^ |
00:10:43 | * | fioco joined #nim |
00:10:52 | fioco | I need help with the net lib |
00:11:45 | fioco | net.nim(520) SIGSEGV Attempt to read from nil?) |
00:12:06 | fioco | **net.nim(520) SIGSEGVm Illegal Storage Access (Attempt to read from nil?) |
00:12:52 | fioco | s.connect(url, port) |
00:12:52 | fioco | Code ^^ port is a Net.Port and URL is a string containg google.com |
00:12:55 | Varriount | vikaton: I don't even know how that works. 'str' isn't a real procedure, and you have a command between "$1 $2" and '% [command, chr * len]' |
00:13:07 | Varriount | fioco: Is that all your code? |
00:13:23 | fioco | The related code, yes |
00:13:41 | Varriount | fioco: Are you initializing all your variables properly? It looks like 's' is nil (not initialized) |
00:13:53 | fioco | Oh |
00:13:58 | fioco | How do initialize s? |
00:14:02 | Varriount | fioco: It would help if you gist'd all your code. |
00:14:18 | fioco | Fine.... I actually don't mind, just annoying |
00:15:35 | vikaton | Varriount: you know how "h"*3 prints out "hhh" in pythion? |
00:15:39 | vikaton | python* |
00:16:07 | fioco | Wait |
00:16:11 | fioco | NVM |
00:16:20 | fioco | Just needed = newSocket() |
00:16:21 | fioco | Thanks! |
00:17:15 | Varriount | vikaton: Except that Nim isn't Python. |
00:17:34 | vikaton | Varriount I was about to ask u the best alternative |
00:18:40 | Varriount | vikaton: First off, you need to parse 'len' into an integer. It's only a string. |
00:18:50 | Varriount | You can't multiply a string * string |
00:20:07 | * | dhasenan left #nim (#nim) |
00:21:20 | vikaton | that code is a bit messed up rn |
00:21:43 | vikaton | Varriount: but how do I convert a TaintedString to an int? |
00:23:25 | Varriount | vikaton: strutils.parseInt, or parseUtils.parseInt |
00:23:35 | Varriount | vikaton: Here's a syntactically correct file - https://gist.github.com/Varriount/1e6f9d2011325fc891e8 |
00:28:27 | * | boop is now known as boopisaway |
00:31:51 | fioco | s.connect("google.com", net.Port(80)) <- I have that and I get a timeout on s.readLine(line, 10000) with s being a socket and line a string.... suggestions? |
00:32:35 | notfowl | I thought that str*int works now |
00:32:52 | fioco | And I just tried www.google.com, same error |
00:33:33 | vikaton | notfowl: I used https://nim-by-example.github.io/procs/ |
00:34:02 | vikaton | fioco, do you know the af: Domain part is? |
00:34:15 | fioco | ?? |
00:34:18 | fioco | Apparently not |
00:34:38 | vikaton | neither do I |
00:34:46 | vikaton | I was asking u for help lol |
00:34:53 | fioco | XD |
00:35:11 | Varriount | Hm. |
00:35:17 | * | Kingsquee joined #nim |
00:35:29 | fioco | I need that socket to download doogle :c |
00:36:09 | Varriount | fioco: Well, we do have an httpclient module and asyncnet meant for this stuff, but I want to figure out why that doesn't work. |
00:36:31 | fioco | Yeah |
00:36:38 | fioco | Should I try running as admin? |
00:36:42 | fioco | I'm on windows |
00:36:52 | fioco | The OS could not be handling the connection but IDK |
00:37:00 | Varriount | fioco: What about firewall? |
00:37:15 | fioco | And I did initialize s with newSocket() |
00:38:31 | * | Etheco joined #nim |
00:39:23 | Etheco | Hey, is there a proc to sort of debug a entire object? like in php i can do var_dump to see entire contents |
00:40:24 | * | fioco is now known as toadest |
00:40:48 | Varriount | Etheco: repr() |
00:41:04 | Varriount | Etheco: Or rather, echo repr(my_object) |
00:41:17 | Etheco | sweet, thanks :) |
00:42:40 | Varriount | toadest: Can I see all your code? |
00:42:48 | Etheco | that makes debugging much nicer, thanks Varriount |
00:43:05 | Varriount | Etheco: Nim is also gdb compatible. |
00:43:27 | toadest | Sure Varriount |
00:43:31 | toadest | Let me use git though |
00:43:39 | * | toadest is now known as fioco |
00:43:48 | Etheco | Varriount, Will look that up thanks. |
00:44:15 | Varriount | Etheco: I can't remember if extra command line options are needed for gdb though... |
00:45:18 | Varriount | Etheco: Ah, for GDB, you need '--debuginfo --linedir:on' |
00:45:51 | Etheco | Varriount, okie nice, will have to make a custom command for Aporia maybe. |
00:47:04 | fioco | Varriount: Sorry |
00:47:10 | fioco | for taking so long |
00:47:20 | fioco | Not used to Git on Windoze :p |
00:47:32 | Varriount | fioco: You could just use gist.github.com |
00:47:47 | fioco | Its multifile |
00:47:58 | Varriount | Gist supports more than one file. |
00:48:03 | fioco | Reall? |
00:48:09 | fioco | *Really |
00:48:18 | Varriount | Yes. And you can drag files from explorer to the webpage to upload them too. |
00:48:19 | fioco | But I would need to copy and paste it all |
00:48:24 | fioco | Okay |
00:48:26 | fioco | Doing that |
00:48:52 | vikaton | Varriount: is that a bug? |
00:49:02 | Varriount | vikaton: Is what a bug? |
00:49:30 | vikaton | Varriount: the try and except error went away after i fixed an issue inside it |
00:49:46 | vikaton | but that error message was not helpful at all |
00:50:25 | Varriount | vikaton: I got an ill-formed AST error. |
00:50:44 | fioco | https://gist.github.com/toad1359/e3c9307c2b068e2bbc35 |
00:50:49 | fioco | Thanks Varriount! |
00:50:59 | vikaton | Varriount: both of which are irrelevant? |
00:51:41 | vikaton | Varriount: if u compile this, its an "expected "except"" error |
00:51:44 | vikaton | http://pastebin.com/dEmG2tDp |
00:54:53 | * | bhishma quit (Ping timeout: 265 seconds) |
00:54:53 | * | Jesin joined #nim |
00:57:12 | * | ddl_smurf quit (Quit: ddl_smurf) |
00:58:38 | Varriount | fioco: My first guess is that you're being redirected to https://google.com |
00:59:46 | Varriount | fioco: Although, hm. You're connecting to port 80 |
00:59:53 | fioco | Yeah |
00:59:56 | fioco | I tried with www. |
01:00:00 | fioco | And without |
01:02:09 | pigmej | fioco: you have to send request first |
01:02:21 | pigmej | just opening socket wouldnt make respose |
01:02:22 | fioco | What do you mean? |
01:02:26 | fioco | Ok |
01:02:29 | fioco | So what do I send? |
01:02:34 | Varriount | fioco: Look at the http protocol |
01:02:42 | pigmej | http things |
01:02:44 | fioco | Ok |
01:02:46 | Varriount | fioco: You would probably be better off using httpclient module. |
01:02:58 | fioco | Nah |
01:03:00 | fioco | I cant |
01:03:15 | Varriount | Why not? |
01:03:23 | fioco | I'm building a web browser and that doesnt keep the connection open |
01:03:31 | fioco | It runs server sent nim code |
01:03:42 | fioco | (In a sandbox, yet to implement) |
01:03:55 | pigmej | a webbrowser witoout HTTP proto knowlegde? |
01:04:13 | fioco | Its a learning exdperience |
01:04:18 | Varriount | pigmej: We all have to start somewhere. |
01:04:27 | pigmej | yeah sure |
01:04:33 | pigmej | fioco: you need send something like |
01:04:48 | pigmej | GET / HTTP/1.1 |
01:04:58 | pigmej | HOST: google.com |
01:05:01 | fioco | yeah |
01:05:01 | pigmej | wrr |
01:05:07 | fioco | Just found that |
01:05:07 | Varriount | http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Client_request |
01:05:07 | pigmej | you can do it :) |
01:05:24 | Varriount | handling basic http stuff isn't too hard. |
01:05:26 | pigmej | fioco: but for parsing it will be different fun |
01:05:26 | pigmej | ;D |
01:05:39 | pigmej | Varriount: headers are stupid |
01:05:44 | fioco | Yep |
01:05:52 | fioco | Varriount: Already there ;) |
01:06:00 | pigmej | fioco: there should be some http parser in nim |
01:06:05 | pigmej | I saw one |
01:06:07 | Varriount | pigmej: regexes as far as the eye can see! |
01:06:24 | pigmej | Varriount: regex will not all cases |
01:06:34 | pigmej | ie. Accept header |
01:06:44 | fioco | pigmej I'm using a custom tag |
01:06:48 | Varriount | pigmej: I know. I was being facetious. |
01:06:58 | fioco | And I don't want to modify other's code |
01:06:58 | pigmej | fioco: yeah but you still need to parse/write headers |
01:07:04 | pigmej | (http headers) |
01:07:08 | fioco | (From the standard lib) |
01:07:12 | fioco | Yeah |
01:07:37 | pigmej | fioco: http://nim-lang.org/docs/joyent_http_parser.html |
01:07:54 | pigmej | that's one of the best http parsers available on the free market :) |
01:08:04 | fioco | Thanks |
01:08:25 | fioco | But again, I need to parse a custom tag |
01:08:38 | * | datanoise joined #nim |
01:13:35 | pigmej | fioco: it's not html parser but HTTP parser ;) |
01:13:39 | pigmej | those are different things |
01:20:02 | vikaton | Varriount: that script was a TCP fuzzer btw |
01:22:54 | * | jaco60 quit (Ping timeout: 256 seconds) |
01:27:55 | * | Triplefox quit (Ping timeout: 278 seconds) |
01:29:03 | * | Triplefox joined #nim |
01:30:17 | * | gokr quit (Ping timeout: 264 seconds) |
01:32:04 | * | skyfex_ joined #nim |
01:36:30 | * | skyfex_ quit (Ping timeout: 256 seconds) |
01:38:12 | onionhammer | @varriount: Stopped at check 1 |
01:41:56 | * | fioco quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
01:47:30 | * | fioco joined #nim |
01:48:17 | fioco | Pigmej sorry |
01:48:20 | fioco | You're correct |
01:49:22 | * | fioco_ joined #nim |
01:49:36 | fioco_ | Dang Internet |
01:49:49 | fioco_ | Might join leave 1 more time |
01:52:26 | pigmej | reactormonk: are you still online? |
01:53:30 | * | fioco quit (Ping timeout: 256 seconds) |
01:53:49 | * | dddddd quit (Ping timeout: 264 seconds) |
01:54:43 | * | fioco joined #nim |
01:54:47 | fioco | Sorry |
01:56:20 | * | fioco_ quit (Ping timeout: 256 seconds) |
01:58:31 | HOLYCOWBATMAN | https://github.com/h2o/picohttpparser this one is way faster |
01:59:52 | pigmej | HOLYCOWBATMAN: does it have nim bindings ? |
02:00:01 | pigmej | fioco: I was right about what / |
02:00:02 | pigmej | ? |
02:00:02 | HOLYCOWBATMAN | probably not :D |
02:00:28 | HOLYCOWBATMAN | its pretty new too with the whole h2o http lib |
02:00:34 | HOLYCOWBATMAN | lib / httpd |
02:00:53 | HOLYCOWBATMAN | with http2 support |
02:01:27 | HOLYCOWBATMAN | i will probably look at it for my next nim project |
02:01:37 | HOLYCOWBATMAN | if i can wrap some of it |
02:02:29 | fioco | Pigmej HTTP vs html |
02:02:36 | fioco | I was confused |
02:02:48 | fioco | And that I needed a http request |
02:03:06 | fioco | C2nim much, holy cow batman? |
02:04:00 | HOLYCOWBATMAN | i still havent used it lol, every library i needed was already wrapped, or i hand wrapped the part i needed. |
02:04:48 | HOLYCOWBATMAN | nim is win! |
02:04:51 | HOLYCOWBATMAN | <3 |
02:04:53 | fioco | Mhm |
02:16:06 | * | fioco quit (Remote host closed the connection) |
02:27:41 | * | filwit quit (Quit: Leaving) |
02:48:06 | * | JinShil quit (Ping timeout: 244 seconds) |
02:56:58 | * | JinShil joined #nim |
02:59:31 | * | fioco joined #nim |
02:59:40 | fioco | pigmej: Mind helping my http out? |
03:01:17 | reactormonk | pigmej, kinda, not really |
03:02:59 | reactormonk | pigmej, looks good, mind a PR or should I just pull it over? |
03:04:38 | reactormonk | pigmej, git merge -s ours reactormonk/epc |
03:07:27 | fioco | Anyone mind helping me with my nim sockets? |
03:21:01 | * | skyfex_ joined #nim |
03:25:37 | * | skyfex_ quit (Ping timeout: 265 seconds) |
03:26:33 | * | darkf joined #nim |
03:27:18 | * | dhasenan joined #nim |
04:05:19 | Varriount | fioco: You could consider improving the existing httpclient... |
04:05:42 | fioco | I could |
04:10:55 | Varriount | onionhammer: The the debug output contain "DocComment activated on view" and/or "DocComment active"? Were there any warnings in the debug console about settings not being found? |
04:17:48 | * | noneofmynickswor quit (Ping timeout: 272 seconds) |
04:24:06 | fioco | Does anyone have a SDL ttf example? |
04:24:18 | fioco | My code compiles, but does not display |
04:26:48 | * | vendethiel joined #nim |
04:55:40 | * | pregressive joined #nim |
04:58:09 | * | Senketsu joined #nim |
05:09:38 | * | vikaton quit (Quit: Connection closed for inactivity) |
05:09:52 | * | skyfex_ joined #nim |
05:13:32 | * | noneofmynickswor joined #nim |
05:14:22 | * | skyfex_ quit (Ping timeout: 265 seconds) |
05:17:56 | * | noneofmynickswor quit (Ping timeout: 244 seconds) |
05:22:53 | * | pregressive quit (Remote host closed the connection) |
05:47:09 | * | vendethiel quit (Ping timeout: 250 seconds) |
06:15:04 | * | Senketsu quit (Quit: Leaving) |
06:29:35 | * | fioco quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
06:43:09 | wb | Is there a good reason for the special implementation of `^` in the stdlib instead of just |
06:43:10 | wb | template `^`*(x,y) = pow(x,y) |
06:58:43 | * | skyfex_ joined #nim |
07:03:44 | * | skyfex_ quit (Ping timeout: 272 seconds) |
07:04:00 | * | vendethiel joined #nim |
07:10:21 | * | ChrisMAN quit (Ping timeout: 258 seconds) |
07:33:15 | Varriount | wb: For string slicing, I think. |
07:36:02 | * | gokr joined #nim |
07:38:09 | * | BitPuffin|osx quit (Ping timeout: 245 seconds) |
07:44:22 | * | OnO joined #nim |
07:45:54 | * | vendethiel quit (Ping timeout: 252 seconds) |
07:46:11 | * | vendethiel joined #nim |
07:54:56 | wb | String slicing? the sanity check in the current version checks if y's < 0, which means coders have to distinguish between 5^(3) and 5^(-3), since the second one won't compile and has to be written pow(5,-3). |
08:01:02 | * | OnO_ joined #nim |
08:01:04 | * | OnO quit (Read error: Connection reset by peer) |
08:02:03 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
08:05:32 | * | Ven joined #nim |
08:06:12 | * | strcmp1 quit (Remote host closed the connection) |
08:06:34 | * | IronY left #nim ("Leaving") |
08:16:45 | * | ddl_smurf joined #nim |
08:23:04 | * | Arrrr joined #nim |
08:25:52 | * | datanoise quit (Ping timeout: 258 seconds) |
08:31:32 | * | BlaXpirit joined #nim |
08:31:41 | Arrrr | crystal has surpassed nim in popularity |
08:32:45 | dtscode | I'm not surprised |
08:33:12 | Arrrr | i am |
08:33:13 | BlaXpirit | that seems false to me |
08:33:38 | Arrrr | Stars in github for me is the best indicator we have |
08:33:39 | BlaXpirit | I see about 5 times more mentions of nim than crystal |
08:33:40 | dtscode | Most people that use python like it just the way it is. |
08:33:54 | dtscode | I can't say I've seen the same with ruby |
08:35:13 | Arrrr | more mentions mean nim is older. But crystal's popularity has grown in a few days |
08:35:33 | BlaXpirit | sure, in a year it's probably going to surpass |
08:35:33 | Arrrr | Unless someone is making fake accounts in github, which is unlikely |
08:35:55 | BlaXpirit | it's improving so much faster, even with 1 guy doing 80-90% of commits |
08:36:18 | Arrrr | Im surpised because it only runs on unix, where nim controls more platforms |
08:36:36 | Arrrr | And yes, Asterite is a machine |
08:39:24 | * | strcmp1 joined #nim |
08:45:38 | * | ozra joined #nim |
08:47:33 | * | skyfex_ joined #nim |
08:52:10 | Varriount | Yay, my MSDN crawler is crawled over 14,000 pages |
08:52:21 | * | skyfex_ quit (Ping timeout: 265 seconds) |
09:04:22 | * | ozra quit (Ping timeout: 246 seconds) |
09:12:48 | Arrrr | Ok, i knew it was strange https://news.ycombinator.com/item?id=9669166 |
09:13:05 | Arrrr | Today has more popularity because of HN |
09:16:29 | dtscode | oh hey I remembered my HN username I created for dom96 |
09:18:15 | * | filwit joined #nim |
09:19:12 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:22:48 | * | datanoise joined #nim |
09:23:43 | * | Arrrr quit (Quit: WeeChat 1.2) |
09:24:13 | * | skyfex_ joined #nim |
09:27:15 | * | ingsoc joined #nim |
09:42:00 | * | filwit quit (Quit: Leaving) |
09:53:05 | * | bhishma joined #nim |
09:55:27 | * | jaco60 joined #nim |
09:56:57 | * | Arrrr joined #nim |
10:00:04 | * | Trustable joined #nim |
10:03:59 | * | datanoise quit (Ping timeout: 245 seconds) |
10:14:19 | * | gokr_ joined #nim |
10:20:20 | * | yglukhov________ joined #nim |
10:26:44 | * | Ven joined #nim |
10:37:48 | * | TEttinger quit (Ping timeout: 276 seconds) |
10:59:39 | Araq | Arrrr: well more popularity is always nice, but Golang came after Nim and is much more popular too so I'm not sure what your point is. |
11:02:09 | Arrrr | No, i dont have a point. I was just surprised how, in a few days, crystal got more stars (like 100+) than nim. But it was because of that HN link, i suppose |
11:04:40 | Araq | well Crystal seems to optimized for popularity with little consideration about anything else, so it's not surprising |
11:06:24 | Arrrr | lol |
11:08:01 | * | ozra joined #nim |
11:09:27 | ozra | The right article at the right time can do much, it's not necessarily a long term trend |
11:10:23 | ozra | In any event, I do think there are interesting parts in Crystal that could find a place in Nim, like in all languages. But it's teeny things. |
11:13:44 | Arrrr | Yes. I find nim more powerfull, but crystal has stuff that at the end has more use (better support for classes, in my opinion) |
11:14:40 | Araq | Arrrr: well I'm not alone with the "classes suck" idea. |
11:15:11 | Araq | Go and Rust don't have 'class' either and afaict for the same reasons as Nim |
11:18:13 | Arrrr | I like it the way nim handles them. I dont need the oop macro at all, is not that. But some oop concepts are lacking in nim. For example, i think fowl was the one who said "single method dispatch is boring", whatever, but having a lot of stuff to make us write less, and then not being able to call super in a comfortable way seems strange to me |
11:18:29 | Arrrr | I mean, i miss certain operations which, in my opinion, were basic. |
11:19:37 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:19:49 | Arrrr | I like it when the reason is "there is better/safer way to do it", not when the alternative is write more boilerplate |
11:20:03 | Araq | 'super' can be built with a macro, has been built with a macro and will likely end up in the stdlib. |
11:20:40 | * | Ven joined #nim |
11:21:02 | ozra | Arrrr: You can import the classes macro if you want a simpler 'class likey' declaration.. |
11:21:53 | * | dddddd joined #nim |
11:22:22 | ozra | Eh, sorry, read through and saw that was *not* a matter for you Arrrr... |
11:22:53 | Arrrr | Ok, what about interfaces, type covariance (http://stackoverflow.com/questions/30671669/define-generic-function-type), construction type restriction (which will impose problems when nim reaches 1.0) |
11:24:02 | Araq | well what about them? fowl is implementing interfaces via macros ... |
11:24:47 | Araq | type covariance is unsafe with mutable data and of questionable value |
11:25:17 | Araq | IMHO even when you do it safely the complexity vs expressiveness tradeoff is really poor |
11:26:09 | Araq | and at the end it only encouarges what we like to discourage: dynamic binding fluffy OO "design" everywhere so that people don't have to leave their comfort zone |
11:26:24 | * | boopisaway is now known as boop |
11:29:47 | Arrrr | So dynamic binding everywhere is a bad thing, but Garbage Collector is good enough. I dont buy that. |
11:30:34 | * | Kingsquee quit (Quit: Konversation terminated!) |
11:30:45 | Arrrr | You want people to write less code or to write fast code, because in the last case you can always use c. I like that nim gives you several options, and dont impose you a way to do things. |
11:31:21 | Arrrr | I'd like a way to do some things i've been doing in other languages than nim forces me to write workarounds |
11:32:01 | Araq | Why would I "always use C"? C has an unusable type system, header file madness and cannot even check array bounds |
11:32:33 | Araq | and dynamic binding is not bad because of its performance aspects. |
11:32:47 | Araq | it's bad because it makes reasoning about the code that much harder. |
11:33:04 | Araq | there is a reason why C# cannot do "goto definition" for interface calls. |
11:33:28 | gokr_ | you can already call super - just need to name the type.explixitly |
11:33:46 | Araq | it's because by their very nature they only *look* nice, but cannot be tracked effectively. |
11:35:09 | Arrrr | Ok, im happy now *says while writes thousands of 'proccall callMe parentType(bar)' lines of code* |
11:35:30 | ozra | I'm all for having more options as to how you write your code. This area I'm not to versed in, though I've code the vicious language for decades, I've always opted for the solutions that becomes statically resolving (the performance aspect). |
11:36:57 | ozra | Araq: Would it be way more complex for the compiler? Or is it more of a stylistic 'do it this way instead' kind of thing? |
11:37:39 | ozra | (It'll probably not affect any of my future code, just curious as to the possibilities) |
11:37:45 | Araq | Arrrr: I already told you "super" is a macro away ... |
11:39:44 | Araq | ozra: it's a hard problem and you have to give up modular type checking to track it. |
11:40:06 | Araq | *to tackle |
11:40:31 | ozra | Some parts require global type solution already, no? Like methods? |
11:40:39 | ozra | *resolution* |
11:41:16 | Araq | no, these require link-time code generation. and yes, these are bad too ;-) |
11:41:24 | Araq | so I would like to get rid of them |
11:42:22 | ozra | Araq: Oh, no, please don't. These constructs _are_ needed sometimes for clear code, and they seem more efficient than C++ virtual calls already (except for when C++ inlines them because of known stable type context).. More options! Less limitations! :-) |
11:43:38 | ozra | I consider whole-program-analysis a must when it comes to performant binaries anyhow.. |
11:44:43 | Arrrr | These germans and their austerity, not even nim can be saved |
11:49:53 | pigmej | reactormonk: ping |
11:50:03 | ozra | Yeah, it's important to weigh feature creep vs superficial limitations for no reason (other then the effort to implement, ofc). |
11:52:09 | Arrrr | I'm stupid, and that's why i have to relay on some stupid features. I recall when i understood interfaces for the first time, it was a pure orgasm. |
11:56:39 | ozra | Arrrr: I can't confirm of deny your statement ;-) But it is a fact that there _are_ a lot of stupid coders out there, having features that makes life easier, for companies being able to hire 'average coders' seems rather a fact of life, then they can keep the "elite-coders" on the hot-paths and advanced implementations of the system using the core features of the language. But, it all depends on what the goal is in a larger perspective fo |
11:58:35 | ozra | I've programmed on teams where you wondered how many people the coders had fucked to get the job. Complete fucking imbecils! Some of them was moved to tech support rather quickly ;-) But, it's the reality :-/ |
12:02:56 | Araq | ozra: fair enough but I have a hard time deriving a programming language from the premise that "programmers are stupid anyway" |
12:03:17 | Araq | that's been tried before and the result is java. |
12:05:16 | Araq | ... and while it might objectively a very good language in this setting I don't want to work in java |
12:06:57 | Araq | Arrrr: when I learned about interfaces I thought "ok, this is just a global goto and for some reason nobody notices" ;-) |
12:08:54 | * | BlaXpirit left #nim ("Quit Konversation") |
12:09:04 | Arrrr | I dont get what you mean, a global goto as in "easy to implement" or in "unsafe" |
12:10:18 | * | ChrisMAN joined #nim |
12:10:38 | Araq | as in "hard to reason about" |
12:11:01 | ozra | Araq: Haha, yes the lovely Java. (*throws up*) |
12:11:28 | Arrrr | Why is that hard to reason about |
12:11:53 | ozra | Araq: No, I was thinking more along the lines: a language for smart people, but throw in some helpful stuff for those who aren't. That said, I wouldn't spend my time implementing above dynamics (since I won't be using it..) |
12:12:54 | ozra | Araq: It also has resulted in Rust (which I find javaesque in that way), arggh |
12:13:07 | Araq | bbl |
12:14:25 | ozra | Arrrr: Interfaces, as Araq mentioned above, seems to be on the way implemented as macros, will that help? |
12:15:14 | ozra | Arrrr: Eh, and to be clear, again, I do not consider _you_ stupid for wanting above features. |
12:15:23 | Arrrr | Of course, if they see some the day the light of the sun. |
12:17:06 | ozra | Having both structural and nominal choice is a real win for a lang imo, go Nim |
12:19:13 | Arrrr | And by the way, channels and async is, in my opinion, the no brainer way to do multithreading. Even java gives you more power to do some stuff in that way than nim https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/package-summary.html |
12:19:39 | Arrrr | I dont get what people see in async. |
12:26:56 | ozra | Arrrr: start hacking, make a PR :-) |
12:29:13 | Arrrr | One day ;_( |
12:29:57 | pigmej | Arrrr: way more concurrency than with threads |
12:30:05 | pigmej | that's what people see in async |
12:36:10 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:36:47 | Arrrr | So it is good to pretend sorting arrays with 10 elements with threads is efficient but dynamic binding is the evil |
12:38:42 | gokr | Life is not black and white. |
12:38:51 | gokr | Araq needs to learn that as well :) |
12:39:36 | gokr | The focus these days on async is IMHO slightly unhealthy. Its similar to everyone flocking to Rust totally ignoring the pain levels that "no GC" means. |
12:41:28 | ozra | gokr: async in general, or a specific module in nim? |
12:41:44 | gokr | I am in an interesting experiment right now btw. I am implementing a dynamic language interpreter in Nim. I started out using object variants for my AST nodes (both parsing and fo execution) and used "Nim style" object variants, but... |
12:42:06 | gokr | ...I am now reimplementing using subtypes and several methods. It will be interesting to compare. |
12:42:13 | gokr | Async in general. |
12:43:05 | Araq | Arrrr: I don't recall saying anything like that. |
12:43:22 | ozra | gokr: Ah, yes. Many implementation actually get slower in async, because the algos and locking is not thought through. I've luckily had the scenario where I've implemented parallellization as several _processes_ running calculations. But this is a special case.. |
12:43:31 | gokr | I am not saying asynchronous architectures are "bad" - of course not. But the current stuff using async does tend to ignore certain downsides. |
12:43:57 | gokr | For example, what about multicore? And *everything* must be async, or you are shit out of luck. |
12:44:27 | gokr | Personally a green threads ontop of a native threadpool would probably give similar good advantages - with MUCH less pain. |
12:44:35 | gokr | But hey, that's just "the Smalltalker" talking. |
12:44:51 | ozra | As always, it's easier to shoot your self in the foot with more powerful features ;) |
12:45:22 | ozra | But it's important to be able to :) |
12:45:32 | Araq | Arrrr: I also don't see "Go's concurrency model" a "no brainer" given that it neither gets rid of data races nor of deadlocks |
12:45:58 | Araq | but whatever you're in troll mode now, no point in arguing further with you. |
12:46:09 | gokr | Squeak has green threads (as do most Smalltalk implementations) and can easily spawn 100k of those in a second. Very little overhead. The downside with Cog though (current Squeak VM) is that it doesn't use a native threadpool underneath. |
12:46:57 | gokr | I do admit that... Araq makes me nervous about "getting rid" of methods, but I trust something will take their place. |
12:47:05 | * | JinShil quit (Quit: Konversation terminated!) |
12:47:32 | gokr | IMHO dynamic binding has its places. |
12:48:53 | ozra | Green threads as an option could always be good (as might be apparant, I'm all for options, even if I won't use them myself) |
12:48:54 | gokr | What would be interesting though is some *novel* thoughts on mixing the mechanisms we have around static and dynamic binding. |
12:49:34 | ozra | gokr: Better than compromises: novel synergetic solutions! |
12:49:36 | * | Ven joined #nim |
12:49:45 | gokr | yeah |
12:50:07 | ozra | And, then, better than hitting a brick wall: compromises, haha |
12:50:19 | gokr | Using object variants in Ni (my little language) made me reach a point where the code looked like a freaking mess. |
12:50:34 | gokr | I am not sure what the hard core Nimmers think of that. |
12:51:04 | * | Ven quit (Client Quit) |
12:51:33 | gokr | It seems to me that object variants (bundling up a bunch of different things in a single type basically) might work fine if you are mostly modelling "different state" and not much "different behavior". |
12:52:13 | gokr | The downside seems to be that your code ends up basically using a single type for params and return values - and that means every single proc must do the case-of dance all over. |
12:53:09 | gokr | Its kinda like the Perl-disease. |
12:53:38 | ozra | Yeah, and then you have dynamic binding - in a harder to maintain way.. Better to let compiler take care of that and make optimizations easier in the process. |
12:53:41 | gokr | Sending hashes around (single typ, just data) and then look at its data to figure out what to do with it (idiotic polymorphism). |
12:54:35 | ozra | These things has been done again and again in C (most widespread GObj) and it always is slower than say C++. |
12:54:37 | gokr | Right now I am learning about spaghetti stacks in order to get closures working, fun stuff :) |
12:54:45 | ozra | Not to mention clumsier to write... |
12:55:20 | gokr | Araq: Nim doesn't use PICs does it? For methods I mean? |
12:55:31 | gokr | I believe we dalked about it, but my memory is like a gold fish. |
12:55:34 | gokr | talked |
12:55:53 | * | fioco joined #nim |
12:56:33 | gokr | Ok, time to go check up on the boat. later guys |
12:57:07 | ozra | later! no booze at sea! ;) |
12:58:35 | * | Ven joined #nim |
13:01:23 | * | fioco quit (Remote host closed the connection) |
13:01:43 | * | fioco joined #nim |
13:01:43 | * | fioco quit (Changing host) |
13:01:43 | * | fioco joined #nim |
13:05:19 | * | gokr_ quit (Ping timeout: 258 seconds) |
13:09:54 | * | gokr_ joined #nim |
13:11:03 | pigmej | reactormonk: ping me when you will be av. |
13:13:43 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:16:04 | * | BitPuffin|osx joined #nim |
13:17:45 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:31:04 | * | fioco quit (Ping timeout: 256 seconds) |
13:31:05 | * | taotetek joined #nim |
13:31:44 | taotetek | running into an issue building c2nim with latest nim dev branch - just wondering if this is a known issue |
13:31:51 | taotetek | cparse.nim(38, 19) Error: ambiguous identifier: 'TToken' -- use a qualifier |
13:34:40 | * | Siecje joined #nim |
13:40:21 | Varriount | taotetek: Huh, that must be new. |
13:40:33 | Varriount | taotetek: I built c2nim a couple of days ago, and didn't have that error. |
13:46:02 | Varriount | taotetek: Hm, what method did you use to obtain c2nim? What version of the compiler do you have? |
13:46:36 | Varriount | taotetek: c2nim builds without any errors for me. |
13:46:38 | taotetek | Varriount: I've tried both nimble and git for c2min |
13:46:42 | taotetek | Varriount: interesting |
13:47:00 | taotetek | Varriount: I'm on nim version 0.11.3 |
13:48:11 | taotetek | Varriount: the error (and I my state this incorrectly, just starting to dive into nim today) seems to indicate TToken is exported from multiple places and the compiler can't determine which one to use? |
13:48:35 | taotetek | perhaps I've done something wrong in my nim install or when playing with nimble |
13:48:55 | Varriount | taotetek: It might be me. Let me recompile my Nim compiler |
13:50:00 | * | gokr_ quit (Read error: Connection reset by peer) |
13:51:59 | taotetek | Varriount: wiping my nimble directory, rebuilding nimble then nimble installing c2nim results in the same error |
13:52:01 | * | no_name quit (Ping timeout: 264 seconds) |
13:52:16 | Varriount | taotetek: It's probably me. My compiler is woefully out of date. |
13:52:30 | taotetek | Varriount: aaah ok - so perhaps it works with an older version of the compilre |
13:52:44 | taotetek | Varriount: I'm hacking on some bindings by hand in the meantime |
13:53:52 | Varriount | taotetek: Oh? What library/program? |
13:54:21 | taotetek | Varriount: czmq - it's C api wrapper for libzmq that provides some nice higher level abstractions |
13:54:51 | * | no_name joined #nim |
13:54:53 | Varriount | taotetek: Neat! I'm currently in the process of redoing the bindings for the Windows API |
13:55:06 | taotetek | Varriount: I recently finished up creating some golang bindings for it and was looking for something new to play with, stumbled onto nim |
13:55:22 | taotetek | and the ffi interface for c looked pretty nice |
13:55:42 | Varriount | taotetek: Yeah, it's one thing I really like about Nim. |
13:57:11 | Varriount | taotetek: Yep, just ran into your problem. Probably has something to do with some recent renamings. |
13:57:58 | taotetek | Varriount: I'll file an issue on github after I get a little more coffee into me - thanks for checking! |
13:58:17 | * | gokr_ joined #nim |
13:58:22 | taotetek | in the meantime working on some bindings by hand is teaching me some things |
13:58:27 | Varriount | taotetek: I'll try to fix it. |
13:58:44 | taotetek | Varriount: will be happy to test a fix - I'll be around for awhile. |
13:58:52 | Varriount | taotetek: Make sure to use the c___ types (cint, cshort, etc) |
13:59:19 | Varriount | taotetek: Nim's 'int' type is the size of a pointer as well. |
13:59:40 | ozra | taotetek: The types where recently renamed in the compiler from the older standard TType to Type. So getting the latest of evertyhing _should_ work.. |
14:01:04 | ozra | Saw now, that it was alredy considered, great if it's fixed if it's missed somewhere :) |
14:03:05 | taotetek | ozra: yeah - c2nim currently has a compile error with latest head from dev branch that seems related to this |
14:03:09 | * | Ven joined #nim |
14:03:21 | * | dhasenan left #nim (#nim) |
14:03:29 | taotetek | ozra: I'm at my "I have no idea what I'm doing stage" still - just built nim this morning |
14:07:29 | * | Ven quit (Client Quit) |
14:09:53 | Varriount | taotetek, ozra: Found it - symbol collision between compiler/lexer.nim and lib/pure/pegs.nim |
14:11:12 | taotetek | Varriount: aha! |
14:11:41 | * | Ven joined #nim |
14:12:28 | ozra | Varriount: taotetek: cool. quick resolution :) |
14:12:32 | taotetek | Varriount: I noticed that if I explicitly specified clex.TToken it would resolve the error for that line (and then I'd get the same error on the next use of TToken in c2nim) so I figured it was some sort of namespace collision |
14:14:29 | federico3 | is anybody able to build the pdf version of the docs from the latest version? |
14:17:43 | Varriount | taotetek: If you want a quick fix, remove 'pegs' from the main import body, and add this line - "import pegs except TToken, TTokKind" |
14:19:46 | taotetek | tada |
14:19:58 | taotetek | thank you Varriount |
14:20:16 | Varriount | taotetek: I'll let you figure out what the 'except' does. :P |
14:22:16 | taotetek | yeah - I think I groked it ;) |
14:27:13 | Varriount | taotetek: The hardest part about using c2nim is in determining how much the input file needs modifying. |
14:27:28 | taotetek | Varriount: learning that the hard way right now, hah |
14:27:56 | Varriount | taotetek: If you need help, all you need to do is ask. |
14:28:22 | taotetek | Varriount: will do, and no worries - I might generate these bindings in a different way than c2nim now that I think about it |
14:28:40 | Varriount | taotetek: Oh? |
14:28:57 | taotetek | Varriount: for many zeromq projects we model the project apis in xml and use a code generation tool called "gsl" to generate the code |
14:29:16 | taotetek | Varriount: I'm pretty familiar with it because I generated some of the go binding the same way |
14:29:24 | * | gokr_ quit (Read error: Connection reset by peer) |
14:29:38 | * | gokr_ joined #nim |
14:29:41 | taotetek | looking at how nim does ffi I don't think it would be that herculean of a task to add nim support to our code generation tools |
14:30:51 | taotetek | aha - I do have one question |
14:32:00 | taotetek | proc sock_new*(theType: cint): PSock {.cdecl, importc: "zsock_new", dynlib: czmqdll.} |
14:32:17 | taotetek | so this works, for a proc that wraps zsock_new and returns PSock |
14:32:30 | taotetek | but I'm having trouble figuring out the syntax for wrapping a c function that doesn't have a return value |
14:33:22 | taotetek | proc sock_destroy*(s: PSock): {.cdecl, importc: "zsock_destroy", dynlib: czmqdll.} <- this is apparently not it |
14:33:23 | Varriount | taotetek: Nim does have the 'void' type (or you can just omit the return type field). Or do you mean something like a main() function, which lacks a return statement? |
14:33:51 | taotetek | aha void works |
14:33:52 | taotetek | thank you! |
14:34:30 | Varriount | taotetek: You can also omit the ':' |
14:35:10 | flaviu | yeah, the idomatic way is omitting the return type |
14:35:46 | taotetek | thanks flaviu |
14:43:04 | * | Siecje quit (Ping timeout: 258 seconds) |
14:47:14 | * | bjz joined #nim |
14:47:17 | taotetek | ok, this is going to be fun. |
14:57:43 | taotetek | Varriount: would have have a link to a good nim project to read to see how unittests are normally laid out? |
14:58:43 | Arrrr | http://nim-lang.org/docs/unittest.html |
15:03:01 | taotetek | thanks Arrrr - I also found this write up - http://howistart.org/posts/nim/1 |
15:04:26 | * | Arrrr quit (Ping timeout: 272 seconds) |
15:06:12 | * | Arrrr joined #nim |
15:26:06 | * | flaviu quit (Remote host closed the connection) |
15:26:22 | * | flaviu joined #nim |
15:31:31 | * | Siecje joined #nim |
15:34:50 | * | gokr_ quit (Remote host closed the connection) |
15:34:58 | * | gokr_ joined #nim |
15:35:35 | * | vikaton joined #nim |
15:40:20 | vikaton | is Nim being moved ? |
15:41:00 | Siecje | ? |
15:42:12 | Varriount | vikaton: To github.com/nim-lang, yes |
15:42:27 | ozra | Varriount: Aha, is it done? |
15:42:30 | vikaton | Varriount: you know when it will? |
15:43:13 | Varriount | ozra, vikaton: No idea |
15:43:22 | ozra | K |
15:43:33 | * | darkf quit (Quit: Leaving) |
15:49:57 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:50:31 | * | Ven joined #nim |
15:51:55 | * | gokr_ quit (Read error: Connection reset by peer) |
15:53:06 | * | Ven quit (Client Quit) |
16:01:13 | * | banister joined #nim |
16:04:34 | * | fioco joined #nim |
16:04:45 | * | fioco quit (Client Quit) |
16:07:21 | * | flaviu quit (Ping timeout: 276 seconds) |
16:13:09 | * | xificurC quit (Ping timeout: 258 seconds) |
16:15:18 | * | flaviu joined #nim |
16:19:22 | Araq | OnO_: git thinks I modified bootstrap.sh :P |
16:21:26 | * | flaviu left #nim (#nim) |
16:22:25 | * | wb quit (Ping timeout: 250 seconds) |
16:24:22 | * | johnsoft quit (Ping timeout: 252 seconds) |
16:24:32 | * | johnsoft joined #nim |
16:24:57 | * | wb joined #nim |
16:42:16 | * | Matthias247 joined #nim |
16:45:11 | * | fioco joined #nim |
16:58:50 | Arrrr | Silly question, how do i read the arguments passed to nim when running an exe? |
16:59:11 | * | datanoise joined #nim |
17:17:16 | Varriount | Arrrr: http://nim-lang.org/docs/os.html#commandLineParams |
17:21:42 | * | datanoise quit (Ping timeout: 256 seconds) |
17:22:29 | * | Nematode joined #nim |
17:26:58 | Arrrr | Ah, good old os |
17:27:03 | Arrrr | Thank you Varriount |
17:28:02 | * | Ven joined #nim |
17:28:32 | * | mwcampbell joined #nim |
17:29:25 | mwcampbell | Why does Nim use deferred rather than immediate reference counting? |
17:29:55 | mwcampbell | That is, in the absence of cycles, why aren't unreferenced objects immediately released, as in Objective-C, COM, or CPython? |
17:30:17 | * | Ven quit (Client Quit) |
17:30:22 | Varriount | Araq: A question for you ^ |
17:31:00 | Varriount | mwcampbell: If I had to guess, performance? |
17:31:44 | Varriount | mwcampbell: "Deferred reference counting reduces the cost of maintaining reference counts by avoiding adjustments when the reference is stored on the stack." |
17:31:50 | * | fioco_ joined #nim |
17:32:00 | * | johnsoft quit (Ping timeout: 272 seconds) |
17:32:09 | * | johnsoft joined #nim |
17:32:30 | Varriount | mwcampbell: http://www.memorymanagement.org/glossary/d.html#term-deferred-reference-counting |
17:33:21 | Nematode | What's the most mature and usable Nim graphics lib? :) |
17:33:36 | * | fioco quit (Ping timeout: 256 seconds) |
17:33:53 | Varriount | Nematode: What kind of graphics do you plan to do? |
17:34:10 | Nematode | 2D bitmaps for games |
17:34:27 | Varriount | Nematode: The SDL wrapper is what you want then, I think. |
17:34:33 | Nematode | Okies |
17:34:54 | Varriount | Nematode: There's also the allegro wrapper, although that might be a bit more complex. |
17:39:52 | * | Ven joined #nim |
17:41:29 | * | Ven quit (Read error: Connection reset by peer) |
17:41:43 | * | Nematode quit (Quit: Page closed) |
17:41:44 | * | fioco_ left #nim ("See my work at lukethetechman.wordpress.com") |
17:42:17 | * | Siecje left #nim (#nim) |
17:42:20 | * | milosn quit (Read error: Connection reset by peer) |
17:42:23 | * | milosn_ joined #nim |
17:42:39 | * | milosn_ is now known as milosn |
17:49:39 | OnO_ | Araq: git config --global core.fileMode false |
17:49:41 | * | xificurC joined #nim |
17:55:16 | Varriount | Araq: I think you'll like this post -http://mkremins.github.io/blog/unix-not-acceptable-unix/ |
17:57:27 | OnO_ | Araq: honestly I don't understand why you are having this issue, since latest msysGit sets core.fileMode to false by default on cloning |
17:57:51 | OnO_ | anyways just set core.fileMode to false and the problem is solved |
18:01:13 | OnO_ | but I can guess the repo copy you have might have been checked out on other OS or copied from Linux, or maybe cloned while ago using some broken msysGit not setting core.fileMode |
18:02:33 | Varriount | OnO_: I think *nix stuff just naturally dislikes Araq :P |
18:03:32 | * | brson joined #nim |
18:07:10 | * | filwit joined #nim |
18:07:11 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:14:37 | * | mwcampbell quit (Quit: Leaving) |
18:17:47 | * | Sembei quit (Read error: Connection reset by peer) |
18:18:14 | * | datanoise joined #nim |
18:18:47 | * | Sembei joined #nim |
18:27:30 | reactormonk | pigmej, pong |
18:31:10 | pigmej | I rebased my commits |
18:31:39 | * | banister joined #nim |
18:31:45 | pigmej | the problem is your change to company-nim with better data formatting (https://github.com/reactormonk/nim-mode/commit/e03a5f71d0037d7c8b7f71f682269f685a5d3db1) |
18:31:53 | pigmej | it will conflict |
18:32:03 | reactormonk | pigmej, told you git merge -s ours |
18:32:58 | pigmej | nope, it's already even with my commits |
18:33:48 | pigmej | ah |
18:33:48 | pigmej | ok |
18:33:49 | pigmej | nvm |
18:34:46 | * | datanoise quit (Ping timeout: 265 seconds) |
18:35:00 | pigmej | done |
18:35:13 | pigmej | also one more thing, we have to find a way to complete inside functions () |
18:36:40 | reactormonk | pigmej, see con |
18:38:01 | * | Trustable_2 joined #nim |
18:38:04 | pigmej | I know that it exists in nimsuggest, the thing is how to add it to company |
18:38:26 | * | Trustable quit (Ping timeout: 258 seconds) |
18:41:53 | OnO_ | Araq: the "const set" bug I was mentioning in the comment to my PR https://github.com/Araq/Nim/issues/2880 |
18:43:38 | * | OnO_ quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
18:46:54 | * | banister quit (Ping timeout: 245 seconds) |
18:46:56 | Xe | is SSL support for sockets a hard binary thing based on the -d:ssl flag?? |
18:47:43 | * | Trustable_3 joined #nim |
18:49:41 | * | Trustable_2 quit (Ping timeout: 256 seconds) |
18:50:39 | reactormonk | pigmej, use two different completions and a different prefix I'd say |
18:58:54 | pigmej | reactormonk: that's easy, but I don't know how to detect this situation from emacs |
19:00:42 | reactormonk | pigmej, via prefixes. |
19:00:50 | reactormonk | Maybe a looking-back regex of some kind? |
19:01:00 | pigmej | regex.. .sounds bad |
19:01:05 | reactormonk | got a better idea? |
19:01:18 | reactormonk | Araq, how is an editor supposed to know the difference between sug and con? |
19:01:39 | pigmej | reactormonk: probably we would neet to parse context AST |
19:01:46 | pigmej | and then decide which one is correct |
19:01:55 | pigmej | BUT nimsuggest could do it too |
19:03:24 | pigmej | reactormonk: regex will fail |
19:03:50 | pigmej | funct(obj.doSomething()) |
19:04:08 | reactormonk | pigmej, pretty much |
19:04:17 | pigmej | if cursor on 'b' then probably complete 'obj' with con |
19:04:23 | pigmej | but when on .do then with sug |
19:04:52 | reactormonk | otherwise just check for ( or , last char (with whitespace in between) |
19:05:54 | pigmej | reactormonk: sounds bad to me though |
19:06:26 | reactormonk | pigmej, got a better idea? |
19:06:44 | pigmej | AST parsing of line (context) in nimsuggest |
19:06:48 | pigmej | and merge con and sug |
19:06:49 | pigmej | together |
19:08:05 | pigmej | generally company iterates over all known backends, and calls 'prefix' for it. if it returns data then uses that prefix in completion function |
19:08:17 | pigmej | so the best would be to know this before reaching nimsuggest ;/ |
19:08:20 | pigmej | but that means regexes ;/ |
19:10:51 | * | perturbation joined #nim |
19:17:55 | * | no_name quit (Ping timeout: 250 seconds) |
19:19:45 | * | johnsoft quit (Ping timeout: 276 seconds) |
19:20:03 | * | johnsoft joined #nim |
19:21:04 | * | no_name joined #nim |
19:28:27 | Varriount | onionhammer: I found the problem (and it's a... bug? feature?) in ST3 |
19:29:37 | Varriount | onionhammer: The plugins are querying ST3's settings before it has a chance to fully load the file. |
19:34:22 | vikaton | 1,999 stars |
19:34:30 | vikaton | we have to move it before it reaches 2000 ! |
19:35:00 | pigmej | vikaton: too late :P |
19:35:03 | pigmej | I just stared it;p |
19:35:12 | Varriount | *starred |
19:35:18 | pigmej | yeah |
19:35:40 | vikaton | r u srs... |
19:36:03 | vikaton | omfg pigmej uuuu |
19:36:13 | vikaton | Y |
19:36:19 | pigmej | :P |
19:36:30 | pigmej | I rarely star on github; p |
19:36:39 | vikaton | heh |
19:37:35 | * | bhishma quit (Quit: ChatZilla 0.9.91.1 [Iceweasel 38.0.1/20150526223604]) |
19:43:16 | * | brson quit (Quit: leaving) |
19:48:04 | * | datanoise joined #nim |
19:53:06 | * | OnO joined #nim |
19:55:05 | * | OnO quit (Client Quit) |
19:56:38 | * | OnO joined #nim |
19:57:02 | * | OnO quit (Client Quit) |
20:04:04 | * | perturbation quit () |
20:08:53 | * | pregressive joined #nim |
20:11:11 | * | jh32 quit (Remote host closed the connection) |
20:12:40 | * | Matthias247 quit (Read error: Connection reset by peer) |
20:22:10 | * | Mat4 joined #nim |
20:26:41 | vikaton | How can I get the ouput of a execShellCMD ? |
20:31:34 | * | BitPuffin joined #nim |
20:34:30 | * | datanoise quit (Ping timeout: 264 seconds) |
20:36:04 | * | Arrrr quit (Quit: WeeChat 1.2) |
20:41:24 | Mat4 | vikaton: I don't know the Windows API's well enough, sorry |
20:42:42 | vikaton | Mat4: This isnt from the windows module, its from os |
20:45:56 | * | fioco joined #nim |
20:46:05 | Mat4 | ok, then it must be a Nim wrapper for the 'system' function ? |
20:48:03 | Mat4 | I mean the one from stdlib.h |
20:48:34 | dtscode | Mat4: No |
20:49:01 | dtscode | I doubt its a wrapper for system(char*) |
20:49:24 | dtscode | Instead, its probably just execpv + some dup calls. which you can use to get the output |
20:50:37 | Mat4 | right found this forum post: http://forum.nim-lang.org/t/925 |
20:51:04 | fioco | Does anyone have a sdl2 program that uses ttf? I was looking for an example yet found none |
20:51:47 | * | Jesin quit (Quit: Leaving) |
20:52:19 | Mat4 | I have written an emulator of my video-display processor in Nim which relate on SDL 2 |
20:52:43 | fioco | Does it use ttf? |
20:53:02 | dtscode | Mat4: You can always write your own exec that returns the output :D Not that hard and is a fun excercise |
20:54:44 | Mat4 | fioco, no, that was my original plan. Sadly the code doesn't work so I fall back to my own character code generator which is simply bitmap oriented |
20:55:07 | fioco | Ok |
20:55:12 | fioco | Thanks anyways |
20:56:21 | dtscode | Why not just read ttf docs? |
20:56:40 | Mat4 | dtscode: You can fetch the output by simply delegating stdout, why the effort ? |
20:57:08 | fioco | Dtscode for SDL 2? |
20:57:14 | dtscode | fioco: for ttf |
20:57:37 | dtscode | Mat4: You were the one asking how to get output of a command :D |
20:57:42 | fioco | Link? |
20:57:53 | dtscode | http://google.com |
20:58:00 | fioco | The SDL docs about ttf I ported |
20:58:08 | fioco | I need a graphical window |
20:58:22 | fioco | And those docs didn't port properly |
20:58:31 | dtscode | ? |
20:58:32 | filwit | is there any way to make a local reference to a seq without copying it? |
20:58:36 | Mat4 | dtscode: No that was vikaton |
20:58:47 | dtscode | Mat4: Oh my mistake |
20:58:52 | vikaton | yeh me |
20:59:12 | dtscode | fioco: You don't need to port docs... |
20:59:13 | * | johnsoft quit (Ping timeout: 255 seconds) |
20:59:22 | fioco | Sorry |
20:59:27 | vikaton | I want to get the output of the execShellCMD |
20:59:30 | fioco | Ported code from docs |
20:59:53 | * | johnsoft joined #nim |
21:00:18 | dtscode | vikaton: You can either make some dup2 calls, write a function that executes commands yourself, or you can use the function meant for getting output of a command |
21:00:27 | filwit | proc foo: var seq[int]; var f = foo() # this copies the result instead of referencing it.. can I get around that (without using ptr)? |
21:01:25 | Mat4 | vikaton: one simple way is delegating stdout to a buffer before execute the wrapper call |
21:02:14 | dtscode | dup2(stdin,stdout) :D |
21:03:47 | filwit | proc foo: var seq[int]; var f = foo() # this copies the result instead of referencing it.. can I get around that (without using ptr)? |
21:03:56 | filwit | whoops shit |
21:04:16 | filwit | terminal/alt-tab mistake |
21:04:29 | * | dtscode slaps filwit with a trout |
21:05:34 | * | Mat4 left #nim ("Verlassend") |
21:05:55 | * | Etheco quit (Read error: Connection reset by peer) |
21:07:07 | fioco | If I output to a file with \r\n , on windows, will I get a new line? |
21:07:23 | fioco | I tried and nothing happened (no new line) |
21:07:32 | dtscode | \r\n is unix |
21:07:36 | dtscode | iirc |
21:07:47 | dtscode | it also depends on whats showing the file |
21:07:52 | fioco | \r is Unix |
21:07:59 | fioco | \n is linux |
21:08:04 | dtscode | uh no |
21:08:05 | fioco | Both is windows |
21:08:09 | fioco | Really? |
21:08:11 | fioco | Huh |
21:08:13 | dtscode | \r is carriage feed |
21:08:29 | dtscode | It returns to the beginning of the line |
21:08:45 | fioco | Oh |
21:08:53 | fioco | So what is new line? |
21:08:56 | dtscode | \n |
21:09:00 | fioco | Ok |
21:09:03 | fioco | I'll try that |
21:09:29 | * | brson joined #nim |
21:09:31 | fioco | Thanks |
21:09:41 | dtscode | But like I said it depends on what opens, shows the file |
21:09:52 | fioco | Textpad |
21:10:08 | fioco | And nim readline |
21:10:30 | dtscode | uuuhhhhhhhhhhhhhhhhhhhh |
21:11:07 | dtscode | You're using readline with textpad? Why? |
21:11:21 | fioco | Textpad is just for debugging |
21:11:32 | fioco | I use them seperately |
21:11:48 | fioco | My program uses solely readline |
21:11:50 | pigmej | fioco: are you aware that \r\n is not \\r\\n ? |
21:12:03 | dtscode | And you want to use ttf with this? |
21:12:04 | fioco | Yes pigmej |
21:12:10 | fioco | Yeah |
21:12:21 | fioco | I want to read a file,and display with ttf |
21:14:53 | reactormonk | pigmej, yeah, imo make two completion backends... |
21:16:20 | dtscode | dom96: You should make the split methods take max splits :D |
21:16:22 | HOLYCOWBATMAN | classes suck! |
21:16:39 | pigmej | reactormonk: yeah sure that's the plan generally, I will try to solve sug/con situation tomorrow |
21:17:18 | * | filwit quit (Quit: Leaving) |
21:17:58 | reactormonk | pigmej, maybe I can come up with something |
21:18:44 | vikaton | confuzzled |
21:18:46 | vikaton | :( |
21:19:42 | * | ingsoc quit (Ping timeout: 256 seconds) |
21:23:19 | * | EastByte joined #nim |
21:24:31 | Varriount | fioco: SDL/GTK? |
21:25:09 | Varriount | Or possibly Cairo? (Does Cairo support font rendering?) |
21:26:41 | * | Kingsquee joined #nim |
21:28:39 | taotetek | Varriount: sending and receiving messages over zeromq using the czmq zsock and zframe api from nim now - thanks for the information early today |
21:28:48 | * | datanoise joined #nim |
21:31:18 | pigmej | reactormonk: sure, if you have an idea go for it:) |
21:31:27 | pigmej | another backend would be quite easy then |
21:32:58 | * | Jesin joined #nim |
21:35:56 | * | ingsoc joined #nim |
21:41:06 | Varriount | taotetek: Yay! |
21:41:47 | * | yglukhov________ quit (Quit: Be back later ...) |
21:42:23 | * | yglukhov________ joined #nim |
21:44:47 | * | zahary quit (Ping timeout: 265 seconds) |
21:46:50 | Xe | how would I read a line from a file in nim? |
21:47:08 | dtscode | Just one? |
21:47:10 | Xe | ah |
21:47:11 | Xe | readLine |
21:47:14 | Xe | nm |
21:47:14 | * | yglukhov________ quit (Ping timeout: 272 seconds) |
21:50:02 | * | fioco quit (Ping timeout: 265 seconds) |
21:51:37 | * | phi_freenode is now known as phira |
21:54:12 | * | vendethiel quit (Ping timeout: 272 seconds) |
21:57:51 | Araq | reactormonk: suggest is for dot, context is for ( |
21:57:57 | Araq | not sure what you mean |
22:09:48 | * | brson quit (Quit: leaving) |
22:14:25 | vikaton | Araq, you know when Nim will be moved? |
22:18:49 | * | nande joined #nim |
22:39:06 | * | zahary joined #nim |
22:41:15 | Xe | https://gist.github.com/Xe/80c32c3971644d7183f3 |
22:42:05 | Xe | what am I doing wrong? |
22:44:08 | Araq | vikaton: why is that so important? |
22:44:19 | dtscode | What nim version are you running? |
22:45:12 | vikaton | Araq, it isn't, I'm just wondering |
22:45:43 | Xe | dtscode: apparently 0.11.0 |
22:46:19 | Xe | should I update? |
22:54:27 | Araq | Xe: nobody should use 0.11.0 |
22:55:27 | Xe | i updated and it works now |
23:04:46 | * | NimBot joined #nim |
23:06:41 | vikaton | who is this NimBot |
23:12:12 | * | Trustable_3 quit (Remote host closed the connection) |
23:27:28 | * | gokr quit (Ping timeout: 258 seconds) |
23:34:38 | * | dom96_ joined #nim |
23:39:33 | * | Quikli joined #nim |